Skip to main content
Glama

Prepare Document

prepare_document
Destructive

Place signature, initials, date, and printed-name fields on an untagged PDF. Provide document_base64 or an https document_url (max 10MB). Optional signers hints: [{"name", "email", "role", "order"}]. Until the user has approved one preview, every call returns status preview with confidence, reasons, fields, pages, and prepare_id, and no PDF. pages lists each page's visible area (x, y, width, height) in the same coordinates a field position uses. Show it to the user, then call again with that prepare_id and approve true to get pdf_base64. A prepare_id expires 15 minutes after the preview; approve within that window or call prepare_document again. After that first approval, a call returns status ready and pdf_base64 when confidence is at least 0.85, and a preview otherwise. Creates no envelope and charges no credit. Radio and checkbox are not placed. A filled form field that is not a zSign tag is a 422 with code filled_form_field. Encrypted PDFs are refused. Flatten or clear filled form fields first, since zSign may not catch every one. An encrypted PDF is a 422 with code pdf_encrypted. An expired prepare_id is a 404 with code prepare_expired. An unknown prepare_id is a 404 with code prepare_not_found. Requires Authorization: Bearer zs_....

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "prepare_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
approveNo
signersNo
prepare_idNo
document_urlNo
document_base64No

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Against annotations that only mark destructiveHint=true and openWorldHint=true, it adds substantial behavior: the preview/approve state machine, the 0.85 confidence gate, a 15-minute prepare_id expiry, and the absence of credit charges. It also documents auth ('Authorization: Bearer zs_...'). It loses a point only because the effect of the approve call on the underlying document (whether the placed fields persist server-side or only in the returned pdf_base64) is never stated.

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 workflow constraint is front-loaded and nearly every sentence carries operational detail. The one real waste is the duplicated encryption warning: 'Encrypted PDFs are refused.' followed later by 'An encrypted PDF is a 422 with code pdf_encrypted.' The status/error-code sentences could also be consolidated into a tighter block.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter mutation tool with the highest-risk annotation profile, nothing an agent needs to call it correctly is missing: input sourcing, the preview-approval loop, expiry, confidence threshold, and the exact 404/422 failure codes. An output schema exists, so the description's status narration is bonus context rather than a gap fill.

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 0%, so the description must carry all five parameters, and it mostly does: document_base64 vs an https document_url with a 10MB cap, prepare_id's expiry and its two distinct 404 codes, and approve's effect on the response. The signers hint is only given as a bare key list ('name', 'email', 'role', 'order') with no explanation of what role or order control, leaving that one parameter partly opaque.

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 opens with a specific verb and resource: 'Place signature, initials, date, and printed-name fields on an untagged PDF.' It also carves out scope that separates it from neighboring tools ('Creates no envelope and charges no credit'), so an agent can tell this is a field-placement/prep step, not an envelope send.

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?

It spells out the required two-phase flow precisely: every call before approval returns a preview with prepare_id and no PDF, and the agent must show it to the user then re-call with approve true. It also gives explicit when-not conditions (radio/checkbox not placed, flatten filled form fields first, encrypted PDFs refused) rather than leaving them to inference.

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