Skip to main content
Glama

merge_documents_as_versions

Destructive

Merge duplicate documents into versions of a root document, so scans and emailed copies become one document's version history.

Instructions

⚠️ Fold other documents into one document as its versions: each document in merge_documents stops existing as a separate document and becomes a version of root_document_id. Use it when the same paper arrived twice (e.g. a scan and a later emailed copy). Runs asynchronously.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmYesMust be true — merged documents no longer exist as separate documents
version_labelNoLabel for the new versions
merge_documentsYesDocuments to turn into versions of the root
root_document_idYesThe document that keeps existing and receives the versions

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, and the description reinforces and expands on this: it states that merged documents 'stop existing as a separate document' and that the operation 'runs asynchronously.' It also explains the confirm parameter's role. The only minor gap is not detailing what happens to the root document's existing versions or whether the operation can be reversed, but the core destructive behavior is clearly disclosed.

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?

Three sentences with no filler. The warning emoji and destructive consequence are front-loaded, the use case is given in the second sentence, and the async behavior is stated last. Every sentence earns its place.

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 destructive, async operation with no output schema, the description covers the key facts an agent needs: what the tool does, when to use it, the destructive consequence, and the async nature. It doesn't mention return values or how to check completion, but the absence of an output schema and the presence of a task system (sibling tools like list_tasks) make that a minor gap. The description is complete enough for correct invocation.

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%, so the schema already documents all four parameters. The description adds context for merge_documents and root_document_id by explaining their relationship ('becomes a version of root_document_id') and for confirm by noting the consequence. However, it doesn't add detail about version_label beyond the schema's 'Label for the new versions.' Baseline 3 is appropriate because the schema carries the heavy lifting and the description adds only modest extra meaning.

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 states a specific verb ('fold'), a resource ('documents into one document as versions'), and the exact effect ('each document in merge_documents stops existing as a separate document and becomes a version of root_document_id'). It also gives a concrete use case ('same paper arrived twice'), which distinguishes it from sibling tools like upload_document_version or delete_document.

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?

The description explicitly says when to use it ('Use it when the same paper arrived twice, e.g. a scan and a later emailed copy') and implicitly distinguishes it from alternatives like upload_document_version (which adds a version to an existing document) and delete_document (which removes documents). The destructive consequence is stated upfront, so an agent knows not to use it for simple version uploads.

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

Deploy Server

Other Tools