Skip to main content
Glama

Merge Files

merge_files

Merge 2–8 previously uploaded PDF files into a single file. Returns a new fileId for the merged result. The original files are kept. The first fileId in the array appears first (topmost pages) in the merged document — order matters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName for the merged file including extension (e.g. 'combined-contract.pdf')
fileIdsYesFile IDs to merge (from upload_file), in the desired page order. The first ID becomes the first pages of the merged document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the description doesn't need to restate safety. The description adds valuable behavioral context: original files are kept, order matters, and a new fileId is returned. This goes beyond the schema and annotations, though it doesn't mention potential failure modes (e.g., unsupported file types) or rate limits.

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, each earning its place: the action, the return value, and the critical ordering constraint. No fluff, no repetition of schema details. The most important behavioral note (order matters) is front-loaded in the final sentence.

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 tool with 2 parameters, 100% schema coverage, and no output schema, the description is nearly complete. It covers the input, the output (new fileId), the side effect (originals kept), and the ordering semantics. The only minor gap is that it doesn't describe the format of the returned fileId or any error conditions, but those are not essential for correct invocation.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds meaning beyond the schema by explicitly stating that the first fileId appears first (topmost pages) and that order matters, reinforcing the array semantics. It also clarifies that 'name' should include the extension, which is already in the schema but reinforced. This is a modest but real addition.

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 ('Merge'), a resource ('previously uploaded PDF files'), and a concrete outcome ('into a single file'). It also distinguishes itself from siblings by specifying the input type (PDF files) and the result (a new fileId), which is not ambiguous with create_document or upload_file.

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 clearly implies when to use this tool: when merging 2–8 previously uploaded PDFs. It does not explicitly name alternatives or exclusions, but the context (sibling tools like upload_file, create_document) and the explicit 'previously uploaded' phrasing provide clear usage context. A small gap: it doesn't say 'use upload_file first if files aren't uploaded yet,' but that is reasonably implied.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources