Tools for agents: CSV to JSON records

Parse delimited text into string-valued JSON records with explicit headers and source-line locations.

Connect with MCP

{
  "mcpServers": {
    "super-agent-tools": {
      "url": "https://app.getsupers.com/sites/agent-csv-json/mcp"
    }
  }
}
Streamable HTTP · No API key · Stateless

Use this URL in any client supporting remote Streamable HTTP MCP. Calls return structured JSON; inputs are processed without persistence.

Call parse_csv_records

The first nonblank record is the header. Exact duplicate names and empty or whitespace-only names are rejected. Header case and whitespace are preserved. All cells remain strings, including leading zeros, decimal spelling, null text, formula text and empty values. Blank physical records are skipped and reported; a quoted empty field is not a blank record. One leading Unicode BOM is removed and reported. Supports comma, semicolon, tab or pipe delimiters; double quotes delimit quoted fields and doubled quotes escape quotes. Uses Python csv.reader strict mode with no dialect guessing, backslash escaping, trimming or type inference. This is not a full RFC conformance validator; quotes within unquoted fields follow Python CSV behavior. Ragged rows or parser errors fail the entire call without partial records. Source line ranges are one-based and include multiline quoted fields. Formula text is data and is never executed. Parser field-size limits remain the runtime defaults. https://docs.python.org/3/library/csv.html

Input and output schemas
{
  "name": "parse_csv_records",
  "title": "CSV to JSON records",
  "description": "Parse CSV with a required unique header into string-valued JSON records. Reject ragged records, empty headers, duplicate headers and CSV parser errors.",
  "inputSchema": {
    "properties": {
      "csv_text": {
        "title": "Csv Text",
        "type": "string"
      },
      "delimiter": {
        "default": ",",
        "enum": [
          ",",
          ";",
          "\t",
          "|"
        ],
        "title": "Delimiter",
        "type": "string"
      }
    },
    "required": [
      "csv_text"
    ],
    "title": "parse_csv_recordsArguments",
    "type": "object"
  },
  "outputSchema": {
    "additionalProperties": true,
    "title": "parse_csv_recordsDictOutput",
    "type": "object"
  },
  "icons": null,
  "annotations": {
    "title": null,
    "readOnlyHint": true,
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": false
  },
  "meta": null,
  "execution": null
}

Run the example to see the actual result.

HTTP alternative

POST https://app.getsupers.com/sites/agent-csv-json/call
Content-Type: application/json

{
  "csv_text": "id,note,amount\n001,\"hello, agent\",12.50\n002,\"two\nlines\",\n",
  "delimiter": ","
}

The HTTP and MCP interfaces execute the same implementation. Validation errors are returned explicitly. See the tool notes above for its supported inputs and behavior.

Quoted CSV fields and preserved string spellings

Read the explanation

The source example has identifier zero zero one, note hello comma agent inside quotes, and amount twelve point five zero. The page contract preserves every cell as a string, including leading zeros and decimal spelling. Bars count three identifier characters and five amount characters in the same unit. No type inference, trimming or formula execution is claimed by the described parser. The second record note contains an embedded newline inside quotes. Header is physical line one, first record line two, and second record spans lines three and four. Bars use one hundred pixels per source line number to locate the record endpoints. The trailing comma makes its amount an empty string. The stated parser reports source line ranges rather than assuming each physical line is a complete CSV record. The header defines three keys, id, note and amount, and each example record has three fields. Duplicate or empty headers and ragged rows fail the whole call according to the page notes. Python strict CSV behavior is described with explicit limitations. This snapshot has no local shared application script or parser implementation; offline form and layout checks do not establish the real backend result. No backend request is made for this draft.

Tools for agents: CSV to JSON records

How does parse_csv_records transform delimited tabular text into JSON objects without type loss or silent truncation?

The parse_csv_records tool transforms delimited tabular data into string-valued JSON dictionaries using Python's standard csv module in strict mode. It designates the first nonblank physical line as the unique column header and binds subsequent rows into dictionaries without coercing numbers, dates, or boolean strings. To ensure auditability in automated agent pipelines, the parser tracks one-based physical line numbers for multiline fields and terminates execution immediately if row widths vary or syntax errors occur.

The parser accepts only four single-character delimiters (comma, semicolon, tab, and pipe) and enforces strict column consistency; any ragged record halts execution without returning partial records. All cell values remain strings, meaning downstream systems must perform explicit schema validation and type parsing. The tool does not perform full RFC 4180 validation, instead adhering strictly to Python csv.reader behavior where embedded unquoted quotes follow standard library rules.

Try a worked example

Click 'Run tool' with the default sample containing multiline notes and leading zeros. The structured result generates two record objects where '001' remains a string and embedded newlines are preserved. The 'record_lines' telemetry tracks the second row across physical lines 3 to 4, demonstrating accurate span mapping without numeric conversion.

Strict Mode and Error Semantics

The tool configures Python's csv.reader with strict=True. Under this configuration, the underlying parser raises an Error immediately when it encounters malformed records or quote framing violations, rather than attempting heuristic repairs or discarding damaged rows. csv — CSV File Reading and Writing — Python 3.14 Documentation

Header names must be non-empty and completely unique. If duplicate header names appear, or if any record contains more or fewer fields than the detected header width, the service raises a ValueError and returns no partial records.

Multiline Tracking and Type Preservation

In the standard library reader, line_num tracks the cumulative physical line count read from the source iterator rather than simply incrementing a completed row counter. This allows the tool to map records that span across embedded newlines to accurate start and end line ranges. csv — CSV File Reading and Writing — Python 3.14 Documentation

All field values are returned strictly as string literals, protecting identifiers with leading zeros, decimal precision representations, and formula tokens from unintended casting.

Sources and further reading