Skip to main content
Glama

csv_query

Fetch a CSV from a URL or raw text, then query 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. Returns JSON array of objects by default, or CSV with format=csv. Use instead of loading the full CSV into your context — send only the data you need.

Input Schema

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

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

No annotations provided, so the description must disclose behavioral traits. It mentions fetching from URL or accepting raw CSV, and returns JSON or CSV. States default limit (500) and max (5000). However, it does not clarify network call implications, potential errors, or any auth requirements. Basic but not exhaustive.

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 sentences, each adding value: first states functionality, second gives usage advice. No redundant or vague words. Efficiently front-loaded.

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?

Given the tool's complexity (8 parameters, SQL-like queries, no output schema), the description covers the overall behavior, default output format, and limit. It could mention error handling or edge cases, but it is largely sufficient for typical use.

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% with descriptions for all 8 parameters. The description adds high-level context (e.g., 'select columns, filter rows') but does not provide additional syntax or meaning beyond the schema. Baseline 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 clearly states the tool's purpose: 'Fetch a CSV from a URL (or accept raw CSV text) and query it' with specific operations (select, filter, sort, limit). It differentiates from loading the full CSV into context, distinguishing it from siblings like json_query or extract_structured.

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 provides explicit when-to-use guidance: 'Use instead of loading the full CSV into your context — send only the data you need.' It implies the alternative of loading the whole CSV. Lacks explicit when-not-to-use or mention of specific siblings, but the context is clear.

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