Skip to main content
Glama

Agent Data Tools: Utilities

CSV preflight, validate CSV: check CSV text before importing: problems, delimiter, row and column types

csv_preflight
Read-only

Check CSV text before importing: returns a verdict (ok), problems with line numbers (empty or missing header, no data rows, ragged rows with field counts, duplicate headers, mixed column types, unterminated quotes, mojibake), the detected delimiter and a per-column type report. Use before ingesting a CSV export. Example: text=name,age Ada,36 Bob,41. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "csv_preflight"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe CSV text to validate (first row is the header)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, and the description adds real context beyond them: it states that the tool reads or computes only and changes nothing, and it explains the unusual idempotentHint=false by noting that each call is charged, so repeats are not free. Because no output schema exists, the description also carries the burden of describing return values, and it does so concretely. It loses a point for embedding payment/credits marketing copy rather than purely operational behavior such as input-size limits or failure modes.

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

Conciseness3/5

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

The functional content is front-loaded and dense with useful specifics, but it is not cleanly structured: the example text runs directly into the pricing sentence ("Bob,41. Price $0.01/call via x402 USDC or a card key (/credits)"), so an agent can misread the pricing line as part of the CSV sample. The pricing and free-tier clauses are also promotional detail that crowds out the operational core.

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 a single-parameter validator with no output schema, the definition is largely complete: it covers what is checked, what is returned (verdict, problems with line numbers, delimiter, column types), and when to call it. It omits limits on input size and the shape of the actual response payload (for example, whether the problem list is structured JSON), which would matter since no output schema exists.

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% and there is only one parameter, whose schema description already states "The CSV text to validate (first row is the header)." The inline example adds a small amount of format intuition but no new semantics about quoting, encoding, or size limits. With the schema fully documented, the baseline of 3 is appropriate.

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 names a specific verb and resource (validate CSV text) and enumerates exactly what it returns: a verdict, line-numbered problems (empty/missing header, no data rows, ragged rows with field counts, duplicate headers, mixed column types, unterminated quotes, mojibake), the detected delimiter, and a per-column type report. That is enough detail that an agent can tell it apart from csv_to_json or csv_to_markdown without opening any 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 timing guidance: "Check CSV text before importing" and "Use before ingesting a CSV export," which clearly places this as a pre-conversion check step. It does not name a specific alternative tool or state when not to call it (e.g., for already-validated or tiny inputs), so it stops short of full routing guidance.

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.