Skip to main content
Glama

csv_query

Fetch CSV from a URL or raw text, then query it by selecting columns, filtering rows, sorting, and limiting results. Returns JSON or CSV.

Instructions

Fetch a CSV from a URL (or accept raw CSV text) and query it: select columns, filter rows, sort, and limit results. Provide exactly one of url or csv — not both. Returns a JSON array of objects (default) or CSV text when format=csv. Returns an error if the URL is unreachable, returns a non-2xx status, or the content cannot be parsed as CSV. Has no side effects. Use instead of loading the full CSV into your context — send only the data you need.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
csvNoRaw CSV text (alternative to url).
urlNoURL of the CSV file to fetch (http/https).
limitNoMaximum number of rows to return (default 500, max 5000).
filterNoRow filter expression: 'column op value'. Operators: = != > >= < <= contains startswith endswith. E.g. 'age > 30' or 'country = US'.
formatNoOutput format: 'json' (default) or 'csv'.
selectNoComma-separated column names to include (e.g. 'name,age,country'). Omit to include all columns.
sort_byNoColumn name to sort by.
sort_dirNoSort direction: 'asc' (default) or 'desc'.
Behavior5/5

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

With no annotations, the description fully discloses behavior: output formats (JSON or CSV), error conditions (unreachable URL, non-2xx, unparseable CSV), and states it has no side effects. This is comprehensive and clear.

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?

The description is three sentences, each serving a distinct purpose: overall function, usage constraint, and output/error behavior. No unnecessary words, well-structured.

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 8 parameters with no required ones and no output schema, the description covers the main flow and error cases. It omits details like default limit and sort behavior, but these are in the schema. Overall adequate.

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%, so baseline is 3. The description adds value by clarifying the mutual exclusivity of url and csv, which is not in the schema. This improves usability beyond the schema alone.

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 clearly states the tool fetches CSV from URL or raw text and queries it with select, filter, sort, and limit. It distinguishes itself from siblings by focusing on CSV querying rather than general fetching or extraction.

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?

The description provides explicit guidance: provide exactly one of url or csv, and recommends using this tool to avoid loading full CSV into context. However, it does not explicitly mention when not to use it or name alternative tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/icosaedro-git/toolsnap-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server