Skip to main content
Glama
dataciviclab

dataciviclab

Official
by dataciviclab

gcs_query

Run read-only SQL SELECT queries against public GCS parquet datasets to analyze published clean or mart data, referencing the _data table and returning limited rows.

Instructions

SELECT read-only su un dataset clean o mart pubblicato sui bucket publici del Lab (dataciviclab-clean / dataciviclab-mart). slug= del dataset (layer=clean, default) o mart dataset__table (layer=mart). La query deve referenziare la tabella _data (es. SELECT anno, count(*) FROM _data GROUP BY anno); sono ammesse anche CTE (WITH … SELECT). Una sola istruzione, limit= max righe in output (default 100, max 500). Scopri gli slug con find()/explore() — explore restituisce anche columns e gcs_path. Serve solo per i dati pubblicati: per raw/contratti/pipeline usa il MCP toolkit.

Input Schema

NameRequiredDescriptionDefault
sqlYes
slugYes
layerNoclean
limitNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it declares the operation read-only, restricts to public buckets, requires a single statement referencing `_data`, allows CTEs, and caps output at 500 rows (default 100). What it omits is failure behavior for invalid SQL or query cost/time limits, which would complete the behavioral picture.

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

Conciseness4/5

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

Purpose is front-loaded and every sentence adds a real constraint (layer mapping, `_data` table, statement count, limit, discovery, exclusions). It is slightly dense in the slug/layer sentence and reads as one long block, but nothing is wasted.

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?

For a 4-parameter query tool with no annotations but an output schema, the description covers everything an agent needs to call it correctly: which datasets, the required table name, SQL restrictions, row limits, and how to discover valid slugs. Return-value explanation is correctly left to the output schema.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate, and it does for all four parameters: slug (clean dataset slug vs mart dataset__table form), layer (clean default / mart), limit (default 100, max 500), and sql (must reference `_data`, single statement, CTEs permitted). The layer values are conveyed even though the schema defines no enum.

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?

States a specific verb and scope: read-only SELECT over datasets published in the Lab's public clean/mart buckets. It immediately distinguishes the two layers and names the sibling tools (find/explore) and the MCP toolkit for everything outside published data, so an agent can tell it apart from general query/data tools without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use (only for published clean/mart data) and when-not ("per raw/contratti/pipeline usa il MCP toolkit"), plus a concrete discovery path: use find()/explore() to obtain slugs, with explore also returning columns and gcs_path. Nothing about selecting this tool is left to inference.

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