Skip to main content
Glama

Prepare a form from documents

prepare_form

Prepare a form from documents: a proposal of every answer with its source, what is missing, and where documents disagree, before writing, plus attachments for a package. Same inputs as fill_form_from_context (form_id for a form already in the library, or pdf_url/pdf_base64 for a new one, plus context_text and/or context_urls), but nothing is written into the PDF: read the proposal, answer what is missing, then commit. policy is safe (write high and medium confidence) or strict (high only). Returns a job_id and a proposal_id; poll get_job about every 20 seconds. Billed as one context fill; the first 5 each month are free. Optional retention: ephemeral or account_default (default: the account's own setting); it applies only when this call creates the form (pdf_url, pdf_base64 or library), since an existing form keeps the setting it was created with. Ephemeral processing: source and output documents are deleted 60 to 70 minutes after the last activity on a form. Pass dry_run=true to rehearse this call without doing it: nothing is stored, charged or sent, and no AI is used. The answer says whether the real call would succeed or be refused, what it would cost, and what a rehearsal cannot check.

Input Schema

NameRequiredDescriptionDefault
policyNosafe
dry_runNo
form_idNo
libraryNo
pdf_urlNo
retentionNo
pdf_base64No
context_textNo
context_urlsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "context_text": "Hopper Analytical LLC, EIN 12-3456789, 1 Navy Way, Arlington, VA 22202.",
      -    "library": "irs-w-9",
      -    "policy": "safe"
      -  }
      -]New value: +[
      +  {
      +    "context_text": "Hopper Analytical LLC, EIN 12-3456789, 1 Navy Way, Arlington, VA 22202.",
      +    "library": "irs-w-9",
      +    "policy": "safe"
      +  },
      +  {
      +    "context_text": "Hopper Analytical LLC, EIN 12-3456789, 1 Navy Way, Arlington, VA 22202.",
      +    "dry_run": true,
      +    "library": "irs-w-9",
      +    "policy": "safe"
      +  }
      +]
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "default": false,
      +  "title": "Dry Run",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "context_text": "Hopper Analytical LLC, EIN 12-3456789, 1 Navy Way, Arlington, VA 22202.",
      +    "library": "irs-w-9",
      +    "policy": "safe"
      +  }
      +]
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations mark this as a non-readonly, non-destructive, non-idempotent write, and the description adds substantial context beyond them: nothing is written into the PDF, billing (one context fill, first 5 per month free), polling cadence (~20s via get_job), retention semantics including ephemeral deletion at 60-70 minutes, and exactly what dry_run does and does not verify. This is unusually complete behavioral disclosure.

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?

Front-loads purpose and the key distinction in the first clause, and each subsequent sentence carries non-redundant information (billing, retention, dry_run). It is dense and runs as a single block rather than being broken into scannable segments, which slightly hurts fast parsing of a long description.

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?

An output schema exists, and the description still orients the agent on what comes back (job_id, proposal_id) and how to poll. Combined with billing, retention, and dry_run coverage, an agent has everything needed to call this correctly, including cost and side-effect expectations.

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% across 9 parameters, so the description carries the burden and largely meets it: it enumerates policy values (safe writes high+medium confidence, strict high only), retention values (ephemeral vs account_default, with the rule that it only applies when this call creates the form), dry_run semantics, and the input identifiers (form_id/library vs pdf_url/pdf_base64, context_text/context_urls). It stops short of individually defining context_urls or the base64 format, so not quite a 5.

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?

States a specific verb and resource ('Prepare a form from documents') and immediately defines the distinguishing behavior: it produces a proposal of every answer with its source, gaps, and disagreements rather than writing. Contrasts explicitly with the sibling fill_form_from_context, so an agent can differentiate without opening either 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?

Gives an explicit workflow ('read the proposal, answer what is missing, then commit') and names the sibling that writes directly (fill_form_from_context) versus this one that doesn't. Also explains dry_run as a rehearsal path and how to use it before committing.

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.