Skip to main content
Glama

Export a PDF

compile_pdf
Read-onlyIdempotent

Compile a PDF with the Rust compiler. Supply exactly one of document or markdown. The document needs a title and at least one author. Returns the PDF as a base64 application/pdf resource.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "compile_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataNoExtra template metadata, such as {country} for ACM.
documentNoThe Publisle document: an object with schemaVersion and blocks, as returned by the other tools.
markdownNo
templateNoA template id from list_templates. Defaults to article.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations (readOnly, idempotent, open-world), the description discloses the return payload format (base64 `application/pdf` resource) and two validation preconditions the schema does not encode. That is real added context for a tool whose annotations already cover the safety profile.

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?

Three short sentences, front-loaded with the verb and resource, followed by the input constraint and return format. The phrase "with the Rust compiler" is implementation detail that adds little selection value, but it is minor and plausibly aids error interpretation.

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 four parameters, nested objects, and no output schema, the description does the right work: it explains the return value, the either/or input rule, and the document prerequisites. It stops short of explaining how `template` or `data` affect the output, but those are covered by schema descriptions.

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 75%, so `data` and `template` are already documented in structured fields. The description still contributes the crucial mutual-exclusivity constraint between `document` and `markdown` and the required contents of `document`, neither of which appears in the schema (both properties are listed as optional).

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?

The description names a specific verb and output artifact — compile a PDF — which immediately separates it from render_html and export_markdown. It does not explicitly say how it differs from those siblings, so an agent must infer that this is the PDF-producing path.

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

Usage Guidelines3/5

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

Usage is implied by the exclusivity rule ("Supply exactly one of `document` or `markdown`") and the input requirement (a title and at least one author), which tells the agent what a valid call looks like. There is no explicit statement of when to prefer this over render_html or export_markdown, and no exclusions.

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.

Resources