Skip to main content
Glama

build_document

Generate a document's PDF synchronously (up to 2 minutes). Check get_document before retrying a timed-out build to avoid duplicate versions.

Instructions

Generate the document's PDF. Runs synchronously and can take up to two minutes — do not retry a timed-out build without checking get_document first (the build may have completed; retrying creates another build version). Fails with 422 if the document is locked (approval flow complete).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDocument id (UUID)
narationNoOptional name for the build version
Behavior5/5

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

With no annotations provided, the description carries full burden. It discloses synchronous execution, two-minute runtime, the side effect of creating another build version on retry, and a specific error scenario (422 when locked). This is rich, non-obvious behavioral information.

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?

Two concise sentences front-load the core purpose, then pack crucial operational warnings (retry behavior, error condition) without fluff. Every sentence earns its place.

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?

Given the tool's complexity (long-running, possible timeouts, side effects) and lack of output schema, the description covers all critical aspects: synchronous nature, duration, retry policy, side effect of duplicate builds, and failure mode. It is exceptionally complete for a build operation.

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?

The schema already has 100% coverage for both parameters (id and naration). The description does not add any parameter-specific semantics beyond what is in the schema, so baseline 3 is appropriate.

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 'Generate the document's PDF' – a specific verb and object that immediately conveys the tool's function. This clearly distinguishes it from siblings like get_document (retrieval) and update_document (modification).

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?

Provides explicit guidance on when NOT to retry (after timeout) and tells the agent to check get_document first. Also mentions the 422 failure condition related to locked documents, giving actionable context for choosing this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/salsabeeljamal/wraft-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server