Skip to main content
Glama

调用本地工具

call_tool

Calls recipe-based APIs by tool_id, fills URL/JSON placeholders, injects local header/query keys, sends GET/POST requests, and returns whitelist-trimmed JSON with optional focus slicing.

Instructions

按 tool_id 调用配方工具:自动填充 URL / JSON Body 占位符,按配方从本地 keys.json 注入 Header 或 Query Key,发起 GET/POST 请求,按白名单清洗字段并返回精简 JSON。长文本/更新日志可传 focus 关键词做精准切片;缺 Key 时返回中文引导且不计失败率;失败信息与日志中的 Key 一律脱敏。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tool_id": "<tool_id>"
    },
    "name": "call_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
focusNo可选,用于对长文本/更新日志按关键词精准切片提取,多词用逗号分隔,如 "security, breaking";也兼容放在 params.focus
paramsNo传给上游接口的参数对象,键名与 find_tool 返回的 params 一致;focus 也可放在这里,但不会被透传到上游
tool_idYes工具 ID,来自 find_tool 的返回,如 github_repo、currency_rate、ip_lookup、github_release、tavily_search、market_demo_logistics

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.2

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does disclose meaningful behavior: keys are injected server-side from local keys.json, fields are whitelisted/cleaned, missing keys return Chinese guidance without counting against failure rate, and keys are redacted in errors and logs. It does not state whether outgoing requests mutate remote state, whether calls are idempotent/retryable, or any timeout/rate behavior, which matters for a tool that issues real network requests.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense but well-ordered block: identity first, then the request pipeline, then the focus special case, then failure/redaction behavior. Every clause carries information; it is slightly packed with semicolon-chained clauses but nothing is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description covers the return shape at a high level ("返回精简 JSON" plus whitelist cleaning). For a 3-parameter tool with nested params this is largely sufficient, though the exact response envelope and error schema are left unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns more by explaining what focus does (keyword slicing of long text, comma-separated multi-word) and that params carries upstream keys with focus tolerated inside it but not forwarded upstream. That adds real semantics beyond the schema's own text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("按 tool_id 调用配方工具") and then enumerates the whole pipeline: placeholder filling, key injection from keys.json, GET/POST request, whitelist field cleaning, condensed JSON return. This is far more than a restatement of the name and lets an agent distinguish it from find_tool, which only discovers tool_ids.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear context: call with a tool_id obtained from the discovery step, pass upstream parameters via params, and use focus specifically for long text/changelogs. It lacks explicit exclusions or a direct "do not use this to discover tools, use find_tool" statement, so it is clear but not fully routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools