Skip to main content
Glama
alcastaro

datosgobdo-mcp

by alcastaro

filter_resource

Read-only

Filter and retrieve records from a cached open data file using SQL-like WHERE, SELECT, ORDER BY, and LIMIT conditions. Returns matching rows and total count.

Instructions

Run a typed WHERE/SELECT/ORDER BY/LIMIT against a cached resource.

First call downloads the file (up to 100 MB) and caches it as Parquet at ~/.cache/datosgobdo-mcp/. Subsequent calls hit cache (<1s). Returns requested columns + matching rows (capped at limit) plus the total count of matching rows. Use this when you need actual records, not aggregates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesDirect URL to the file (CKAN resource 'url' field).
formatYesFormat declared in CKAN. Accepts: csv, tsv, xlsx, json.
filtersNoOptional list of filter conditions, AND-combined. Each item is {col, op, val}. Valid ops: =, !=, <, <=, >, >=, in, not_in, contains, starts_with, ends_with, is_null, is_not_null. Example: [{"col":"Año","op":"=","val":2026},{"col":"Mes","op":"=","val":"Abril"}].
columnsNoColumns to SELECT. None = all columns.
order_byNoList of {col, dir} where dir is "asc" or "desc". Example: [{"col":"Sueldo Bruto","dir":"desc"}].
limitNoMax rows to return (1-1000).
offsetNoRows to skip (for paginating).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
hintNo
source_urlNo
formatNo
cacheNo
matching_rows_totalNo
rows_returnedNo
columnsNo
limitNo
offsetNo
rowsNo
Behavior5/5

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

Beyond annotations (readOnlyHint, openWorldHint), the description discloses caching behavior, file size limit (100 MB), cache location, expected speed, and return details (capped rows + total count). No contradictions with annotations.

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 concise with two short paragraphs. The key purpose is front-loaded, and every sentence adds value. No fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (7 parameters, multiple options), the description covers caching behavior, size limits, return format, and use case. The output schema exists, so return details are unnecessary. The description is complete for effective 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 description coverage is 100%, so the schema already documents all parameters thoroughly. The description does not need to add parameter details, and it doesn't. The overall usage context provided is sufficient; 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 does a typed WHERE/SELECT/ORDER BY/LIMIT against a cached resource, specifying the verb and resource. It also distinguishes from siblings by stating 'Use this when you need actual records, not aggregates,' which differentiates it from aggregate_resource.

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 clear usage context: first call downloads and caches, subsequent calls are fast. It advises using when actual records are needed, implying not for aggregates. However, it doesn't explicitly differentiate from query_resource (a sibling), so a slight gap in when-not-to-use exists.

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/alcastaro/datos.gob.do-MCP-server'

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