Skip to main content

GatewayPort

Trait GatewayPort 

Source
pub trait GatewayPort: Send + Sync {
Show 15 methods // Required methods fn status<'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn reload<'life0, 'life1, 'async_trait>( &'life0 self, request: GatewayReloadRequest, context: &'life1 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn execute<'life0, 'life1, 'async_trait>( &'life0 self, request: GatewayExecuteRequest, context: &'life1 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_mcp_tools<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, scope: Option<&'life1 GatewayRouteScope>, context: &'life2 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayToolRoute>, PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn call_mcp_tool<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, params: Value, scope: Option<&'life2 GatewayRouteScope>, context: &'life3 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn list_mcp_resources<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, scope: Option<&'life1 GatewayRouteScope>, context: &'life2 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayResourceRoute>, PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn read_mcp_resource<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, uri: &'life1 str, scope: Option<&'life2 GatewayRouteScope>, context: &'life3 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn list_mcp_prompts<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, scope: Option<&'life1 GatewayRouteScope>, context: &'life2 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayPromptRoute>, PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn get_mcp_prompt<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, arguments: Option<Map<String, Value>>, scope: Option<&'life2 GatewayRouteScope>, context: &'life3 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; // Provided methods fn call_mcp_tool_once<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, params: Value, round_trip: GatewayMcpRoundTrip, scope: Option<&'life2 GatewayRouteScope>, context: &'life3 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Option<GatewayMcpOutcome>, PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn get_mcp_task<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, task_id: &'life1 str, context: &'life2 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn update_mcp_task<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, task_id: &'life1 str, input_responses: BTreeMap<String, Value>, context: &'life2 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<(), PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn cancel_mcp_task<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, task_id: &'life1 str, context: &'life2 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<(), PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn read_mcp_resource_once<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, uri: &'life1 str, round_trip: GatewayMcpRoundTrip, scope: Option<&'life2 GatewayRouteScope>, context: &'life3 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Option<GatewayMcpOutcome>, PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn get_mcp_prompt_once<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, arguments: Option<Map<String, Value>>, round_trip: GatewayMcpRoundTrip, scope: Option<&'life2 GatewayRouteScope>, context: &'life3 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Option<GatewayMcpOutcome>, PortError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... }
}
Expand description

Port to the MCP gateway engine: status, reload, execution, and tool/resource/prompt routing.

Required Methods§

Source

fn status<'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns the gateway’s current status snapshot.

Source

fn reload<'life0, 'life1, 'async_trait>( &'life0 self, request: GatewayReloadRequest, context: &'life1 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reloads the gateway configuration.

Source

fn execute<'life0, 'life1, 'async_trait>( &'life0 self, request: GatewayExecuteRequest, context: &'life1 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Executes a gateway operation.

Source

fn list_mcp_tools<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, scope: Option<&'life1 GatewayRouteScope>, context: &'life2 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayToolRoute>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Lists MCP tool routes exposed through the gateway, optionally scoped.

Source

fn call_mcp_tool<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, params: Value, scope: Option<&'life2 GatewayRouteScope>, context: &'life3 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Calls an MCP tool by name through the gateway.

Source

fn list_mcp_resources<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, scope: Option<&'life1 GatewayRouteScope>, context: &'life2 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayResourceRoute>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Lists MCP resource routes exposed through the gateway, optionally scoped.

Source

fn read_mcp_resource<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, uri: &'life1 str, scope: Option<&'life2 GatewayRouteScope>, context: &'life3 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Reads an MCP resource by URI through the gateway.

Source

fn list_mcp_prompts<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, scope: Option<&'life1 GatewayRouteScope>, context: &'life2 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayPromptRoute>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Lists MCP prompt routes exposed through the gateway, optionally scoped.

Source

fn get_mcp_prompt<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, arguments: Option<Map<String, Value>>, scope: Option<&'life2 GatewayRouteScope>, context: &'life3 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Gets an MCP prompt by name, with optional arguments, through the gateway.

Provided Methods§

Source

fn call_mcp_tool_once<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, params: Value, round_trip: GatewayMcpRoundTrip, scope: Option<&'life2 GatewayRouteScope>, context: &'life3 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Option<GatewayMcpOutcome>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Calls an MCP tool once, preserving modern multi-round-trip and task outcomes.

Source

fn get_mcp_task<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, task_id: &'life1 str, context: &'life2 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Gets the latest state of a routed MCP task.

Source

fn update_mcp_task<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, task_id: &'life1 str, input_responses: BTreeMap<String, Value>, context: &'life2 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<(), PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Supplies follow-up input to a routed MCP task.

Source

fn cancel_mcp_task<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, task_id: &'life1 str, context: &'life2 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<(), PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Requests cancellation of a routed MCP task.

Source

fn read_mcp_resource_once<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, uri: &'life1 str, round_trip: GatewayMcpRoundTrip, scope: Option<&'life2 GatewayRouteScope>, context: &'life3 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Option<GatewayMcpOutcome>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Reads an MCP resource once, preserving a possible input-required outcome.

Source

fn get_mcp_prompt_once<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, arguments: Option<Map<String, Value>>, round_trip: GatewayMcpRoundTrip, scope: Option<&'life2 GatewayRouteScope>, context: &'life3 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<Option<GatewayMcpOutcome>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Gets an MCP prompt once, preserving a possible input-required outcome.

Implementors§