Skip to main content
Glama

aggregate

Aggregate patient and admission metrics like counts or average age, optionally grouped by demographics such as gender or race.

Instructions

Aggregate patients or admissions by a fixed metric, optionally grouped by a fixed column. metric in {patient_count, avg_patient_age, admission_count}; group_by in {gender, admission_type, insurance, race} and must belong to the same table as metric.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYes
row_capYes
truncatedYes
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It only states the aggregation operation and a constraint on group_by's table membership. It does not mention read-only nature, any side effects, response format, or error conditions. The lack of behavioral details beyond the core operation is a significant gap for a tool with no annotation support.

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?

The description is two sentences, front-loaded with the core action and followed by a compact enumeration of valid options and a constraint. There is no redundancy or filler. It is efficient and easy to scan.

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?

While an output schema exists, the description omits the 'gender' parameter entirely and does not clarify the mapping between metrics and the two tables (patients vs. admissions) beyond the vague 'same table' note. This leaves an agent unsure which metrics are valid for which table and what the gender field does, making the description incomplete for reliable invocation.

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?

The description lists allowed values for metric and group_by, which duplicate the schema enums, but adds the meaningful constraint that both must belong to the same table. However, it completely ignores the 'gender' parameter present in the schema, leaving its purpose unexplained. Since schema description coverage is 0%, the description does not adequately convey the semantics of all parameters.

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 begins with a clear verb ('Aggregate') and resource ('patients or admissions'), and immediately specifies the fixed metrics and allowed grouping columns. This is distinct from siblings like find_patients and get_admissions, which suggest raw data retrieval. Even without explicit sibling naming, the purpose is unambiguous and specific.

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?

The description implies usage for aggregation tasks ('Aggregate patients or admissions') but does not explicitly state when to choose this tool over siblings, nor does it mention when not to use it. There is no guidance on alternatives or scenarios where raw data would be more appropriate. The implied usage is present but not elaborated.

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/GattaniAkshit/medmcp'

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