pub struct AiMcpTool {
pub description: String,
pub upstream: String,
pub path: Option<String>,
pub method: Option<String>,
pub input_schema: Value,
pub authz: Option<Authz>,
pub timeout_ms: Option<u64>,
}Expand description
One MCP tool (DW-087 ai.mcp.tools.<name>). The gateway proxies
tool calls to the named upstream’s HTTP endpoint: the tool’s
arguments are sent as the JSON request body, and the upstream’s
response body becomes the tool’s output.
Fields§
§description: StringHuman-readable description of the tool (returned to the client
in tools/list).
upstream: StringName of the upstreams[] entry that carries this tool’s
transport. The gateway resolves the upstream’s first endpoint
to build the tool’s URL. Validation rejects a reference to an
unknown upstream.
path: Option<String>The path on the upstream (appended to the endpoint’s
address:port). Default /.
method: Option<String>The HTTP method for the upstream call. Default POST. Must be
a valid HTTP method (GET, POST, PUT, PATCH, DELETE) if
specified.
input_schema: ValueThe JSON Schema for the tool’s arguments (returned to the
client in tools/list as inputSchema). Must be a valid JSON
object.
authz: Option<Authz>Optional per-tool authorization. When present, the tool is only callable by consumers satisfying the authz rules. When absent, any authenticated consumer may call the tool.
timeout_ms: Option<u64>Upstream call timeout in milliseconds. Default 30000.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AiMcpTool
impl<'de> Deserialize<'de> for AiMcpTool
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for AiMcpTool
impl JsonSchema for AiMcpTool
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for AiMcpTool
Auto Trait Implementations§
impl Freeze for AiMcpTool
impl RefUnwindSafe for AiMcpTool
impl Send for AiMcpTool
impl Sync for AiMcpTool
impl Unpin for AiMcpTool
impl UnwindSafe for AiMcpTool
Blanket Implementations§
§impl<T> AnyExt for T
impl<T> AnyExt for T
§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind reference§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable reference§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointer§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointer§fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
T behind Box pointer§fn downcast_move<T>(this: Self) -> Option<T>
fn downcast_move<T>(this: Self) -> Option<T>
Self to T,
useful only in generic context as a workaround for specializationSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more