Skip to main content
Glama

inspect_document

Analyze a PDF path and return structured JSON describing pages, tables, images, formulas, and text characters for downstream extraction and validation.

Instructions

inspect_document tool:文档探查(M6,P1,轻量)。

Args: pdf_path: PDF 路径(必填)。

Returns: 结构化 JSON 文本(PRD §4.6:pages/tables/images/formulas/text_chars)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdf_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states that it returns structured JSON and implies it's a read operation, but it does not explicitly confirm that it's non-destructive, nor does it mention error handling, file validation, or any side effects. The internal references like 'M6, P1' and 'PRD §4.6' add noise without behavioral clarity.

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

Conciseness3/5

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

The description is concise and front-loaded with the purpose, but it includes internal project codes like 'M6, P1' and 'PRD §4.6' that are irrelevant to an AI agent. The Args/Returns structure is clear, but the extraneous metadata detracts from cleanliness.

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

Completeness2/5

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

Given the tool's simplicity (one parameter) and the existence of an output schema, the description partially covers the return content but misses crucial usage guidance and behavioral details. It does not explain when to choose this tool over siblings, what happens on invalid input, or whether it is safe to call repeatedly. The absence of annotations makes these gaps more significant.

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

Parameters2/5

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

The schema defines only pdf_path as a required string, and the description adds 'PDF 路径(必填)' which merely repeats that it's required. No additional meaning is provided about the path format, whether it's local or remote, or any constraints. Since schema description coverage is 0%, the description should compensate but fails to add substantive value.

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 clearly states the tool's purpose: it inspects a PDF document and returns structured JSON containing pages, tables, images, formulas, and text characters. This is specific about the verb (inspect) and resource (PDF document), but it does not explicitly differentiate from siblings like parse_text or extract_table, so it doesn't fully distinguish itself.

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool versus alternatives. The description mentions '轻量' (lightweight), which could imply it's a quick overview, but it never states when to prefer it over parse_text, extract_table, or other siblings. There are no explicit usage conditions or exclusions.

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