Skip to main content
Glama

convert_document

Convert Word, Excel, or PowerPoint documents to PDF, Markdown, HTML, CSV, or JSON while preserving structure. Specify input path and target format; PDF conversion requires office2pdf or LibreOffice.

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)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changed
    • addedInput schema / $defs / ToolOptions / properties / action
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "compare",
      +        "snapshot",
      +        "list_snapshots",
      +        "restore"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Sub-operation for compare_documents: \"compare\" (default) diffs two documents; \"snapshot\" records path_a state; \"list_snapshots\" lists recorded snapshots; \"restore\" writes a snapshot back to path_b.",
      +  "title": "Action"
      +}
    • addedInput schema / $defs / ToolOptions / properties / snapshot_dir
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Directory to store/read document snapshots (default: ~/.tianshang-scribe/snapshots/).",
      +  "title": "Snapshot Dir"
      +}
    • addedInput schema / $defs / ToolOptions / properties / snapshot_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Snapshot identifier used by the restore action.",
      +  "title": "Snapshot Id"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "convert_documentDictOutput",
      +  "type": "object"
      +}
  2. First observedv0.3.0

TDQS

A4.4/5.0
Behavior3/5

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

The description discloses that the tool writes a converted file to output_path, and notes a dependency for PDF conversion. However, it does not mention overwrite behavior, idempotency, or failure modes. Since annotations provide no hints (all false), the description bears the burden, and it provides some but not comprehensive behavioral transparency.

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 two sentences with no fluff, front-loading the core purpose and including necessary caveats and alternatives.

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 main functionality, dependencies, and provides an alternative tool for reading content. It does not describe the options parameter (shared across tools) or return values, but the output schema exists, and the schema covers the options. Given the complexity, it is reasonably complete, though it could mention overwrite semantics.

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 description adds meaning beyond the schema by specifying which target formats are valid per source type (e.g., CSV/JSON only for Excel, Markdown only for Word). It also clarifies the default output_path behavior. This goes beyond the schema's generic descriptions.

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 verb 'Convert', the resource 'document between formats', and enumerates specific source-target combinations (Word, Excel, PowerPoint to various formats). It also distinguishes itself from the sibling tool extract_document_data by explicitly saying to use that for reading content instead.

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 when-not-to-use guidance: 'To read content for analysis instead, use extract_document_data.' It also mentions the prerequisite for PDF conversion (office2pdf or LibreOffice), which guides the agent on environment requirements. This is clear context.

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

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