Skip to main content
Glama

ai_csv_ask

Read-only

Ask a question about a CSV — Ask a plain-English question about CSV data and get an exact answer. The model only writes a query plan (filters, group by, sum/avg/min/max/median/count/distinct, sort, limit) from your column schema; the plan then runs deterministically on your rows, so totals and averages are computed, not guessed. Auto-detects comma, semicolon, tab or pipe delimiters, quoted fields, $ and (negative) amounts, dates. Up to 60,000 characters / 5,000 rows. Optional limit= (default 50, max 200). Returns answer, result rows, the plan and warnings. Example: ?csv=region,revenue%0AEast,1200%0AWest,800&question=total revenue by region Price: $0.008 USDC (Base, via x402).

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": {
      "csv": "<csv>",
      "question": "<question>"
    },
    "name": "ai_csv_ask"
  }
}

Input Schema

NameRequiredDescriptionDefault
csvYesregion,product,revenue East,Widget,1200 West,Widget,800 East,Gadget,300
questionYestotal revenue by region, highest first

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description is not carrying the safety burden, yet it still adds substantial behavior: deterministic plan execution, delimiter and number/date auto-detection, hard input caps (60,000 chars / 5,000 rows), and the contents of the response including warnings. The price line ($0.008 USDC via x402) also discloses a cost the agent would otherwise not know. It stops short of describing failure modes or what triggers the 'warnings' field.

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?

The definition is front-loaded with purpose and mechanism, then constraints, then return shape, then an example — a sensible ordering with little wasted prose. The trailing price/network string is bolted on and slightly disrupts the flow, and the example URL-encoded CSV is dense, but neither is padding.

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?

With no output schema, the description correctly enumerates the return payload (answer, result rows, plan, warnings), and it covers input limits and supported data quirks. The one gap is the undocumented-but-mentioned limit parameter and the absence of any statement about error or over-limit behavior.

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%, but the schema only supplies terse examples for csv and question, so the description genuinely adds: the accepted delimiters, quoted-field and currency/negative-amount handling for csv, and a worked example for question. It also documents a 'limit' parameter (default 50, max 200) that does not actually appear in the input schema, which is useful but inconsistent with the structured definition.

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 opening sentence pairs a specific verb ('Ask a plain-English question') with a specific resource ('CSV data') and promises a concrete outcome ('get an exact answer'). The follow-up explains the mechanism (model emits a query plan, executed deterministically over rows), which makes it clearly distinct from a generic ai_ask-style tool and from a raw util_csv parser.

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?

The 'computed, not guessed' framing implies when to prefer this over a free-form LLM answer, and the row/character caps implicitly bound when it is unsuitable. However, there is no explicit when-to-use statement, no named alternative (e.g. ai_ask or util_csv), and no stated condition under which an agent should choose a different tool.

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