Skip to main content
Glama

Decant: convert CSV, XLSX and PDF to JSON; web page extraction that honours robots.txt

Convert CSV, XLSX or text PDF to JSON

convert_document
Read-onlyIdempotent

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?

Annotations already cover safety (readOnly, idempotent, non-destructive, openWorld), yet the description adds substantial context beyond them: the 5 MB / 20,000-row ceilings, no auth requirement, a shared daily rate limit, in-memory processing with no storage, robots.txt compliance when fetching URLs, and the practical caveat that hosts truncate long tool results. That last point directly explains why paging exists, which no annotation conveys.

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?

It is front-loaded with the core conversion behavior before limits, exclusions, auth, privacy, and paging, so a reader can stop early. The semicolon-dense middle section is slightly packed, but nearly every clause carries decision-relevant information and there is no filler.

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?

There is no output schema, so the description carries the burden of explaining returns, and it does: JSON rows per sheet for CSV/XLSX, text per page for PDFs, with row_count/next_offset detailed in the schema. For a six-parameter, no-auth conversion tool, nothing an agent needs in order to call it correctly is missing.

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 the schema already documents each parameter and the baseline is 3. The description still adds meaning: the exactly-one-of-url/file_base64 constraint, the rationale for limit/offset (host result truncation), and the clarification that local files need not be published before conversion.

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 ... CSV and XLSX become JSON rows per sheet; text PDFs become text per page'), including the exact output shape per input format. An agent can immediately tell this apart from siblings like extract_web_page or retrieve_deliverable, which do not convert local base64 files into structured rows.

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 selection rules ('Send exactly one input; local files need not be published') and clear when-not conditions ('no OCR, PDF table grids or schema extraction'), plus paging guidance ('For a large file, pass limit (and offset)'). It stops short of naming a specific sibling tool as an alternative, offering only the vague note that 'Raw-upload HTTP is also available', so it misses the top of the scale.

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