Skip to main content

register_task_with_mcp

Function register_task_with_mcp 

Source
pub fn register_task_with_mcp(
    registry: &Arc<ToolRegistry>,
    llm_client: Arc<dyn LlmClient>,
    agent_registry: Arc<AgentRegistry>,
    workspace: String,
    mcp_manager: Option<Arc<McpManager>>,
    parent_context: Option<ChildRunContext>,
    subagent_tracker: Option<Arc<InMemorySubagentTaskTracker>>,
)
Expand description

Register the task delegation tools with optional MCP manager and parent context.

When mcp_manager is provided, delegated child sessions will have access to all MCP tools from connected servers. When parent_context is provided, child runs inherit parent capabilities. When subagent_tracker is provided, each task registers a CancellationToken against it so callers can cancel by task_id.