Skip to main content
Glama

Convert file to PDF

convert_document

Convert a file you already hold — .docx, .xlsx or .csv — into a PDF, preserving its existing content. Pass the bytes base64-encoded together with the original filename, which is what the API uses to detect the input type. This is the inbound direction: it consumes an existing document, whereas render_docx / render_xlsx / render_pptx GENERATE new documents from structured data, and render_pdf builds one from a template. Returns a stored render { id, url, bytes, durationMs, name } whose id can be fed straight into merge_pdfs, split_pdf, edit_pdf, create_signature_request or create_envelope. Counts one render against the monthly quota. Files over 10 MB are refused by this tool because the bytes travel through the tool call. Requires a Kamy API key with the render scope; without a key, returns dashboard setup instructions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoLabel for the resulting render row. Defaults to the source filename.
filenameYesSource filename including its extension — the route detects the input type from it. Must end in .docx, .xlsx or .csv.
fileBase64YesBase64-encoded bytes of the source file.

TDQS

A5/5.0
Behavior5/5

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

The description discloses several behavioral aspects beyond annotations: the direction (inbound conversion vs. generation), the file size limit (10 MB), quota impact (counts against monthly render quota), and authentication requirement (Kamy API key with `render` scope) with a fallback behavior. Annotations are minimal (readOnlyHint: false, destructiveHint: false), so the description carries the full burden and does so thoroughly, far exceeding what annotations alone provide.

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 a single paragraph of 6 sentences, each serving a distinct purpose: defining the action, explaining how input type detection works, distinguishing from generator siblings, describing the return value and downstream usage, noting quota and size constraints, and specifying authentication requirements. Nothing is redundant, and all information is essential and well-ordered, earning every sentence its place.

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

Completeness5/5

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

Despite having no output schema, the description provides a complete picture: it lists the return fields (id, url, bytes, durationMs, name), explains the conversion direction and constraints, covers quota and authentication, and links to sibling tools for downstream operations. The parameter richness (3 params, 100% coverage) and sibling context are fully leveraged to make the description self-sufficient for agent understanding.

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

Parameters5/5

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

Schema description coverage is 100%, so baseline is 3, but the description adds significant value by explaining the relationship between filename and input type detection, clarifying that the name parameter defaults to the source filename, and describing the purpose of fileBase64 (pass bytes base64-encoded). This transforms basic schema definitions into actionable guidance, fully compensating for any potential ambiguity.

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 clearly states the tool converts .docx, .xlsx, or .csv files to PDF, specifying the verb 'Convert', the resource 'file', and the output format. It distinguishes this tool from siblings like render_docx (which generate new documents from structured data) and render_pdf (builds from a template), making its purpose unambiguous and unique.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool versus alternatives, naming render_docx, render_xlsx, render_pptx, and render_pdf as tools that generate documents rather than convert existing ones. It also explains that the returned id can be fed into merger/split/sign tools, and flags the constraint that files over 10 MB are refused because bytes pass through the tool call. This covers both when-to-use and when-not-to-use scenarios comprehensively.

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 targets a distinct action or resource with minimal ambiguity. For example, `render_pdf`, `render_docx`, `render_xlsx`, and `pptx` are clearly different output formats, while `merge_pdfs`, `split_pdf`, and `edit_pdf` target different PDF operations. The signature tools (`create_signature_request`, `get_signature_request`, etc.) are also clearly separated by lifecycle stage. No two tools appear to do the same thing.

Naming Consistency5/5

Tool names follow a highly consistent `verb_noun` pattern throughout, such as `create_signature_request`, `get_signature_request`, `list_signature_requests`, and `remind_signature`. This pattern is applied uniformly across all major domains (render, signature, template, webhook, trace), making the API predictable and easy for an agent to navigate.

Tool Count4/5

With 59 tools, this is a large surface area, but it is justified by the breadth of functionality: document rendering in multiple formats, e-signatures, template management, webhooks, scheduling, and a crypto/audit trail. While large, each tool has a distinct purpose, and the count feels appropriate for the scope of a comprehensive document automation API. A surface this large risks being overwhelming, but the internal organization is logical.

Completeness5/5

The tool surface is remarkably complete, covering the full lifecycle for multiple domains. For e-signatures, there are tools for CRUD (requests, templates), sending (individual, bulk, envelope), monitoring (get, list), reminders, and certificates. For documents, it covers creation, conversion, editing, merging, splitting, and verification. The inclusion of utility tools like `get_started`, `validate_payload`, and the audit trail tools further solidifies this as a well-considered, production-ready API surface.