Skip to main content
Glama

sn_aggregate

Read-onlyIdempotent

Compute COUNT, SUM, AVG, MIN, or MAX statistics and grouped aggregates directly on a ServiceNow table, answering how many or how many per group without pulling records.

Instructions

Aggregate over a table. action=stats (COUNT/SUM/AVG/MIN/MAX) or action=group (grouped statistics). One call answers 'how many', 'how many per group' without pulling records.

Input Schema

NameRequiredDescriptionDefault
queryNo
tableNo
actionNostats
group_byNo
aggregateNoCOUNT
group_by_2No

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds that results are computed without pulling records, which is useful, but says nothing about cost, limits, or empty-result behavior beyond what annotations and the output schema convey.

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?

Two tight sentences with no waste, the action modes front-loaded and the value proposition last. Efficient and scannable.

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?

Output schema and annotations carry return shape and safety, and the description covers the core action modes, but with 6 undocumented params and 0% coverage the agent lacks guidance on query/table formats and the two-level grouping.

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

Parameters2/5

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

Schema coverage is 0% across 6 params, so the description must compensate. It clarifies the action enum and the aggregate values (COUNT/SUM/AVG/MIN/MAX) and hints at group_by semantics, but leaves query, table, group_by_2, and the relationship between the two group fields entirely undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Aggregate over a table') and enumerates the two action modes (stats vs group) with the aggregates supported. It's clearly distinguishable from a record-fetching sibling like sn_read via the 'without pulling records' framing, though it never names an alternative.

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?

'One call answers how many / how many per group without pulling records' implies usage versus record retrieval but doesn't explicitly say when to prefer this over sn_read or other siblings, nor any exclusions. Usage is inferable rather than stated.

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