Skip to main content
Glama

Convert a file to PDF

documents_convert_to_pdf

Turn a file in the store into a PDF: Word, Excel, PowerPoint, OpenDocument, RTF, CSV or text files, and Markdown or HTML. The PDF is a new file; the original stays. Costs $0.02 per call; nothing if it fails.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_id": "<file_id>"
    },
    "name": "documents_convert_to_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoName for the new file, e.g. "Quote 1042.pdf".
file_idYesA file in the store (files_upload or files_list give its file_id).
link_hoursNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare a non-read-only, non-destructive, non-idempotent operation, and the description adds important side-effect and cost details: a new PDF is created, the original remains, and calls cost $0.02 unless they fail. It does not explain the link_hours parameter or how the resulting file is accessed, but the behavioral disclosure is strong.

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 tight sentences front-load the conversion purpose, supported formats, side effects, and pricing. Every sentence carries useful information with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

It covers the core purpose, input formats, side effects, and cost, which is useful for a conversion tool. However, with no output schema, it should explain what link_hours controls and how the new PDF can be retrieved; that missing context leaves the definition only minimally 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?

The schema documents file_id and name, but link_hours has no schema description and the tool description never explains it. The description adds useful meaning about which input file types are accepted, but one of the three parameters is completely undocumented, leaving a significant gap.

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: turning a file already in the store into a PDF. It lists supported formats and distinguishes conversion from sibling operations like creating a PDF from scratch or merging PDFs.

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?

It clearly establishes that the input must be an existing stored file of a supported document type. It does not explicitly name alternatives such as documents_create_pdf or documents_merge_pdfs, but the conversion scope is clear.

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