Skip to main content
Glama

Convert CSV, XLSX or text PDF to JSON

convert_document
Read-onlyIdempotent

Decant: Convert an uploaded file (file_base64) or public URL: CSV and XLSX become JSON rows per sheet; text PDFs become text per page. Up to 5 MB decoded, 20,000 rows per sheet; no OCR, PDF table grids or schema extraction. No account or API key; free within the shared daily limit. Files are sent to Decant, processed in memory and not stored. URL fetching honours robots.txt. Send exactly one input; local files need not be published. For a large file, pass limit (and offset) to page the rows, since many hosts show only part of a long tool result. Raw-upload HTTP is also available.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "convert_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPublic HTTP(S) file URL; omit when sending file_base64
limitNoAt most this many rows per sheet; row_count stays the total and next_offset is where the next page starts. Omit for every row
sheetNoOnly this XLSX sheet, if specified
offsetNoFirst row of each sheet to return (0-based), to page a large file
filenameNoOptional filename with .csv, .xlsx or .pdf extension for type detection; not a filesystem path
file_base64NoFile bytes encoded as standard padded base64 (up to 5 MB decoded); not a path or data URL. Use instead of url.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "At most this many rows per sheet; row_count stays the total and next_offset is where the next page starts. Omit for every row",
      +  "maximum": 20000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "First row of each sheet to return (0-based), to page a large file",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
  2. Changed4 schema fields changed
    • addedInput schema / properties / file_base64
      Added value: +{
      +  "description": "File bytes encoded as standard padded base64 (up to 5 MB decoded); not a path or data URL. Use instead of url.",
      +  "maxLength": 6990508,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / filename
      Added value: +{
      +  "description": "Optional filename with .csv, .xlsx or .pdf extension for type detection; not a filesystem path",
      +  "maxLength": 200,
      +  "type": "string"
      +}
    • changedInput schema / properties / url / description
      Previous value: -"Public HTTP(S) URL of a file you have the right to process"New value: +"Public HTTP(S) file URL; omit when sending file_base64"
    • removedInput schema / required
      Removed value: -[
      -  "url"
      -]
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses size and row caps (5 MB decoded, 20,000 rows per sheet), the shared daily limit, that no account or key is needed, that files are processed in memory and not stored, and that URL fetching honours robots.txt. That is substantive operational context an agent could not infer from the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core capability and the input rule are front-loaded, and each clause carries usable information. It is dense but readable; a few asides (free daily limit, raw-upload HTTP alternative) are secondary and slightly dilute the block.

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?

With no output schema, the description still conveys the return shape (rows per sheet, text per page, row_count and next_offset for paging) along with limits and privacy behaviour. For a six-parameter conversion tool this covers everything needed to call it correctly.

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%, so baseline is 3; the description adds real meaning on top by explaining exactly one of file_base64/url must be sent, that limit paging keeps row_count as the total with next_offset for the next page, and that filename is a hint rather than a path. The remaining parameters (sheet, offset) are left to the schema.

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 (convert an uploaded file or URL) and names the exact transformations: CSV/XLSX to JSON rows per sheet and text PDFs to text per page. That is specific enough to distinguish it from siblings such as extract_web_page or the financial-facts tools without opening the schema.

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 gives explicit input-selection guidance ('Send exactly one input', 'local files need not be published') and clear exclusions ('no OCR, PDF table grids or schema extraction'), plus when to page with limit/offset. It stops short of naming a sibling alternative for HTML pages, which extract_web_page presumably covers.

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