Skip to main content

hanzo_client/apis/
tools_api.rs

1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12use reqwest;
13use serde::{Deserialize, Serialize, de::Error as _};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration, ContentType};
16
17
18/// struct for typed errors of method [`delete_tools_mcp_servers_by_id`]
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum DeleteToolsMcpServersByIdError {
22    UnknownValue(serde_json::Value),
23}
24
25/// struct for typed errors of method [`delete_tools_plugins_authored_by_id`]
26#[derive(Debug, Clone, Serialize, Deserialize)]
27#[serde(untagged)]
28pub enum DeleteToolsPluginsAuthoredByIdError {
29    UnknownValue(serde_json::Value),
30}
31
32/// struct for typed errors of method [`delete_tools_skills_by_id`]
33#[derive(Debug, Clone, Serialize, Deserialize)]
34#[serde(untagged)]
35pub enum DeleteToolsSkillsByIdError {
36    UnknownValue(serde_json::Value),
37}
38
39/// struct for typed errors of method [`get_tools`]
40#[derive(Debug, Clone, Serialize, Deserialize)]
41#[serde(untagged)]
42pub enum GetToolsError {
43    UnknownValue(serde_json::Value),
44}
45
46/// struct for typed errors of method [`get_tools_activation`]
47#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(untagged)]
49pub enum GetToolsActivationError {
50    UnknownValue(serde_json::Value),
51}
52
53/// struct for typed errors of method [`get_tools_catalog`]
54#[derive(Debug, Clone, Serialize, Deserialize)]
55#[serde(untagged)]
56pub enum GetToolsCatalogError {
57    UnknownValue(serde_json::Value),
58}
59
60/// struct for typed errors of method [`get_tools_catalog_by_id`]
61#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(untagged)]
63pub enum GetToolsCatalogByIdError {
64    UnknownValue(serde_json::Value),
65}
66
67/// struct for typed errors of method [`get_tools_mcp_servers`]
68#[derive(Debug, Clone, Serialize, Deserialize)]
69#[serde(untagged)]
70pub enum GetToolsMcpServersError {
71    UnknownValue(serde_json::Value),
72}
73
74/// struct for typed errors of method [`get_tools_plugins`]
75#[derive(Debug, Clone, Serialize, Deserialize)]
76#[serde(untagged)]
77pub enum GetToolsPluginsError {
78    UnknownValue(serde_json::Value),
79}
80
81/// struct for typed errors of method [`get_tools_plugins_authored`]
82#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum GetToolsPluginsAuthoredError {
85    UnknownValue(serde_json::Value),
86}
87
88/// struct for typed errors of method [`get_tools_skills`]
89#[derive(Debug, Clone, Serialize, Deserialize)]
90#[serde(untagged)]
91pub enum GetToolsSkillsError {
92    UnknownValue(serde_json::Value),
93}
94
95/// struct for typed errors of method [`get_tools_skills_authored`]
96#[derive(Debug, Clone, Serialize, Deserialize)]
97#[serde(untagged)]
98pub enum GetToolsSkillsAuthoredError {
99    UnknownValue(serde_json::Value),
100}
101
102/// struct for typed errors of method [`patch_tools_catalog_by_id`]
103#[derive(Debug, Clone, Serialize, Deserialize)]
104#[serde(untagged)]
105pub enum PatchToolsCatalogByIdError {
106    UnknownValue(serde_json::Value),
107}
108
109/// struct for typed errors of method [`post_tools_call`]
110#[derive(Debug, Clone, Serialize, Deserialize)]
111#[serde(untagged)]
112pub enum PostToolsCallError {
113    UnknownValue(serde_json::Value),
114}
115
116/// struct for typed errors of method [`post_tools_catalog_sync`]
117#[derive(Debug, Clone, Serialize, Deserialize)]
118#[serde(untagged)]
119pub enum PostToolsCatalogSyncError {
120    UnknownValue(serde_json::Value),
121}
122
123/// struct for typed errors of method [`post_tools_mcp_servers`]
124#[derive(Debug, Clone, Serialize, Deserialize)]
125#[serde(untagged)]
126pub enum PostToolsMcpServersError {
127    UnknownValue(serde_json::Value),
128}
129
130/// struct for typed errors of method [`post_tools_plugins_build`]
131#[derive(Debug, Clone, Serialize, Deserialize)]
132#[serde(untagged)]
133pub enum PostToolsPluginsBuildError {
134    UnknownValue(serde_json::Value),
135}
136
137/// struct for typed errors of method [`post_tools_skills`]
138#[derive(Debug, Clone, Serialize, Deserialize)]
139#[serde(untagged)]
140pub enum PostToolsSkillsError {
141    UnknownValue(serde_json::Value),
142}
143
144/// struct for typed errors of method [`put_tools_activation`]
145#[derive(Debug, Clone, Serialize, Deserialize)]
146#[serde(untagged)]
147pub enum PutToolsActivationError {
148    UnknownValue(serde_json::Value),
149}
150
151
152/// Deregisters one of the caller org's external MCP servers, so its tools leave the registry. Scoped to the caller's org, so an id belonging to another tenant is a 404 and not a delete. Answers 204 with no body; a server this org does not have is 404.
153pub async fn delete_tools_mcp_servers_by_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteToolsMcpServersByIdError>> {
154    // add a prefix to parameters to efficiently prevent name collisions
155    let p_id = id;
156
157    let uri_str = format!("{}/v1/tools/mcp/servers/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
158    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
159
160    if let Some(ref user_agent) = configuration.user_agent {
161        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
162    }
163    if let Some(ref token) = configuration.bearer_access_token {
164        req_builder = req_builder.bearer_auth(token.to_owned());
165    };
166
167    let req = req_builder.build()?;
168    let resp = configuration.client.execute(req).await?;
169
170    let status = resp.status();
171
172    if !status.is_client_error() && !status.is_server_error() {
173        Ok(())
174    } else {
175        let content = resp.text().await?;
176        let entity: Option<DeleteToolsMcpServersByIdError> = serde_json::from_str(&content).ok();
177        Err(Error::ResponseError(ResponseContent { status, content, entity }))
178    }
179}
180
181/// Removes one of the caller org's built plugins, so the runtime can no longer load it. Scoped to the caller's org, so an id belonging to another tenant answers 404 and is not deleted.
182pub async fn delete_tools_plugins_authored_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::PluginDeleted, Error<DeleteToolsPluginsAuthoredByIdError>> {
183    // add a prefix to parameters to efficiently prevent name collisions
184    let p_id = id;
185
186    let uri_str = format!("{}/v1/tools/plugins/authored/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
187    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
188
189    if let Some(ref user_agent) = configuration.user_agent {
190        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
191    }
192    if let Some(ref token) = configuration.bearer_access_token {
193        req_builder = req_builder.bearer_auth(token.to_owned());
194    };
195
196    let req = req_builder.build()?;
197    let resp = configuration.client.execute(req).await?;
198
199    let status = resp.status();
200    let content_type = resp
201        .headers()
202        .get("content-type")
203        .and_then(|v| v.to_str().ok())
204        .unwrap_or("application/octet-stream");
205    let content_type = super::ContentType::from(content_type);
206
207    if !status.is_client_error() && !status.is_server_error() {
208        let content = resp.text().await?;
209        match content_type {
210            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
211            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PluginDeleted`"))),
212            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PluginDeleted`")))),
213        }
214    } else {
215        let content = resp.text().await?;
216        let entity: Option<DeleteToolsPluginsAuthoredByIdError> = serde_json::from_str(&content).ok();
217        Err(Error::ResponseError(ResponseContent { status, content, entity }))
218    }
219}
220
221/// Removes one of the caller org's authored skills. Scoped to the caller's org, so an id belonging to another tenant is never reached. Removing what is not there is not an error — the caller's intent is \"gone\", and it is.
222pub async fn delete_tools_skills_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::SkillDeleted, Error<DeleteToolsSkillsByIdError>> {
223    // add a prefix to parameters to efficiently prevent name collisions
224    let p_id = id;
225
226    let uri_str = format!("{}/v1/tools/skills/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
227    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
228
229    if let Some(ref user_agent) = configuration.user_agent {
230        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
231    }
232    if let Some(ref token) = configuration.bearer_access_token {
233        req_builder = req_builder.bearer_auth(token.to_owned());
234    };
235
236    let req = req_builder.build()?;
237    let resp = configuration.client.execute(req).await?;
238
239    let status = resp.status();
240    let content_type = resp
241        .headers()
242        .get("content-type")
243        .and_then(|v| v.to_str().ok())
244        .unwrap_or("application/octet-stream");
245    let content_type = super::ContentType::from(content_type);
246
247    if !status.is_client_error() && !status.is_server_error() {
248        let content = resp.text().await?;
249        match content_type {
250            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
251            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SkillDeleted`"))),
252            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SkillDeleted`")))),
253        }
254    } else {
255        let content = resp.text().await?;
256        let entity: Option<DeleteToolsSkillsByIdError> = serde_json::from_str(&content).ok();
257        Err(Error::ResponseError(ResponseContent { status, content, entity }))
258    }
259}
260
261/// Lists every tool the caller's org and project can reach, from every source, each flagged with whether it is activated. This is the discovery surface: one flat set of names spanning connector actions, user functions, zap-service routes, agents, skills and the org's own external MCP servers, deduplicated by name so the highest-precedence source wins a collision. It lists; it does not call — dispatch is POST /v1/tools/call.
262pub async fn get_tools(configuration: &configuration::Configuration, source: Option<&str>, activated: Option<&str>) -> Result<models::ToolList, Error<GetToolsError>> {
263    // add a prefix to parameters to efficiently prevent name collisions
264    let p_source = source;
265    let p_activated = activated;
266
267    let uri_str = format!("{}/v1/tools", configuration.base_path);
268    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
269
270    if let Some(ref param_value) = p_source {
271        req_builder = req_builder.query(&[("source", &param_value.to_string())]);
272    }
273    if let Some(ref param_value) = p_activated {
274        req_builder = req_builder.query(&[("activated", &param_value.to_string())]);
275    }
276    if let Some(ref user_agent) = configuration.user_agent {
277        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
278    }
279    if let Some(ref token) = configuration.bearer_access_token {
280        req_builder = req_builder.bearer_auth(token.to_owned());
281    };
282
283    let req = req_builder.build()?;
284    let resp = configuration.client.execute(req).await?;
285
286    let status = resp.status();
287    let content_type = resp
288        .headers()
289        .get("content-type")
290        .and_then(|v| v.to_str().ok())
291        .unwrap_or("application/octet-stream");
292    let content_type = super::ContentType::from(content_type);
293
294    if !status.is_client_error() && !status.is_server_error() {
295        let content = resp.text().await?;
296        match content_type {
297            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
298            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ToolList`"))),
299            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ToolList`")))),
300        }
301    } else {
302        let content = resp.text().await?;
303        let entity: Option<GetToolsError> = serde_json::from_str(&content).ok();
304        Err(Error::ResponseError(ResponseContent { status, content, entity }))
305    }
306}
307
308/// Reports which tools are switched on for the caller's org and project. Activation is what makes a tool dispatchable and what makes it visible to an agent, so this is the set the MCP tool list is drawn from — every other tool in the registry is discoverable but refused at call time.
309pub async fn get_tools_activation(configuration: &configuration::Configuration, ) -> Result<models::ActivationSet, Error<GetToolsActivationError>> {
310
311    let uri_str = format!("{}/v1/tools/activation", configuration.base_path);
312    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
313
314    if let Some(ref user_agent) = configuration.user_agent {
315        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
316    }
317    if let Some(ref token) = configuration.bearer_access_token {
318        req_builder = req_builder.bearer_auth(token.to_owned());
319    };
320
321    let req = req_builder.build()?;
322    let resp = configuration.client.execute(req).await?;
323
324    let status = resp.status();
325    let content_type = resp
326        .headers()
327        .get("content-type")
328        .and_then(|v| v.to_str().ok())
329        .unwrap_or("application/octet-stream");
330    let content_type = super::ContentType::from(content_type);
331
332    if !status.is_client_error() && !status.is_server_error() {
333        let content = resp.text().await?;
334        match content_type {
335            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
336            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActivationSet`"))),
337            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActivationSet`")))),
338        }
339    } else {
340        let content = resp.text().await?;
341        let entity: Option<GetToolsActivationError> = serde_json::from_str(&content).ok();
342        Err(Error::ResponseError(ResponseContent { status, content, entity }))
343    }
344}
345
346/// Lists the MCP servers the public registries publish, as we hold them: our canonical copy of registry.modelcontextprotocol.io, plus what we decided about each entry.  This is the SHELF an org picks from. A listing with a streamable-http endpoint can be enabled as-is — POST /v1/tools/mcp/servers with its id — and its tools then join the org's tool plane and the fleet's MCP server. A listing that only ships a stdio package needs a process to run it, which is why the transports are on every entry rather than implied.  Hidden entries are absent: they are the ones we took off the shelf. A platform SuperAdmin sees them, because the same query answers \"what is on the shelf\" and \"what is in the catalog\" and two queries would drift apart.  It is PAGED — 50 by default, 200 at most. The public registry publishes tens of thousands of servers, so an unbounded answer is a twenty-megabyte response and a storefront that renders in a minute. total is the whole match, not the page.
347pub async fn get_tools_catalog(configuration: &configuration::Configuration, q: Option<&str>, featured: Option<&str>, official: Option<&str>, limit: Option<i32>, offset: Option<i32>) -> Result<models::McpCatalog, Error<GetToolsCatalogError>> {
348    // add a prefix to parameters to efficiently prevent name collisions
349    let p_q = q;
350    let p_featured = featured;
351    let p_official = official;
352    let p_limit = limit;
353    let p_offset = offset;
354
355    let uri_str = format!("{}/v1/tools/catalog", configuration.base_path);
356    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
357
358    if let Some(ref param_value) = p_q {
359        req_builder = req_builder.query(&[("q", &param_value.to_string())]);
360    }
361    if let Some(ref param_value) = p_featured {
362        req_builder = req_builder.query(&[("featured", &param_value.to_string())]);
363    }
364    if let Some(ref param_value) = p_official {
365        req_builder = req_builder.query(&[("official", &param_value.to_string())]);
366    }
367    if let Some(ref param_value) = p_limit {
368        req_builder = req_builder.query(&[("limit", &param_value.to_string())]);
369    }
370    if let Some(ref param_value) = p_offset {
371        req_builder = req_builder.query(&[("offset", &param_value.to_string())]);
372    }
373    if let Some(ref user_agent) = configuration.user_agent {
374        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
375    }
376    if let Some(ref token) = configuration.bearer_access_token {
377        req_builder = req_builder.bearer_auth(token.to_owned());
378    };
379
380    let req = req_builder.build()?;
381    let resp = configuration.client.execute(req).await?;
382
383    let status = resp.status();
384    let content_type = resp
385        .headers()
386        .get("content-type")
387        .and_then(|v| v.to_str().ok())
388        .unwrap_or("application/octet-stream");
389    let content_type = super::ContentType::from(content_type);
390
391    if !status.is_client_error() && !status.is_server_error() {
392        let content = resp.text().await?;
393        match content_type {
394            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
395            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::McpCatalog`"))),
396            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::McpCatalog`")))),
397        }
398    } else {
399        let content = resp.text().await?;
400        let entity: Option<GetToolsCatalogError> = serde_json::from_str(&content).ok();
401        Err(Error::ResponseError(ResponseContent { status, content, entity }))
402    }
403}
404
405/// Returns one catalog entry in full: the publisher's description, its repository and site, every package form with the runtime that launches it, and every hosted endpoint. It is what a branding page renders, and what tells a caller whether the listing can be enabled here and now (a streamable-http remote) or needs somewhere to run first (a stdio package).  A HIDDEN listing is not served to an org — a shelf that renders what it does not list would be a way around the shelf — but is served to a SuperAdmin, who is the one deciding whether to put it back.
406pub async fn get_tools_catalog_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::McpListing, Error<GetToolsCatalogByIdError>> {
407    // add a prefix to parameters to efficiently prevent name collisions
408    let p_id = id;
409
410    let uri_str = format!("{}/v1/tools/catalog/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
411    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
412
413    if let Some(ref user_agent) = configuration.user_agent {
414        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
415    }
416    if let Some(ref token) = configuration.bearer_access_token {
417        req_builder = req_builder.bearer_auth(token.to_owned());
418    };
419
420    let req = req_builder.build()?;
421    let resp = configuration.client.execute(req).await?;
422
423    let status = resp.status();
424    let content_type = resp
425        .headers()
426        .get("content-type")
427        .and_then(|v| v.to_str().ok())
428        .unwrap_or("application/octet-stream");
429    let content_type = super::ContentType::from(content_type);
430
431    if !status.is_client_error() && !status.is_server_error() {
432        let content = resp.text().await?;
433        match content_type {
434            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
435            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::McpListing`"))),
436            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::McpListing`")))),
437        }
438    } else {
439        let content = resp.text().await?;
440        let entity: Option<GetToolsCatalogByIdError> = serde_json::from_str(&content).ok();
441        Err(Error::ResponseError(ResponseContent { status, content, entity }))
442    }
443}
444
445/// Lists the external MCP servers the caller's org has registered. Each record carries the URL and the name of the header its credential is injected into; the credential VALUE lives only in KMS and is never returned, so hasSecret is the whole of what this surface says about it.
446pub async fn get_tools_mcp_servers(configuration: &configuration::Configuration, ) -> Result<models::McpServerList, Error<GetToolsMcpServersError>> {
447
448    let uri_str = format!("{}/v1/tools/mcp/servers", configuration.base_path);
449    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
450
451    if let Some(ref user_agent) = configuration.user_agent {
452        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
453    }
454    if let Some(ref token) = configuration.bearer_access_token {
455        req_builder = req_builder.bearer_auth(token.to_owned());
456    };
457
458    let req = req_builder.build()?;
459    let resp = configuration.client.execute(req).await?;
460
461    let status = resp.status();
462    let content_type = resp
463        .headers()
464        .get("content-type")
465        .and_then(|v| v.to_str().ok())
466        .unwrap_or("application/octet-stream");
467    let content_type = super::ContentType::from(content_type);
468
469    if !status.is_client_error() && !status.is_server_error() {
470        let content = resp.text().await?;
471        match content_type {
472            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
473            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::McpServerList`"))),
474            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::McpServerList`")))),
475        }
476    } else {
477        let content = resp.text().await?;
478        let entity: Option<GetToolsMcpServersError> = serde_json::from_str(&content).ok();
479        Err(Error::ResponseError(ResponseContent { status, content, entity }))
480    }
481}
482
483/// Reports what this deployment actually mounted: every subsystem the composition root declared and whether it is switched on. A plugin here is MOUNTED CODE that extends the deployment's own surface — not a tool an agent calls — so this is an inventory and not a tool source. It is read off the same boot snapshot every traced request resolves its subsystem label against, so it cannot drift from what is serving. Enabled-only by default, because a caller asking what this deployment can do wants what is running; ?all=true adds the configured-but-off ones.
484pub async fn get_tools_plugins(configuration: &configuration::Configuration, all: Option<&str>) -> Result<models::PluginMountList, Error<GetToolsPluginsError>> {
485    // add a prefix to parameters to efficiently prevent name collisions
486    let p_all = all;
487
488    let uri_str = format!("{}/v1/tools/plugins", configuration.base_path);
489    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
490
491    if let Some(ref param_value) = p_all {
492        req_builder = req_builder.query(&[("all", &param_value.to_string())]);
493    }
494    if let Some(ref user_agent) = configuration.user_agent {
495        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
496    }
497    if let Some(ref token) = configuration.bearer_access_token {
498        req_builder = req_builder.bearer_auth(token.to_owned());
499    };
500
501    let req = req_builder.build()?;
502    let resp = configuration.client.execute(req).await?;
503
504    let status = resp.status();
505    let content_type = resp
506        .headers()
507        .get("content-type")
508        .and_then(|v| v.to_str().ok())
509        .unwrap_or("application/octet-stream");
510    let content_type = super::ContentType::from(content_type);
511
512    if !status.is_client_error() && !status.is_server_error() {
513        let content = resp.text().await?;
514        match content_type {
515            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
516            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PluginMountList`"))),
517            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PluginMountList`")))),
518        }
519    } else {
520        let content = resp.text().await?;
521        let entity: Option<GetToolsPluginsError> = serde_json::from_str(&content).ok();
522        Err(Error::ResponseError(ResponseContent { status, content, entity }))
523    }
524}
525
526/// Lists the plugins the caller's org BUILT, newest first, each with the TypeScript as authored. That is a different set with a different lifecycle from GET /v1/tools/plugins, which reports the subsystems this deployment mounted. The bundled CommonJS the runtime executes is never included, and neither is any credential — a plugin names the connectors provider it needs and reads the credential from ctx.auth at run time.
527pub async fn get_tools_plugins_authored(configuration: &configuration::Configuration, ) -> Result<models::AuthoredPluginList, Error<GetToolsPluginsAuthoredError>> {
528
529    let uri_str = format!("{}/v1/tools/plugins/authored", configuration.base_path);
530    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
531
532    if let Some(ref user_agent) = configuration.user_agent {
533        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
534    }
535    if let Some(ref token) = configuration.bearer_access_token {
536        req_builder = req_builder.bearer_auth(token.to_owned());
537    };
538
539    let req = req_builder.build()?;
540    let resp = configuration.client.execute(req).await?;
541
542    let status = resp.status();
543    let content_type = resp
544        .headers()
545        .get("content-type")
546        .and_then(|v| v.to_str().ok())
547        .unwrap_or("application/octet-stream");
548    let content_type = super::ContentType::from(content_type);
549
550    if !status.is_client_error() && !status.is_server_error() {
551        let content = resp.text().await?;
552        match content_type {
553            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
554            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AuthoredPluginList`"))),
555            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AuthoredPluginList`")))),
556        }
557    } else {
558        let content = resp.text().await?;
559        let entity: Option<GetToolsPluginsAuthoredError> = serde_json::from_str(&content).ok();
560        Err(Error::ResponseError(ResponseContent { status, content, entity }))
561    }
562}
563
564/// Lists the skills the caller's org can reach — the brand's embedded catalogue plus the org's own authored ones — with each one's activation flag. A skill is discovery and activation metadata attached to an agent, never called directly, so every entry here is non-dispatchable. It is GET /v1/tools narrowed to one source, not a second store: a name a caller sees here is the same entry, with the same activation state, that discovery reports.
565pub async fn get_tools_skills(configuration: &configuration::Configuration, activated: Option<&str>) -> Result<models::SourceToolList, Error<GetToolsSkillsError>> {
566    // add a prefix to parameters to efficiently prevent name collisions
567    let p_activated = activated;
568
569    let uri_str = format!("{}/v1/tools/skills", configuration.base_path);
570    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
571
572    if let Some(ref param_value) = p_activated {
573        req_builder = req_builder.query(&[("activated", &param_value.to_string())]);
574    }
575    if let Some(ref user_agent) = configuration.user_agent {
576        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
577    }
578    if let Some(ref token) = configuration.bearer_access_token {
579        req_builder = req_builder.bearer_auth(token.to_owned());
580    };
581
582    let req = req_builder.build()?;
583    let resp = configuration.client.execute(req).await?;
584
585    let status = resp.status();
586    let content_type = resp
587        .headers()
588        .get("content-type")
589        .and_then(|v| v.to_str().ok())
590        .unwrap_or("application/octet-stream");
591    let content_type = super::ContentType::from(content_type);
592
593    if !status.is_client_error() && !status.is_server_error() {
594        let content = resp.text().await?;
595        match content_type {
596            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
597            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SourceToolList`"))),
598            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SourceToolList`")))),
599        }
600    } else {
601        let content = resp.text().await?;
602        let entity: Option<GetToolsSkillsError> = serde_json::from_str(&content).ok();
603        Err(Error::ResponseError(ResponseContent { status, content, entity }))
604    }
605}
606
607/// Lists the caller org's OWN skills with their SKILL.md bodies. GET /v1/tools/skills is the registry view — the brand's catalogue plus this org's, with activation flags and no bodies; this is the EDITABLE set, so it carries the content that view omits and nothing the org did not write.
608pub async fn get_tools_skills_authored(configuration: &configuration::Configuration, ) -> Result<models::AuthoredSkillList, Error<GetToolsSkillsAuthoredError>> {
609
610    let uri_str = format!("{}/v1/tools/skills/authored", configuration.base_path);
611    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
612
613    if let Some(ref user_agent) = configuration.user_agent {
614        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
615    }
616    if let Some(ref token) = configuration.bearer_access_token {
617        req_builder = req_builder.bearer_auth(token.to_owned());
618    };
619
620    let req = req_builder.build()?;
621    let resp = configuration.client.execute(req).await?;
622
623    let status = resp.status();
624    let content_type = resp
625        .headers()
626        .get("content-type")
627        .and_then(|v| v.to_str().ok())
628        .unwrap_or("application/octet-stream");
629    let content_type = super::ContentType::from(content_type);
630
631    if !status.is_client_error() && !status.is_server_error() {
632        let content = resp.text().await?;
633        match content_type {
634            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
635            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AuthoredSkillList`"))),
636            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AuthoredSkillList`")))),
637        }
638    } else {
639        let content = resp.text().await?;
640        let entity: Option<GetToolsSkillsAuthoredError> = serde_json::from_str(&content).ok();
641        Err(Error::ResponseError(ResponseContent { status, content, entity }))
642    }
643}
644
645/// Sets what WE say about one catalog entry — hidden, featured, official, logo — and answers with the stored listing. SuperAdmin only; every other caller is refused.  Curation is the half of a catalog row a sync cannot write, and this is the only thing that writes it. The upstream half is never editable here: a description that disagreed with the publisher's would be a fork of their listing, and the next sync would silently undo it.
646pub async fn patch_tools_catalog_by_id(configuration: &configuration::Configuration, id: &str, curate_req: models::CurateReq) -> Result<models::McpListing, Error<PatchToolsCatalogByIdError>> {
647    // add a prefix to parameters to efficiently prevent name collisions
648    let p_id = id;
649    let p_curate_req = curate_req;
650
651    let uri_str = format!("{}/v1/tools/catalog/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
652    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
653
654    if let Some(ref user_agent) = configuration.user_agent {
655        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
656    }
657    if let Some(ref token) = configuration.bearer_access_token {
658        req_builder = req_builder.bearer_auth(token.to_owned());
659    };
660    req_builder = req_builder.json(&p_curate_req);
661
662    let req = req_builder.build()?;
663    let resp = configuration.client.execute(req).await?;
664
665    let status = resp.status();
666    let content_type = resp
667        .headers()
668        .get("content-type")
669        .and_then(|v| v.to_str().ok())
670        .unwrap_or("application/octet-stream");
671    let content_type = super::ContentType::from(content_type);
672
673    if !status.is_client_error() && !status.is_server_error() {
674        let content = resp.text().await?;
675        match content_type {
676            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
677            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::McpListing`"))),
678            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::McpListing`")))),
679        }
680    } else {
681        let content = resp.text().await?;
682        let entity: Option<PatchToolsCatalogByIdError> = serde_json::from_str(&content).ok();
683        Err(Error::ResponseError(ResponseContent { status, content, entity }))
684    }
685}
686
687/// Runs one of the caller's activated tools and answers with its output.  This is the endpoint onto the tool plane's DYNAMIC half — the half no build-time catalogue can hold, because it is per-tenant: an org's connected connector actions, its authored skills, its agents and functions, and the tools of every external MCP server it registered. A tool's existence, its price and its activation are all rows, not code, so they cannot be known until the caller is.  One policy, the registry's: resolve by precedence, refuse an unactivated tool 403, settle a priced one through the x402 client or fail closed 402, then dispatch to the winning source bound to the caller's own (org, project). One metered unit, one audit record. A caller can only ever dispatch its own tools.  Discovery is GET /v1/tools — ?activated=true for the callable set.
688pub async fn post_tools_call(configuration: &configuration::Configuration, tool_call: models::ToolCall) -> Result<models::ToolResult, Error<PostToolsCallError>> {
689    // add a prefix to parameters to efficiently prevent name collisions
690    let p_tool_call = tool_call;
691
692    let uri_str = format!("{}/v1/tools/call", configuration.base_path);
693    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
694
695    if let Some(ref user_agent) = configuration.user_agent {
696        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
697    }
698    if let Some(ref token) = configuration.bearer_access_token {
699        req_builder = req_builder.bearer_auth(token.to_owned());
700    };
701    req_builder = req_builder.json(&p_tool_call);
702
703    let req = req_builder.build()?;
704    let resp = configuration.client.execute(req).await?;
705
706    let status = resp.status();
707    let content_type = resp
708        .headers()
709        .get("content-type")
710        .and_then(|v| v.to_str().ok())
711        .unwrap_or("application/octet-stream");
712    let content_type = super::ContentType::from(content_type);
713
714    if !status.is_client_error() && !status.is_server_error() {
715        let content = resp.text().await?;
716        match content_type {
717            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
718            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ToolResult`"))),
719            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ToolResult`")))),
720        }
721    } else {
722        let content = resp.text().await?;
723        let entity: Option<PostToolsCallError> = serde_json::from_str(&content).ok();
724        Err(Error::ResponseError(ResponseContent { status, content, entity }))
725    }
726}
727
728/// Pulls the public MCP registry into our canonical copy and reports what changed. SuperAdmin only; every other caller is refused.  It is IDEMPOTENT: a listing is keyed by the publisher's own reverse-DNS name, so a second pass over an unchanged registry rewrites the same rows and reports added=0, updated=0. It never deletes — a listing that vanishes upstream may be one an org has already enabled, and dropping its description would not drop its server. And it never touches CURATION: hidden, featured, an admin-set official and a logo survive every sync, because the write does not name those columns.
729pub async fn post_tools_catalog_sync(configuration: &configuration::Configuration, ) -> Result<models::McpCatalogSync, Error<PostToolsCatalogSyncError>> {
730
731    let uri_str = format!("{}/v1/tools/catalog/sync", configuration.base_path);
732    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
733
734    if let Some(ref user_agent) = configuration.user_agent {
735        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
736    }
737    if let Some(ref token) = configuration.bearer_access_token {
738        req_builder = req_builder.bearer_auth(token.to_owned());
739    };
740
741    let req = req_builder.build()?;
742    let resp = configuration.client.execute(req).await?;
743
744    let status = resp.status();
745    let content_type = resp
746        .headers()
747        .get("content-type")
748        .and_then(|v| v.to_str().ok())
749        .unwrap_or("application/octet-stream");
750    let content_type = super::ContentType::from(content_type);
751
752    if !status.is_client_error() && !status.is_server_error() {
753        let content = resp.text().await?;
754        match content_type {
755            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
756            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::McpCatalogSync`"))),
757            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::McpCatalogSync`")))),
758        }
759    } else {
760        let content = resp.text().await?;
761        let entity: Option<PostToolsCatalogSyncError> = serde_json::from_str(&content).ok();
762        Err(Error::ResponseError(ResponseContent { status, content, entity }))
763    }
764}
765
766/// Gives the caller's org one more external MCP server, so its tools join the org's tool plane and the fleet's MCP server. It is the ONE way an org gains a server, whether it typed the URL in or enabled a catalog listing: both write the SAME record, and `source` says which it was. A second registration path would be a second place for a server to exist, and then a second place to forget to check the credential.  The credential VALUE is sealed in KMS under a per-org ref; the row keeps only the URL, the header name to inject it into, and a has-secret flag — so a secret with no KMS configured is refused 503 rather than stored in the clear. The URL is SSRF-validated here and re-checked by the dialer at connect time, which is the DNS-rebinding defense.  Enabling a listing the org already enabled REVISES that server rather than adding a near-duplicate beside it, so a retried enable is the same one server. Answers 201 with the stored record.
767pub async fn post_tools_mcp_servers(configuration: &configuration::Configuration, create_server_req: models::CreateServerReq) -> Result<models::McpServer, Error<PostToolsMcpServersError>> {
768    // add a prefix to parameters to efficiently prevent name collisions
769    let p_create_server_req = create_server_req;
770
771    let uri_str = format!("{}/v1/tools/mcp/servers", configuration.base_path);
772    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
773
774    if let Some(ref user_agent) = configuration.user_agent {
775        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
776    }
777    if let Some(ref token) = configuration.bearer_access_token {
778        req_builder = req_builder.bearer_auth(token.to_owned());
779    };
780    req_builder = req_builder.json(&p_create_server_req);
781
782    let req = req_builder.build()?;
783    let resp = configuration.client.execute(req).await?;
784
785    let status = resp.status();
786    let content_type = resp
787        .headers()
788        .get("content-type")
789        .and_then(|v| v.to_str().ok())
790        .unwrap_or("application/octet-stream");
791    let content_type = super::ContentType::from(content_type);
792
793    if !status.is_client_error() && !status.is_server_error() {
794        let content = resp.text().await?;
795        match content_type {
796            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
797            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::McpServer`"))),
798            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::McpServer`")))),
799        }
800    } else {
801        let content = resp.text().await?;
802        let entity: Option<PostToolsMcpServersError> = serde_json::from_str(&content).ok();
803        Err(Error::ResponseError(ResponseContent { status, content, entity }))
804    }
805}
806
807/// Builds and stores one plugin for the caller's org. The 201 carries the bundle's size, whether a model wrote the source, and the plugin as stored.  Post `source` to build TypeScript as-is, or `spec` — an OpenAPI document or plain prose describing the endpoints — to have one generated; the generated source comes back in the answer, so a caller reads what will run before it runs. Exactly one of the two, and `name` must be one lowercase path segment; both or neither is 400.  COMPILING IS THE GATE. The source goes through the same pipeline the committed connectors do — esbuild to one CommonJS program, then compiled in the goja runtime that will actually execute it — and anything that fails is rejected and NEVER stored. So a plugin in the store is one this deployment has already loaded once, not one a model claimed was fine. A failed build answers 422 carrying the diagnostics a caller needs to fix it: the bundler's error (`detail`), the source that failed, and whether the model wrote it.  CREDENTIALS ARE NOT PART OF A PLUGIN. A plugin names the connectors `provider` it needs and reads that credential from `ctx.auth` at run time, under KMS custody. Source that carries something key-shaped is REFUSED rather than silently persisted — a scrubbed key looks like it worked.
808pub async fn post_tools_plugins_build(configuration: &configuration::Configuration, build_request: models::BuildRequest) -> Result<models::BuildOut, Error<PostToolsPluginsBuildError>> {
809    // add a prefix to parameters to efficiently prevent name collisions
810    let p_build_request = build_request;
811
812    let uri_str = format!("{}/v1/tools/plugins/build", configuration.base_path);
813    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
814
815    if let Some(ref user_agent) = configuration.user_agent {
816        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
817    }
818    if let Some(ref token) = configuration.bearer_access_token {
819        req_builder = req_builder.bearer_auth(token.to_owned());
820    };
821    req_builder = req_builder.json(&p_build_request);
822
823    let req = req_builder.build()?;
824    let resp = configuration.client.execute(req).await?;
825
826    let status = resp.status();
827    let content_type = resp
828        .headers()
829        .get("content-type")
830        .and_then(|v| v.to_str().ok())
831        .unwrap_or("application/octet-stream");
832    let content_type = super::ContentType::from(content_type);
833
834    if !status.is_client_error() && !status.is_server_error() {
835        let content = resp.text().await?;
836        match content_type {
837            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
838            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BuildOut`"))),
839            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BuildOut`")))),
840        }
841    } else {
842        let content = resp.text().await?;
843        let entity: Option<PostToolsPluginsBuildError> = serde_json::from_str(&content).ok();
844        Err(Error::ResponseError(ResponseContent { status, content, entity }))
845    }
846}
847
848/// Adds or revises one of the caller org's own skills, and answers 201 with the stored record. The id is derived from the name, so writing the same name again REVISES that skill rather than accumulating near-duplicates that would then collide in the registry. An org's skills are private to it by construction — they live in a different store from the brand's embedded catalogue and have no path into the public gallery — and a brand skill always wins a name collision against an org's.
849pub async fn post_tools_skills(configuration: &configuration::Configuration, skill_in: models::SkillIn) -> Result<models::SkillWritten, Error<PostToolsSkillsError>> {
850    // add a prefix to parameters to efficiently prevent name collisions
851    let p_skill_in = skill_in;
852
853    let uri_str = format!("{}/v1/tools/skills", configuration.base_path);
854    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
855
856    if let Some(ref user_agent) = configuration.user_agent {
857        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
858    }
859    if let Some(ref token) = configuration.bearer_access_token {
860        req_builder = req_builder.bearer_auth(token.to_owned());
861    };
862    req_builder = req_builder.json(&p_skill_in);
863
864    let req = req_builder.build()?;
865    let resp = configuration.client.execute(req).await?;
866
867    let status = resp.status();
868    let content_type = resp
869        .headers()
870        .get("content-type")
871        .and_then(|v| v.to_str().ok())
872        .unwrap_or("application/octet-stream");
873    let content_type = super::ContentType::from(content_type);
874
875    if !status.is_client_error() && !status.is_server_error() {
876        let content = resp.text().await?;
877        match content_type {
878            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
879            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SkillWritten`"))),
880            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SkillWritten`")))),
881        }
882    } else {
883        let content = resp.text().await?;
884        let entity: Option<PostToolsSkillsError> = serde_json::from_str(&content).ok();
885        Err(Error::ResponseError(ResponseContent { status, content, entity }))
886    }
887}
888
889/// Switches tools on and off for the caller's org and project, and answers with the resulting activated set. It is the ONE write path that turns skills, plugins and connectors into callable tools — an unactivated tool is listed by discovery but refused 403 at dispatch. Activate is applied before Deactivate, so a name in both lists ends up off. More than 256 toggles in one request is refused 413.
890pub async fn put_tools_activation(configuration: &configuration::Configuration, activation_req: models::ActivationReq) -> Result<models::ActivationSet, Error<PutToolsActivationError>> {
891    // add a prefix to parameters to efficiently prevent name collisions
892    let p_activation_req = activation_req;
893
894    let uri_str = format!("{}/v1/tools/activation", configuration.base_path);
895    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
896
897    if let Some(ref user_agent) = configuration.user_agent {
898        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
899    }
900    if let Some(ref token) = configuration.bearer_access_token {
901        req_builder = req_builder.bearer_auth(token.to_owned());
902    };
903    req_builder = req_builder.json(&p_activation_req);
904
905    let req = req_builder.build()?;
906    let resp = configuration.client.execute(req).await?;
907
908    let status = resp.status();
909    let content_type = resp
910        .headers()
911        .get("content-type")
912        .and_then(|v| v.to_str().ok())
913        .unwrap_or("application/octet-stream");
914    let content_type = super::ContentType::from(content_type);
915
916    if !status.is_client_error() && !status.is_server_error() {
917        let content = resp.text().await?;
918        match content_type {
919            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
920            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActivationSet`"))),
921            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActivationSet`")))),
922        }
923    } else {
924        let content = resp.text().await?;
925        let entity: Option<PutToolsActivationError> = serde_json::from_str(&content).ok();
926        Err(Error::ResponseError(ResponseContent { status, content, entity }))
927    }
928}
929