Skip to main content
Glama

util_csv_query

Read-only

CSV query (filter, sort, select) — Filter, sort and select rows from CSV text with simple SQL-like conditions, offline. where= conditions joined by ' and ' or ';' using = != > >= < <= contains !contains startswith endswith in (a|b|c); numbers compare numerically ($ , % and (negatives) handled), text case-insensitively. Optional match=any, select= columns, sort= col or -col (several allowed, blanks last), distinct=true, limit= (default 100, max 5000), offset=. Returns matched count, rows, numeric summary of matched rows and CSV output. Up to 50,000 rows. Price: $0.003 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>",
      "where": "<where>"
    },
    "name": "util_csv_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
csvYese.g. name,status,amount Ann,paid,120 Bo,open,45 Cy,paid,300
whereYese.g. status=paid and amount>100

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the readOnly/non-destructive annotations it discloses concrete operational facts: 50,000-row ceiling, limit default 100 with a 5000 max, blanks-last sort semantics, case-insensitive text matching, numeric normalization of $ , % and negatives, and the exact shape of the response (count, rows, numeric summary, CSV). It also surfaces the payment requirement ($0.003 USDC via x402), which the annotations do not cover at all.

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?

Purpose and the 'offline' qualifier are front-loaded, and nearly every clause carries a constraint, default, or limit that the agent needs. It is a dense run-on with semicolon-separated fragments, though, which makes the syntax rules slightly harder to scan than a structured list would be.

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 fills the gap by enumerating what is returned, and it covers limits, defaults, and cost. The only missing piece relative to a query tool of this complexity is explicit routing guidance versus the other CSV siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3, but the description goes far beyond the two property blurbs: it defines the entire 'where' grammar (operators = != > >= < <= contains !contains startswith endswith in (a|b|c), conjunction via ' and '/' ;', match=any), and documents select/sort/distinct/limit/offset modifiers that are invisible in the schema. This meaningfully reduces misuse risk on the most error-prone parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb set ('Filter, sort and select rows') and resource ('CSV text from ... SQL-like conditions'), so the agent knows exactly what the tool produces. It does not name any sibling (util_csv, util_csv_pivot, util_csv_profile, ai_csv_ask) to disambiguate which CSV tool to pick, so it stops short of a 5.

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?

'offline' and the explicit pricing/x402 note imply this is a deterministic, paid, network-independent alternative to the AI-backed CSV tools, which is a usable contextual signal. However, there is no explicit when-to-use/when-not statement or named alternative, so selection must be inferred.

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