expense_aggregate
Aggregate (count/sum) over your expense rows.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| function | Yes | ||
| property | No | Required for sum: a declared numeric property of the entity. |
Aggregate (count/sum) over your expense rows.
| Name | Required | Description | Default |
|---|---|---|---|
| function | Yes | ||
| property | No | Required for sum: a declared numeric property of the entity. |
Changes observed during successful MCP inspections.
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the agent knows this is a safe, repeatable read-style operation. The description adds that it performs count/sum aggregation, but it does not disclose the aggregation scope (e.g., all expenses vs. filtered rows) or the return shape.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single front-loaded sentence with no wasted words. It efficiently communicates the operation and the supported aggregation functions.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple (two parameters) and annotations cover safety behavior, but there is no output schema and the description does not explain what the aggregate result looks like or what scope of expense rows is aggregated. It is minimally complete but leaves meaningful gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema defines the function enum and explicitly documents that property is required for sum and must be a declared numeric property. The description restates count/sum but adds no further parameter guidance beyond the schema, which is adequate given the schema covers the key semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb (aggregate) and resource (expense rows) and clarifies the supported aggregations (count/sum). It is clear what the tool does, but it does not explicitly differentiate itself from siblings like expense_list or expense_search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied: use this tool when you need a count or sum over expense rows rather than listing them. However, there is no explicit guidance on when to choose this over expense_list, expense_search, or other expense tools, and no exclusions are stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.