Skip to main content
Glama

compare_extraction

Compares structured table extraction against naive text-stream output side by side, helping you identify where a document loses rows, columns, or numeric meaning without structure restoration.

Instructions

把 DocLens 的表格还原结果与「朴素文本流」抽取的结果并排给出,用于判断这份文档如果不做结构还原会错在哪里。适合在向别人解释这份工具的必要性时用。

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": {
      "path": "<path>"
    },
    "name": "compare_extraction"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes文档路径
indexNo第几张表,从 1 开始

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description does the work of disclosing behavior: it reveals that the tool runs two pipelines (DocLens restoration and naive text-stream extraction) and returns both for comparison, which implies more work than a plain extract. It does not say whether this is read-only, what the cost or latency might be with large documents, or how much output a side-by-side view produces.

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?

The description takes two sentences: the first describes the operation and its diagnostic purpose, and the second gives the intended scenario. It is front-loaded and has essentially no filler, though the second sentence overlaps with the first's "用于判断…会错在哪里".

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?

The tool is a read-only comparison whose return format is covered by an output schema, and both parameters are fully described in the schema, so the description only needs to supply intent. It does this well, though it could say more about when the comparison is not useful and how to interpret the output.

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

Parameters3/5

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

Schema description coverage is 100%: path (文档路径) and index (第几张表,从 1 开始) are both documented in the schema, so the baseline is 3. The description adds no extra meaning about parameters, such as whether the index refers to the DocLens or naive extraction ordering, or what happens when the index is out of range.

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

Purpose4/5

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

The description names a specific operation with a clear verb phrase: side-by-side output of DocLens table restoration versus a "naive text stream" extraction, plus the judgment it supports (where the document would go wrong without structural restoration). This is clearly not the same as extract_table's plain extraction, but the description points to the distinction implicitly rather than by naming the sibling tool.

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?

It gives an explicit use case: "适合在向别人解释这份工具的必要性时用" (suitable for explaining the tool's necessity to others), which is a genuine context signal for when to pick this tool over extraction. It does not state when NOT to use it, such as when an agent actually needs the extracted table, or name the extraction sibling as the alternative.

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