Skip to main content

remote_mcp_infer

Function remote_mcp_infer 

Source
pub fn remote_mcp_infer(
    transport: &McpTransport,
    infer_tool: Option<&str>,
    model: Option<&str>,
    system: Option<&str>,
    prompt: &str,
    supports_system_role: Option<bool>,
) -> Result<RemoteInferOutcome, String>
Expand description

Run one inference over the configured MCP transport and return the completion plus the role-lowering receipt.

infer_tool defaults to DEFAULT_INFER_TOOL when None. supports_system_role is the tool-schema capability: Some from the agent’s declared configuration or remote_mcp_tool_supports_system_role discovery, None to flatten conservatively. This is a blocking call — the caller should run it off the UI thread (the desktop command wrapper uses spawn_blocking).