Skip to main content
Glama

captain-legal

Generate document preview

generate_document
Idempotent

Generate a draft of the document from the user's answers. Returns a free watermarked PDF preview and the exact price. Validates all answers against the encoded national rules first — if validation fails, you get structured errors to relay to the user. Also returns what is NOT covered by the automated checks: always relay the not_covered items to the user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
answersYesAnswers keyed by field id, exactly as returned by get_requirements
countryYes
languageNo
document_typeYes

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=true, destructiveHint=false), the description discloses key behaviors: national rules validation, structured errors, the return of a watermarked PDF and price, and the not_covered items that must be relayed. This adds substantial value over the annotations alone.

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 three focused sentences, front-loaded with the primary purpose and followed by critical output/error details. Every sentence earns its place with no redundancy or vague filler.

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?

With no output schema, the description covers the main return values (preview, price, errors, not_covered items) well. However, it omits a prerequisite like calling get_requirements first, and does not explain the user workflow beyond the immediate generation step, so it is not fully complete.

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

Parameters2/5

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

Schema description coverage is low at 25% (only 'answers' has a description), and the description does not compensate. It references 'answers' but provides no explanation of document_type, country, or language, leaving agents to infer their meaning from names and patterns.

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 uses a specific verb and resource: 'Generate a draft of the document from the user's answers.' It clearly distinguishes this from siblings like purchase_document by framing it as a preview that includes a price and watermarked PDF.

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 clearly establishes the context: generate a draft from user answers and relay validation errors or not_covered items. It does not explicitly name alternatives or exclusions, but the purpose and workflow are strongly implied, so it earns a 4 rather than a 5.

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.4/5.0
Disambiguation5/5

Each tool has a unique role in the document creation pipeline: list_document_types for discovery, get_requirements for gathering inputs, generate_document for drafting, purchase_document for buying, and get_document_status for tracking. No two tools overlap in purpose, minimizing misselection risk.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern: generate_document, get_document_status, get_requirements, list_document_types, purchase_document. The verbs are clear and predictably structured.

Tool Count5/5

Five tools is well-scoped for a legal document generation service, covering the essential workflow without unnecessary additions. The count feels natural for the domain and avoids bloat.

Completeness5/5

The tools cover the full user journey: discover available document types, fetch required questions, generate a draft, purchase the final document, and check order status. No critical step in the core workflow is missing, making the set functionally complete.

Resources