Skip to main content
Glama

diff

Compare two PubMed query result sets to identify PMIDs added or lost in the second query relative to the first, helping verify search-term changes.

Instructions

对比两个 PubMed 查询的结果集:b 相对 a 新增、丢失了哪些 PMID。 检索式迭代前后核对增减;两查询都须在 9999 窗口内,超窗报错(先缩小或改用 export)。 max_show 默认 20、上限 200,文本档每侧只展示部分;as_json=True 给完整列表。 集合差只描述增减,不判断相关性;命中更多不等于更好。两次查询间数据库可能更新。

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": {
      "term_a": "<term_a>",
      "term_b": "<term_b>"
    },
    "name": "diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
term_aYes
term_bYes
as_jsonNo
max_showNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden, and it does well: it discloses the 9999-record window and its error behavior, the fallback to export, the default and cap for max_show (20/200), that the text view is truncated while as_json returns the full list, and that the database may change between the two queries. It does not address cost or latency of running two searches, which keeps it from a 5.

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?

It is front-loaded with the core purpose and every sentence adds operational value (limits, error handling, output modes, interpretation caveats). Some parenthetical asides compress several facts into one line, but nothing is wasted.

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?

For a 4-parameter comparison tool with no annotations, the description covers the failure modes, the output-shape tradeoff, and the semantic caveats (more hits do not mean better; the set difference does not judge relevance). With an output schema present, return values need not be spelled out, so little is missing.

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 0%, so the description must compensate, and it does for two of the four parameters: max_show (default 20, cap 200, truncation behavior) and as_json (True returns the full list). term_a and term_b are only implied to be query expressions via the surrounding context, not explicitly defined, leaving a small gap.

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?

The description names a specific operation and resource: it compares two PubMed query result sets and reports which PMIDs b has added or lost relative to a. It also specifies the exact output semantics (set difference), which distinguishes it from siblings such as search or count.

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

Usage Guidelines5/5

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

It states the concrete use case: verifying additions and removals before and after iterating a search query. It also states a precondition and an alternative: both queries must fit in the 9999 window, or the call errors and the agent should narrow the query or use export instead.

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