Skip to main content
Glama

Render a document

render_document

Produce a real .docx or .xlsx file from structured content and return it as base64. Send format ("docx"|"xlsx") plus exactly ONE of: blocks (array of {type:"title"|"heading"|"text"|"mono"|"table", text, level?, headers?, rows?}), markdown (string), sheets (array of {name, rows:[{...}] or rows:[[...]] with columns:[...]}), or templateId + values. Optional filename. Free for the first 5 documents a month on an API key sent as X-API-Key, then $0.25 per document via x402 -- an unpaid call over that returns a real HTTP 402 challenge. Dry run free at POST /sandbox/execute/render-document. Full schema and limits: call list_offerings with section "documents".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNo
filenameNo
walletAddressNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries full burden, and it exceeds expectations: it discloses base64 return, pricing model (first 5 free then $0.25 via x402), the HTTP 402 challenge on unpaid overage, and a free dry-run endpoint. It also mentions auth via X-API-Key and limits reference, making the operational behavior clear.

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?

The description is dense but every sentence earns its place: core function, payload variants, pricing, failure mode, dry-run endpoint, and pointer to full docs. It front-loads the most important action and return format, then adds operational detail without redundancy. No filler or restatement of the tool name.

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?

For a tool with no output schema and no annotations, the description is unusually complete: it covers return format, input constraints, auth, rate/pricing, error behavior, and a sandbox endpoint. The only meaningful gap is walletAddress semantics (presumably for x402 payment), which could confuse an agent. The pointer to list_offerings for full schema mitigates the gap but does not fully close it.

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 coverage is 0%, so the description must compensate, and it does: it explains format, blocks with element subtypes, markdown, sheets with rows/columns, templateId+values, and optional filename. It misses walletAddress, which appears in the schema but is never described — an agent cannot infer its purpose from the description alone. The 'exactly one of' constraint is also only in prose, not in the schema.

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 states a specific verb and resource: 'Produce a real .docx or .xlsx file from structured content and return it as base64.' It clearly differentiates from siblings: save_document_template is about saving templates, list_offerings is about metadata, and this tool actually renders. The format enum and required payload variants leave no ambiguity about what the tool does.

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

Usage Guidelines4/5

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

The description gives explicit invocation requirements: send format plus exactly one of blocks, markdown, sheets, or templateId+values. It also clarifies the free-tier/payment conditions and points to list_offerings for full schema/limits. However, it does not explicitly contrast with siblings (e.g., when to use save_document_template instead), leaving some routing 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.

TDQS

A4.3/5.0
Disambiguation5/5

Each tool targets a distinct action: listing offerings, rendering a document, and saving a template. The only minor overlap is that render_document and save_document_template both accept blocks/sheets, but their purposes (output a file vs. store a layout) are clearly differentiated in the descriptions.

Naming Consistency5/5

All three tool names follow a consistent verb_noun pattern with snake_case: list_offerings, render_document, save_document_template. The naming is uniform and predictable.

Tool Count5/5

At 3 tools, this is at the lower end of the ideal range, but each tool earns its place: discovery, rendering, and template persistence. There are no redundant or superficial tools.

Completeness3/5

The core document rendering flow is covered, but template management is incomplete: you can save and use templates, yet there is no way to list, update, or delete saved templates. This creates a potential dead end when an agent needs to discover existing template IDs.

Resources