Skip to main content
Glama

US Economic, SEC EDGAR & On-Chain Data (x402)

Tabular to JSON

tabular_to_json
Read-onlyIdempotent

Convert messy tabular text into clean, typed JSON rows. Auto-detects CSV, TSV, or a Markdown table and returns one JSON object per row plus an inferred column/type summary. Pure deterministic compute — no network or model calls.

What it handles: delimiter sniffing (comma/semicolon/tab/pipe), quoted fields with embedded commas and newlines, BOM, ragged rows (padded/truncated), Markdown separator rows and escaped pipes, header auto-detection, and per-column type inference (integer/number/boolean/null/string).

When to use: you have CSV/TSV/Markdown-table text (often emitted by tools or LLMs) and want structured, typed rows — optionally validated/coerced against a JSON Schema.

When NOT to use: the data is already clean JSON, or it is HTML/xlsx/binary (not supported).

Args:

  • input (string, required): raw tabular text.

  • format ("auto"|"csv"|"tsv"|"markdown", default "auto"): force a format or auto-detect.

  • hasHeader ("auto"|"true"|"false", default "auto"): whether the first row is a header.

  • inferTypes (boolean, default true): coerce cells to number/integer/boolean/null; else keep strings.

  • schema (object, optional): JSON Schema (draft 2020-12) to validate/coerce each row object against.

Returns structuredContent: { "ok": boolean, // false if the input cannot be parsed as a table "format": "csv"|"tsv"|"markdown", "columns": [{ "name": string, "type": string }], "rows": [{ ... }], // one object per row, keyed by column name "rowCount": number, "changed": boolean, // true if any normalization/coercion happened "errors": string[], // actionable messages when ok is false "repairs": string[] // description of each normalization applied }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesRaw tabular text: a CSV/TSV block or a Markdown table.
formatNoForce a parser or auto-detect (default 'auto').auto
schemaNoOptional JSON Schema (draft 2020-12) to validate/coerce each row object against.
hasHeaderNoWhether the first row is a header. 'auto' uses a heuristic.auto
inferTypesNoWhen true (default), infer cell types (number/integer/boolean/null); else keep strings.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesTrue if the input parsed as a table (and every row is schema-valid when a schema was given).
rowsYesOne JSON object per data row, keyed by column name.
errorsYesActionable error messages when ok is false (empty when ok is true).
formatYesThe detected/used format.
changedYesTrue if any normalization or coercion changed the input.
columnsYesInferred column names and types.
repairsYesHuman-readable description of each normalization applied.
rowCountYesNumber of data rows returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already indicate read-only, idempotent, and non-destructive behavior. The description adds meaningful behavioral context: 'Pure deterministic compute — no network or model calls' and details about handling BOM, ragged rows, quoted fields, and type inference. It also describes the return envelope (ok, format, columns, rows, rowCount, changed, errors, repairs) beyond what annotations provide.

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 well-structured with sections: summary, What it handles, When to use, When NOT to use, Args, and Returns. It is appropriately detailed for a tool with 5 parameters and a structured output, with the main purpose stated in the first sentence.

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?

Given the tool's complexity, the description is thorough. It covers input and output formats, edge cases (quoted commas, BOM, ragged rows), parameter behaviors, and the exact structure of the returned object. There is no gap that would leave an agent uncertain about invocation or results.

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 coverage is 100%, so baseline is 3. The description lists each argument but largely restates the schema descriptions (e.g., format default, inferTypes behavior). It adds no significant semantic nuance beyond what the schema already provides, though it does embed the Args list in a readable format.

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 opens with 'Convert messy tabular text into clean, typed JSON rows,' providing a specific verb, resource, and output. It clearly distinguishes itself from siblings by detailing supported formats (CSV/TSV/Markdown) and explicitly stating it is not for pure JSON or binary inputs.

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 includes explicit 'When to use' and 'When NOT to use' sections, naming alternatives like clean JSON and unsupported formats (HTML/xlsx/binary). This provides clear context for choosing this tool over other siblings such as structured_json_repair.

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.