Skip to main content
Glama

Add Document to Draft

add_document_to_draft

Append a document to an existing Draft. Provide exactly one of document_base64, document_url, or template_id. A multi-document template inserts ALL of its documents (each counts toward the limit of 10) and name is then not allowed. role_mapping (template only) maps the template's roles onto this envelope's roles, e.g. {"customer": "client"}; unmapped roles are inserted as-is, never guessed. Fields already placed keep their pages; inserted pages come after them. Returns the draft with its documents[] (page ranges) so you can place fields with document_id + document-relative page. Requires Authorization: Bearer zs_....

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
filenameNodocument.pdf
document_idYes
template_idNo
document_urlNo
role_mappingNo
document_base64No

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the sparse annotations, the description discloses meaningful behavior: multi-document templates insert all documents, each counts toward the 10-document limit, unmapped roles are inserted as-is rather than guessed, existing placed fields keep pages, new pages are appended, and the response returns page ranges for field placement. It also states the Authorization requirement.

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

Conciseness4/5

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

The description is dense and covers many edge cases without filler, and it front-loads the primary action and core constraint. It is longer than average, but most sentences carry essential behavioral or usage information for a 7-parameter tool.

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?

The description handles template behavior, page ordering, and response semantics well, and the output schema supplies return-type details. Its completeness is undercut by the unexplained required document_id and the tension between the required schema parameter and the 'exactly one of' instruction, leaving a critical call-invariant ambiguous.

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?

With 0% schema coverage the description carries the full burden for parameters, and it does add useful semantics for document_base64, document_url, template_id, role_mapping, and name. However, it never explains the sole required schema parameter, document_id, and its 'exactly one of' instruction creates ambiguity about how document_id relates to the source fields. filename is also left undocumented.

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 opening sentence says 'Append a document to an existing Draft,' giving a specific verb, direct object, and state (existing, not new). This is clearly distinct from sibling actions like creating a template, sending a draft, or updating draft metadata.

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 gives explicit selection rules: exactly one of document_base64, document_url, or template_id, plus role_mapping only for templates and a name restriction for multi-document templates. It does not explicitly name alternatives among sibling tools, but the tool's own input-selection guidance is strong enough to guide invocation.

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