Skip to main content
Glama

render_referral_letter

Render a doctor-to-specialist referral letter as a PDF, auto-generating missing fields and returning both the PDF and completed structured content.

Instructions

Render a referral letter from a referring doctor to a specialist as a PDF. Write the letter content like a real referral letter: every section is plain text in the letter language, and empty sections are left out. Leave patient, sender and recipient fields empty to have them generated; set patient to null for a letter without patient details. Salutation, opening sentence, closing, signature and stamp are added automatically. Returns the PDF as an embedded resource and the completed letter (with generated fields) plus the seed as structured content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
letterYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose non-obvious behavior: salutation, opening sentence, closing, signature and stamp are added automatically, missing fields are generated, and caller content is never translated. It omits failure modes, validation errors, and any limits on letter size or rendering, which keeps it short of a 5.

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?

Five tight sentences, front-loaded with the purpose before the field-filling rules and the return shape. It borders on dense but every sentence carries information an agent needs; nothing is padding.

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 and no annotations, the description steps in to describe the return payload (PDF as an embedded resource plus the completed letter and seed as structured content), which is exactly the missing piece. It is not exhaustive about error conditions, but it is complete enough to invoke correctly.

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?

The reported 0% coverage is a top-level artifact: the sole top-level parameter is a $ref whose nested $defs document nearly every field, so the baseline is high. The description still adds value by summarizing the generate-if-missing and null semantics and by explaining that empty sections are omitted, though it does not touch the required fields (reason, recipient_specialty) or the language/seed parameters.

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 first sentence states a specific verb and resource ('Render a referral letter ... as a PDF') with source and target roles made explicit (referring doctor to specialist). There are no sibling tools to disambiguate from, and the opening clause leaves no doubt about what the tool produces.

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 concrete calling guidance: leave patient/sender/recipient empty to have them generated, set patient to null for a letter with no patient block, and write sections as plain text in the letter language. It does not discuss alternatives or exclusions, but none exist in this toolset, so the gap is minor.

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

Deploy Server

Other Tools