Skip to main content
Glama

aggregate

Perform server-side aggregation on Mexico City open data using GROUP BY queries and custom metrics to analyze datasets like crime statistics, 911 calls, and air quality.

Instructions

Server-side aggregation (GROUP BY + metric) via CKAN datastore SQL.

Example: aggregate("fgj", group_by="alcaldia_hecho", metric='count(*) as delitos', where="anio_hecho=2025").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataset_idYes
group_byYes
metricNocount(*) as total
whereNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'Server-side aggregation' which implies read-only behavior, but doesn't disclose important details like rate limits, authentication requirements, error conditions, or what happens with large datasets. The example helps but doesn't constitute comprehensive behavioral transparency.

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?

Extremely concise and well-structured - one sentence explaining the purpose, followed by a comprehensive example that demonstrates usage. Every element earns its place, with the example serving dual purpose of showing syntax and parameter semantics. No wasted words.

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 tool has an output schema (which handles return values) and the description provides excellent parameter semantics via example, the description is reasonably complete for a read-only aggregation tool. However, with no annotations and complex aggregation behavior, it could benefit from more behavioral context about limitations, performance, or error handling.

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

Parameters4/5

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

With 0% schema description coverage, the description must compensate, and it does so effectively through the concrete example that demonstrates how all 5 parameters work together. The example shows dataset_id='fgj', group_by='alcaldia_hecho', metric='count(*) as delitos', where='anio_hecho=2025', and implies limit uses default. This provides excellent semantic understanding beyond the bare 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?

The description clearly states the tool performs 'Server-side aggregation (GROUP BY + metric) via CKAN datastore SQL' - a specific verb (aggregation) with resource (CKAN datastore) and method (SQL). It distinguishes from siblings like 'query_records' by focusing specifically on aggregation operations rather than general queries.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. While it mentions CKAN datastore SQL, it doesn't explain when aggregation is appropriate versus using 'query_records' or other sibling tools, nor does it mention any prerequisites or exclusions for usage.

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/devcsar/cdmx-mcp'

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