Skip to main content
Glama

Download Signed Document

download_signed_document
Destructive

Download the sealed, signed PDF. Takes the completed_document_id from get_envelope_status; the original document_id also works and resolves to that document's most recent completed session. Returns the bytes as content_base64 with content_type from the HTTP response. PDF responses also include pdf_base64 (same bytes). MCP clients truncate large tool responses, so for anything beyond a page or two prefer download_url: a short-lived bearer URL (valid until download_url_expires_at) that serves the same bytes with no Authorization header — pass it to the user or fetch it directly. Requires Authorization: Bearer zs_....

document_id: one of `documents[].id` from get_envelope_status to download
just that document (its pages plus the certificate pages — an extract;
the certificate hash identifies the full envelope). `format='pdf'` (the
default) returns the combined signed PDF; `format='zip'`: every document
as its own PDF in one archive (`application/zip`).

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": {
      "completed_document_id": "<completed_document_id>"
    },
    "name": "download_signed_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNo
document_idNo
completed_document_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / document_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Document Id"
      +}
    • addedInput schema / properties / format
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Format"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior2/5

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

The description adds substantial real-world behavior beyond the annotations: bearer auth is required, the URL is short-lived and expires at `download_url_expires_at`, no Authorization header is needed for that URL, and large payloads get truncated. However, it describes a pure read/retrieval operation while the annotations declare readOnlyHint=false and destructiveHint=true, which will mislead an agent about side effects and confirmation needs.

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 core action and the truncation caveat are front-loaded, and the second paragraph is dedicated to parameter semantics rather than mixed in. It is on the long side, but nearly every clause carries operational information; only the repeated mention of base64 fields overlaps with what the output schema already declares.

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 three-parameter download tool with an output schema, everything an agent needs is present: required auth, identifier provenance, format semantics, truncation risk, and an alternative retrieval path with its expiry. Return fields are described only where useful because an output schema exists.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does: it maps `completed_document_id` to get_envelope_status, explains that `document_id` resolves to the most recent completed session and yields an extract whose certificate hash identifies the full envelope, and defines `format` values with defaults and output types.

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 gives a specific verb and resource ('Download the sealed, signed PDF') and immediately distinguishes the scope from download_certificate by naming the PDF bytes as the return. It also states the accepted identifiers up front, so an agent can tell this apart from the other download tool without opening a schema.

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?

Explicit routing guidance is given for both major decision points: use `download_url` instead of inline bytes because 'MCP clients truncate large tool responses', and use `completed_document_id` from get_envelope_status versus `document_id` when only one document (an extract) is wanted. The format='pdf' vs 'zip' choice is also spelled out with the resulting content type.

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