Skip to main content
Glama

convert_to_xlsx

Idempotent

Convert Markdown tables into Excel spreadsheets. Extracts pipe-tables and creates XLSX files with each table as a dedicated worksheet, turning Markdown content into formatted workbooks for data analysis.

Instructions

Convert Markdown tables to a Microsoft Excel XLSX spreadsheet. Parses GFM pipe-tables from the input and creates an Excel workbook. Each table becomes a sheet in the workbook. Non-table content is ignored. If the Markdown contains no tables, produces an empty workbook. This is a binary format — output_path should almost always be provided. Side effects: when output_path is provided, writes the XLSX binary to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns JSON { format: 'xlsx', file_size_bytes, hint, base64_preview }. Returns: JSON write-confirmation (if output_path set), or JSON binary-guidance object (if omitted). Use this when you need a full Excel file with formatting. Prefer convert_to_csv for lightweight plain-text tabular export, or convert_to_json for structured programmatic access.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
markdownYesThe raw Markdown source text to convert. Supports GitHub-Flavored Markdown (tables, task lists, strikethrough) and KaTeX math expressions. Pass the full document content as a string, not a file path.
output_pathNoOptional. Absolute or relative file path (e.g. './output.xlsx') where the binary file will be saved. Parent directories are created automatically. If provided, the file is written to disk and a JSON summary with { success, file_path, file_size_bytes, format } is returned. If omitted, a JSON object with { format, file_size_bytes, hint, base64_preview } is returned — the hint will instruct you to call the tool again with output_path to save the file. Binary formats (XLSX) should almost always specify output_path.
Behavior5/5

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

Discloses critical side effects beyond annotations: file system mutations ('writes the XLSX binary to disk', 'creates parent directories, overwrites existing files'). Explains dual return modes (disk write vs JSON binary-guidance object) and edge case behavior ('If the Markdown contains no tables, produces an empty workbook'). Annotations confirm idempotency and non-destructive nature; description adds implementation details.

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?

Every sentence is load-bearing: purpose → parsing mechanics → edge cases → binary nature warning → side effects → return schema → sibling differentiation. No tautology or repetition of schema/annotation data. Information-dense structure guides agent through decision tree efficiently.

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?

Absence of output schema is fully compensated by detailed return value documentation covering both branches (output_path provided vs omitted). Binary format complexities, side effects, and sibling ecosystem context are comprehensively addressed for a conversion utility.

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 100%, establishing baseline 3. Description adds critical operational semantics: warns that output_path 'should almost always be provided' for binary formats and details the two-stage workflow (preview then save) when omitted. Elevates understanding beyond raw schema definitions.

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?

Opens with specific verb-noun sequence ('Convert Markdown tables to... XLSX spreadsheet'), clearly identifies input resource (Markdown pipe-tables) and output format. Explicitly distinguishes from siblings convert_to_csv and convert_to_json by prescribing specific use cases ('lightweight plain-text' vs 'full Excel file with formatting').

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?

Explicitly states when to use ('when you need a full Excel file with formatting') and provides named alternatives with precise differentiators ('Prefer convert_to_csv for lightweight plain-text...or convert_to_json for structured programmatic access'). Also clarifies output_path as mandatory for binary workflows ('almost always be provided').

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/XJTLUmedia/MCP_Markdown_Formatter'

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