Skip to content
预计 1 分钟右侧目录可快速定位

Tool Runtime ​

两层不要混在一起 ​

text
具体 capability implementation
source/host/runner/tools/*

        ↓ 注册 / 暴露 / 协议投影

Tool runtime / adapter
routed-mcp-bridge.ts + runner/tool owners

Routed MCP Bridge 的 Tool 链 ​

Symbol / branch作用不是它的职责
Tool type保存 internal identity (providerIdentifier, toolName)不定义完整 Runtime policy
tools/listdiscovery + validation + registry projection不执行工具
tools Map将 list 时发现的 identity 延续到 call不做 durable state
tools/callname lookup → internal dispatch不判断任务语义成功
mcpResult()internal result → MCP result normalization不做 authorization
isReadOnly()生成 risk annotation heuristic不能作为 security enforcement

调用关系 ​

text
deps.listTools()
  ↓
validate name/providerIdentifier/toolName
  ↓
Map<publicName, InternalTool>
  ↓
project description + inputSchema + annotations

MCP tools/call
  ↓
Map lookup
  ↓
deps.callTool({ identity, args, toolCallId })
  ↓
mcpResult()
  ↓
protocol response

本地定位 ​

bash
rg -n "type Tool|isReadOnly|mcpResult|tools/list|tools/call|callTool" source/node-agent-coordinator/routed-mcp-bridge.ts
find source/host/runner/tools -maxdepth 1 -type f | sort

固定源码 ​

关联知识文章 ​

AI Engineering · Agent · Harness · Backend Systems