Skip to main content
Glama
alcastaro

datosgobdo-mcp

by alcastaro

save_query_to_csv

Export government data by running a filter or SQL query and saving the result as a local CSV file. Returns the file path and row count.

Instructions

Write a query or filter result to a local CSV file.

Export endpoint for analysis workflows — run your filter or SQL, then save the result to open in Excel or another tool. Returns the file path and row count. First call downloads + caches the source file. Subsequent calls reuse the cache.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesDirect URL to the file (CKAN resource 'url' field).
formatYesFormat declared in CKAN. Accepts: csv, tsv, xlsx, json.
destNoAbsolute path for the output file (.csv or .tsv). If None, saves to ~/Downloads/datosgobdo-exports/<slug>-<timestamp>.csv. Must not contain '..'. Cannot write to system paths (/etc, /usr, /bin, ...).
sqlNoRead-only SQL query against table 'data' (same rules as query_resource). If provided, takes precedence over filters/columns.
filtersNoSame filter syntax as filter_resource. Used if sql is None.
columnsNoColumns to include. None = all. Ignored if sql is provided.
limitNoMax rows to write (1–100000). Default 10000.
overwriteNoOverwrite dest if it already exists. Default False.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
hintNo
pathNo
rows_writtenNo
columnsNo
bytes_writtenNo
cacheNo
Behavior5/5

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

Annotations provide readOnlyHint=false (modifies state) and openWorldHint=true (file system side effects). Description adds key behavioral details: caching behavior (first call downloads+caches, subsequent reuse) and return value (file path, row count). No contradiction.

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?

Three sentences front-load the purpose, add usage context, and disclose caching behavior. No fluff, every sentence 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?

Covers main purpose, caching, return values, and usage context. Missing explicit parameter precedence (e.g., sql vs filters), but schema descriptions handle this. Output schema exists, so return value detail is not required. Adequate for complexity.

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 baseline is 3. The description does not add new parameter-level meaning beyond summarizing the tool's purpose. All parameter details are well-covered in the schema.

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?

Description clearly states the verb 'write' and resource 'query or filter result to local CSV file'. It distinguishes from siblings like 'filter_resource' and 'query_resource' by specifying export to file for analysis workflows.

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?

Describes when to use (after running filter or SQL) and context (export for Excel/other tools). Does not explicitly list alternatives or exclusions, but context from sibling tools implies differentiation.

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