Skip to main content
Glama

compare_documents

Compare two documents to find differences and similarities with side-by-side metadata, content, and entity comparison, including a cosine similarity score.

Instructions

Compare two documents side-by-side with similarity scoring, metadata diff, content diff, and entity comparison. Perfect for finding differences between document versions, comparing related documents, or analyzing document similarity. Returns comprehensive comparison with cosine similarity score (0.0-1.0).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_id_1YesFirst document ID to compare
doc_id_2YesSecond document ID to compare
comparison_typeNoType of comparison: 'full' (all), 'metadata' (metadata + entities), 'content' (metadata + similarity + diff)full
Behavior3/5

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

No annotations are provided, so the description bears full responsibility for behavioral disclosure. It states that the tool returns a comparison with a cosine similarity score, indicating a read-only operation. However, it does not explicitly confirm non-destructive behavior, mention authentication needs, or describe any side effects. The lack of explicit read-only assertion is a minor gap.

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

Conciseness5/5

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

The description is extremely concise with three sentences. The first sentence states the core action, the second provides use cases, and the third mentions the output format. Every sentence adds value without redundancy. It is well-structured and front-loaded with the most critical information.

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?

Given the tool's complexity (multi-faceted comparison) and the absence of annotations and output schema, the description only partially covers what the agent needs. It explains the comparison types and output metric but does not detail the full return structure (e.g., format of diffs, entity lists). The description provides sufficient context for basic use but lacks completeness for advanced understanding.

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?

The input schema already provides descriptions for all 3 parameters (100% coverage). The tool description does not add substantial new meaning beyond summarizing the comparison types. For instance, the schema already explains the 'comparison_type' enum values. With full schema coverage, the baseline of 3 is appropriate.

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 explicitly states the tool compares two documents side-by-side with specific features (similarity scoring, metadata diff, content diff, entity comparison). It clearly identifies the action (compare documents) and the output (comprehensive comparison with cosine similarity). This distinguishes it from siblings like 'find_similar' which only finds similar documents without detailed comparison.

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?

The description provides clear use cases: 'finding differences between document versions, comparing related documents, or analyzing document similarity.' However, it does not explicitly state when to avoid this tool or mention alternatives among siblings (e.g., 'find_similar' or 'get_summary'), leaving some ambiguity for the agent.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MichaelTroelsen/tdz-c64-knowledge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server