Skip to main content
Glama

Fill a PDF template

anvil_fill_pdf
Destructive

Fill an Anvil PDF template (cast) with data and return the finished PDF as base64. REST: POST /fill/{castEid}.pdf. Returns { filename, byteLength, pdfBase64 }. The data object's keys are the template's field aliases.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesObject mapping the template's field aliases to values, e.g. { "name": "Sam", "date": "2026-07-16" }.
titleNoOptional title embedded in the generated PDF metadata.
cast_eidYesThe cast (PDF template) eid to fill (from anvil_get_cast).
fontSizeNoOptional default font size for filled text.
textColorNoOptional default text color as a hex string, e.g. #333333.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior1/5

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

The description implies a read operation ('returns the finished PDF'), while the annotation destructiveHint: true indicates mutation. This contradiction undermines transparency. No additional behavioral context (e.g., side effects, permissions) is provided beyond annotations.

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 covering purpose, REST endpoint, and data key meaning. Front-loaded and free of unnecessary words or repetition.

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?

Explains return format (filename, byteLength, pdfBase64) and the `data` parameter's role. Lacks details on error behavior (e.g., invalid cast_eid) but sufficient given high schema coverage and no output schema.

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?

Schema description coverage is 100%, so the schema already documents all parameters. The description reinforces the `data` object's role but adds minimal new meaning. Baseline 3 reflects adequate but not exceptional contribution.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool fills a PDF template with data and returns base64 PDF. It specifies the action, resource (cast/template), and output format. However, it does not explicitly differentiate from sibling tools like anvil_generate_pdf, which could cause confusion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. Sibling tools are listed but no usage context provided. Agent must infer from names and descriptions alone.

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.