Skip to main content
Glama

analyze_document

Parses a document URL, HTML, or Markdown to identify and describe every image, then returns the full document with image descriptions inserted beside each image.

Instructions

解析文档,识别其中所有图片的内容,并在图片位置旁标注描述。返回标注后的完整文档。

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": {
      "document": "<document>"
    },
    "name": "analyze_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
documentYes文档 URL / HTML / markdown(自动识别)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose the core behavior (all images get described, and the result is the complete annotated document rather than extracted image text), but it says nothing about permissions/auth, how long large documents take, size or page limits, whether the original text is preserved verbatim, or what happens when a document has no images.

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?

Two short sentences, front-loaded with the verb and scoped to the image-annotation behavior with the return value stated last. Nothing is redundant, though the sentence is dense enough that the output statement could be separated more cleanly.

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

Completeness3/5

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

For a single-parameter tool the description covers purpose, the processing behavior, and the return value, which is the minimum an agent needs. Gaps remain around the exact form of the returned 'annotated document' (original format vs. rewritten) and edge cases such as image-free documents, which matter because there is no output schema to fall back on.

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?

There is one required parameter with 100% schema description coverage, and the schema already states it accepts a URL, HTML, or markdown with automatic detection. The description adds no format, precedence, or validation detail beyond that baseline.

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 gives a specific verb and resource (parse the document) plus the concrete mechanism (recognize all embedded images and place descriptions next to each image position). This plausibly separates it from analyze_images and analyze_video, which operate on standalone media, but it never names those siblings explicitly.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can infer 'use this when you have a document containing images.' There is no explicit when-to-use statement, no when-not-to-use, and no pointer to analyze_images or analyze_video as alternatives for non-document inputs.

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