Skip to main content
Glama

Query CSV

csv_query
Read-only

Query CSV data from a URL or raw text by selecting columns, filtering rows, sorting, and limiting results, with JSON or CSV output.

Instructions

Query a CSV: select/filter/sort/limit. One of url or csv.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
csvNoRaw CSV (alt. to url).
urlNoCSV URL (alt. to csv).
limitNoDefault 500, max 5000.
filterNo'col op value'.
formatNoDefault json.
selectNoColumns, comma-separated.
headersNoHeaders to forward (Authorization, Cookie…).
sort_byNoSort column.
sort_dirNoDefault asc.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.1.1
    • changedInput schema / properties / csv / description
      Previous value: -"Raw CSV text (alternative to url)."New value: +"Raw CSV (alt. to url)."
    • changedInput schema / properties / filter / description
      Previous value: -"Row filter expression: 'column op value'. Operators: = != > >= < <= contains startswith endswith. E.g. 'age > 30' or 'country = US'."New value: +"'col op value'."
    • changedInput schema / properties / format / description
      Previous value: -"Output format: 'json' (default) or 'csv'."New value: +"Default json."
    • addedInput schema / properties / headers
      Added value: +{
      +  "description": "Headers to forward (Authorization, Cookie…).",
      +  "type": "object"
      +}
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of rows to return (default 500, max 5000)."New value: +"Default 500, max 5000."
    • changedInput schema / properties / select / description
      Previous value: -"Comma-separated column names to include (e.g. 'name,age,country'). Omit to include all columns."New value: +"Columns, comma-separated."
    • changedInput schema / properties / sort_by / description
      Previous value: -"Column name to sort by."New value: +"Sort column."
    • changedInput schema / properties / sort_dir / description
      Previous value: -"Sort direction: 'asc' (default) or 'desc'."New value: +"Default asc."
    • changedInput schema / properties / url / description
      Previous value: -"URL of the CSV file to fetch (http/https)."New value: +"CSV URL (alt. to csv)."
  2. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the safe-read behavior is covered. The description adds the useful constraint that exactly one of url/csv should be supplied, but it does not describe return shape, pagination behavior, or authentication beyond what the schema already implies.

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?

Two short sentences with zero waste; the core operations and source-input constraint are front-loaded. Every clause earns its place.

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 nine parameters, 100% schema description coverage, and no output schema, the definition is nearly self-sufficient: the schema handles parameter semantics while the description covers purpose and input sourcing. It would be stronger if it clarified query output or filter operators, but those are largely covered elsewhere.

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%, so every parameter already has documented meaning and defaults. The description adds the mutual-exclusivity note for url/csv, which is helpful beyond the schema, but it does not enrich the semantics of the remaining query parameters.

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?

The description gives a specific verb ('Query') and resource ('CSV'), and enumerates the core operations select/filter/sort/limit. It does not explicitly differentiate from the sibling json_query, 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?

It specifies a key usage constraint ('One of url or csv'), which tells the agent how to provide input. However, it gives no guidance on when to choose csv_query over json_query or other query tools, and no exclusions are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.