Skip to main content
Glama

convert_document

Convert Word, Excel, or PowerPoint documents to PDF, Markdown, HTML, CSV, or JSON while preserving structure. Writes converted file to specified output path.

Instructions

Convert a document between formats while preserving structure where possible: Word (.docx) to PDF/Markdown/HTML, Excel (.xlsx) to PDF/CSV/JSON/HTML, PowerPoint (.pptx) to PDF. Writes the converted file to output_path (default: .). PDF conversion requires office2pdf or LibreOffice to be installed. To read content for analysis instead, use extract_document_data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
optionsNoTool options.
input_pathYesPath to the source document.
output_pathNoOutput file path.
target_formatYesTarget output format: - "pdf": PDF document (requires office2pdf or LibreOffice) - "csv": Comma-separated values (Excel only) - "json": JSON array of rows (Excel only) - "html": HTML table (Excel) / styled HTML (Word) - "md"/"markdown": Markdown (Word only)
Behavior4/5

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

With annotations all false providing no safety or idempotency cues, the description carries the burden. It adds valuable behavior: 'preserving structure where possible' sets expectations about fidelity, 'Writes the converted file to output_path' explains output behavior, and the dependency on external tools for PDF is disclosed. It does not cover failure modes or overwrite behavior, but the disclosed traits go beyond the schema.

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 sentences that front-load the primary action and supported conversions, then cover output behavior, dependencies, and an alternative. Each sentence provides distinct, necessary information without waste.

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?

The description covers the essential context for a format-conversion tool: supported conversions, output path default, external dependencies, and the sibling tool for reading content. It omits return-value details, but since there is no output schema, that is a minor gap. Overall, it is complete enough for an agent to select and invoke the tool correctly.

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

Parameters3/5

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

Schema description coverage is 100%, and the schema's target_format description already details format-specific behavior and requirements. The tool description adds the default output_path convention ('<stem>.<target_format>'), which is useful, but most parameter meaning is already in the schema. This aligns with the baseline 3 for high schema coverage.

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 'Convert a document between formats' and enumerates specific source-to-target conversions (Word to PDF/Markdown/HTML, Excel to PDF/CSV/JSON/HTML, PowerPoint to PDF). It distinguishes itself from the sibling tool extract_document_data by explicitly directing users who want to read content to use that alternative.

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 clear context for when to use the tool, including format support and the dependency on office2pdf or LibreOffice for PDF conversion. It also gives an explicit alternative: 'To read content for analysis instead, use extract_document_data,' which serves as a when-not-to-use directive.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tianshang301/TianshangScribe'

If you have feedback or need assistance with the MCP directory API, please join our Discord server