Skip to main content
Glama

merge_documents

Merge multiple PDF files into one combined document on disk, combining pages and remapping takeoff keys from all source files.

Instructions

Merge multiple PDF files into one combined PDF document on disk. Combines the pages and remaps takeoff keys from all source documents. Coordinates are image px at render scale 2.0: PDF pt × 2, origin top-left, y down (the browser canvas's native space). Sheet payloads carry dims in both px and pt.

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": {
      "files": "<files>",
      "output_path": "<output_path>"
    },
    "name": "merge_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYesList of PDF files to merge in order (can be loaded file names or file paths on disk)
overwriteNoReplace the file at path even when it is not an OpenTakeoff export. Off by default: re-exporting over a previous export of your own already overwrites without this, so you only need it to deliberately destroy an unrelated file.
output_pathYesDestination path for the merged PDF

Output Schema

NameRequiredDescriptionDefault
noteYes
output_fileYes
total_pagesYes
merged_filesYes
takeoff_fileNo
shapes_remappedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.32

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description must carry the full burden, and it does disclose meaningful non-obvious behavior: pages are combined and takeoff keys are remapped across sources. It omits whether inputs must be OpenTakeoff exports, how key collisions are resolved, failure behavior, and permission/auth expectations.

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 first two sentences are front-loaded and earn their place, but the trailing coordinate/dimension note (image px at render scale 2.0, PDF pt × 2, origin top-left) reads as tangential to a merge operation and dilutes focus. Structure is fine; content is only partly justified.

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?

An output schema exists, so return values need not be described. However, for a mutation tool writing to disk with no annotations, the definition should say more about input preconditions and side effects than it does.

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 parameter meaning is already well documented, including the overwrite-destroys-unrelated-file nuance and file ordering. The description adds no parameter-level detail beyond restating the disk destination.

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?

States a specific verb and resource ('merge multiple PDF files into one combined PDF document on disk') plus the non-obvious side effect of remapping takeoff keys from all sources. It does not explicitly distinguish itself from sibling merge-like tools such as scope_merge or align_stitch, so the agent must infer the difference from names alone.

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 implied by 'multiple PDF files into one,' but there is no explicit when-to-use or when-not guidance, and no routing to alternatives like extract_pages or scope_merge for other combination needs. Only the overwrite parameter's schema text carries any conditional guidance.

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