Skip to main content
Glama
xavimf87

mcp-govern

by xavimf87

estadistiques

Aggregate public contract and subsidy data by specified fields to generate counts or sums, with optional filters for targeted analysis.

Instructions

Genera estadístiques agregades sobre contractes o subvencions.

IMPORTANT: Els noms de camp són els interns de Socrata. Usa 'llistar_camps' per consultar-los.

Camps habituals per agrupar i sumar:

  • contractes: exercici, tipus_contracte, organisme_contractant, adjudicatari | import: import_adjudicacio

  • pscp: nom_organ, tipus_contracte, fase_publicacio, denominacio_adjudicatari | import: import_adjudicacio_amb_iva

  • subvencions: any_de_la_convocat_ria, ra_social_del_beneficiari, entitat_oo_aa_o_departament_1 | import: import_subvenci_pr_stec_ajut

  • convocatories: any_de_la_convocat_ria, entitat_oo_aa_o_departament_1, finalitat_publica | import: import_total_convocat_ria

Exemples:

  • Contractes per tipus: agrupar_per='tipus_contracte'

  • Top beneficiaris subvencions 2024: dataset='subvencions', agrupar_per='ra_social_del_beneficiari', operacio='sum', camp_suma='import_subvenci_pr_stec_ajut', filtre="any_de_la_convocat_ria='2024'"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNombre màxim de grups a retornar
filtreNoFiltre SoQL opcional (ex: "exercici='2024'")
datasetYesQualsevol dataset disponible. Usa 'llistar_camps' per veure les opcions.
operacioNoOperació d'agregació: 'count' o 'sum'count
camp_sumaNoCamp numèric per sumar (requerit si operacio='sum', ex: 'import_adjudicacio')
agrupar_perYesCamp pel qual agrupar (ex: 'tipus_contracte', 'exercici', 'entitat_oo_aa_o_departament_1')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries full burden. It explains the aggregation operation, notes that field names are internal Socrata names, and advises using another tool to list fields. It does not discuss rate limits or authentication, but is transparent about the tool's behavior.

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?

The description is well-structured with clear sections, uses bold for emphasis, and front-loads the purpose. It is slightly lengthy but every part adds value. Could be trimmed slightly, but overall effective.

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 complexity of the tool, the number of siblings, and the presence of an output schema, the description is comprehensive. It covers common usage patterns, provides field mappings, examples, and guidance on parameters. No gaps are evident.

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 description coverage is 100%, so baseline is 3. The description adds significant value beyond the schema: it explains common fields per dataset, provides examples of usage, clarifies the relationship between operacio and camp_suma, and explains the dataset parameter. This is exemplary.

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 that it generates aggregated statistics about contracts or subventions, provides specific field names and examples, and distinguishes this tool from sibling tools that focus on searching or detailing individual records.

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 gives clear guidance on when to use (for aggregated stats), recommends using 'llistar_camps' to check field names, and provides common fields per dataset. It does not explicitly state when not to use, 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/xavimf87/mcp-govern'

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