Skip to main content
Glama
IvanBBaev

servicenow-mcp-ai

by IvanBBaev

Aggregate ServiceNow records

servicenow_aggregate
Read-only

Aggregate ServiceNow table data server-side—count, average, min, max, sum—with group-by and filters, eliminating the need to retrieve individual rows.

Instructions

Compute server-side aggregates (count, avg, min, max, sum) over a table via the Stats API, with optional grouping. Avoids pulling individual rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoInclude a record count (sysparm_count).
queryNoEncoded query to filter rows before aggregating.
tableYesTable name, e.g. 'incident'.
havingNoHAVING clause to filter groups (sysparm_having).
group_byNoFields to group by.
instanceNoConnection profile to use for this call (default: the active profile). See servicenow_list_instances.
avg_fieldsNoNumeric fields to average.
max_fieldsNoFields to take the maximum of.
min_fieldsNoFields to take the minimum of.
sum_fieldsNoNumeric fields to sum.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.0.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already mark readOnlyHint=true, and the description adds useful behavioral context: computation happens server-side, uses the Stats API, supports grouping, and avoids downloading rows. This meaningfully extends the structured metadata without contradicting it.

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?

Two sentences, front-loaded with the core purpose, and no redundant words. The efficiency cue 'Avoids pulling individual rows' earns its place by informing agent decision-making.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter tool with no output schema, the description covers the essential behavioral contract: what it computes, how it computes it, and why it is preferable to row-level queries. The main gap is not spelling out the return shape, but annotations and schema coverage reduce the burden considerably.

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?

Schema description coverage is 100%, so the input schema already documents all 10 parameters. The description adds only the high-level concept of 'optional grouping', which is consistent with group_by and having but does not deepen parameter-level meaning beyond what the schema provides.

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 states a specific verb ('Compute'), a clear resource ('a table'), and the exact operations ('count, avg, min, max, sum') via the Stats API. 'Avoids pulling individual rows' distinguishes it from row-returning sibling tools like servicenow_query_table.

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 clearly implies when to use this tool: when server-side aggregates are needed instead of fetching individual rows. It does not name the alternative explicitly or list exclusion conditions, but the context is strong enough for an agent to route correctly.

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

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/IvanBBaev/servicenow-mcp-ai'

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