Skip to main content
Glama
BquantFinance

catalogo-fuentes-publicas

almacen_sql

Query local Parquet stores of Spanish public data with read-only DuckDB SQL to inspect tables, rows, and coverage; returns setup guidance when the warehouse is missing.

Instructions

SQL de solo lectura (DuckDB) sobre el almacén local en Parquet si existe: tablas boe, borme, bdns, placsp, placsp_adjudicaciones y carburantes (PLACSP con una fila por versión y columna feed: 643 perfiles alojados, 1044 plataformas agregadas, 1143 menores), y vistas placsp_ultimo (una por id, con anulada) y adjudicaciones_ultimo; borme.actos es lista (list_contains(actos, 'Constitución')). Devuelve columnas, filas y cobertura; sin almacén, cómo crearlo.

Input Schema

NameRequiredDescriptionDefault
limiteNo
consultaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

B3.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool is read-only, returns columns, rows, and coverage, and provides instructions to create the store if missing. It also warns that borme.actos is a list requiring list_contains, which is valuable behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense sentence with the main purpose front-loaded, but it includes extraneous details (e.g., exact counts of perfiles, plataformas, menores) that may not help an agent invoke the tool correctly. It could be more concise and better structured.

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

Completeness3/5

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

Given the complexity of a SQL query tool with two undocumented parameters, no annotations, and no output schema, the description covers the available tables, views, return format, and store fallback. However, it leaves a significant gap by not explaining the 'limite' parameter or the expected format of 'consulta', which are essential for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain parameters. It implies 'consulta' is a SQL query but never defines it explicitly, and it completely omits the 'limite' parameter (default 100) — leaving the agent without guidance on how to limit results or what the parameter does.

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?

States a specific verb (SQL de solo lectura) and resource (almacén local en Parquet) and enumerates the available tables and views. This is clear enough for an agent to understand it runs read-only SQL queries over a local data store, though it doesn't explicitly compare to sibling tools like ckan_buscar or ckan_filas.

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?

Mentions a precondition ('si existe') and a fallback ('sin almacén, cómo crearlo'), which implies when the tool is usable. However, it never states when to choose this tool over alternatives (e.g., for ad-hoc SQL vs. structured lookups), leaving selection guidance implicit.

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