Skip to main content
Glama

CSV to JSON with type inference

csv_to_json
Read-onlyIdempotent

Convert CSV to JSON rows with per-column type inference (integer, number, boolean, null, string), delimiter auto-detection and a generated JSON Schema. Leading-zero codes (ZIP, CLABE) stay strings. Price: 0.01 USDC per successful call on Base via x402 (pass the signed payment in _meta['x402/payment']; failed calls are not charged). HTTP equivalent: POST https://json-canon-x402.fly.dev/v1/csv-to-json.

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": "csv_to_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
csvNoCSV text (UTF-8). Max 1 MiB, 20,000 rows, 512 columns.
headerNoFirst row holds column names.
outputNoobjects
delimiterNoAuto-detected among , ; TAB | if omitted.
csv_base64NoAlternative to 'csv': base64 bytes (UTF-8 or Latin-1).
infer_typesNoInfer integer/number/boolean/null per column.
null_valuesNoStrings treated as null (empty is always null).
parse_booleansNoMap true/false/yes/no/si to booleans.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description is free to add what they cannot: a per-call price, the x402 payment handoff via _meta['x402/payment'], and the fact that failed calls are not charged. It also discloses a real behavioral nuance — leading-zero codes stay strings. It stops short of describing error modes or the shape of the returned JSON Schema.

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?

Front-loaded with the core conversion capability, then constraints, then billing and transport in descending order of importance. Every clause carries distinct information; no filler.

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?

For an 8-parameter, zero-required, no-output-schema tool, the definition covers conversion semantics, limits, billing, and transport adequately. The main residual gap is that the response structure (rows plus generated JSON Schema) is only alluded to rather than described, and no output schema exists to fill that in.

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?

With 88% schema coverage the baseline is 3, but the description adds meaning the schema lacks: the exact inference type set, the leading-zero exception, and the undocumented _meta payment parameter that the caller must supply. It does not clarify the csv vs csv_base64 mutual exclusivity, which is 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?

States a specific verb and resource ('Convert CSV to JSON rows') plus the distinguishing capability (per-column type inference, delimiter auto-detection, generated JSON Schema). Nothing here could be confused with siblings like json_diff or validate_json.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the name and by the enumerated capabilities, and the HTTP-equivalent endpoint hints at the same operation outside MCP. However, there is no explicit when-to-use statement, no when-not guidance, and no named alternative (e.g., when to prefer validate_json or pdf_tables for extraction).

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