Skip to main content
Glama
Sourolio10

servicenow-mcp-agent

by Sourolio10

get_incident_stats

Count incidents by group (e.g., priority, assignment group) with optional ServiceNow query filter. Get per-group totals sorted descending for reporting.

Instructions

Count incidents grouped by a field. Use for "how many", "which group has most", reporting.

Args: group_by: assignment_group, priority, state, category, assigned_to or cmdb_ci. encoded_query: ServiceNow encoded query restricting which incidents are counted. Defaults to active incidents only. Examples: "active=true^priority<=2", "opened_at>2026-08-22 00:00:00".

Returns counts per group, largest first. Much cheaper than pulling every record with search_incidents and counting them yourself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
group_byNoassignment_group
encoded_queryNoactive=true

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It discloses the default behavior (active incidents only), the return format ('counts per group, largest first'), and the performance advantage. It could also explicitly state that this is a read-only operation and what happens with invalid group_by values, but the provided details are substantive.

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 well-structured and front-loaded: purpose, use cases, arguments, return behavior, and a cost comparison follow in logical order. Every sentence adds value, and the examples are compact rather than bloated.

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

Completeness5/5

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

Despite having no annotations, the description covers all essential contexts: purpose, when to use it, parameter meanings, default filtering, output ordering, and the alternative approach. The presence of an output schema means the return shape doesn't need further elaboration. An agent has enough to invoke it correctly.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate entirely. It does: it enumerates valid group_by values, explains encoded_query semantics, gives concrete examples, and documents defaults. This fully adds meaning 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 states a specific verb-resource pair ('Count incidents grouped by a field') and immediately clarifies the intended use cases: 'how many', 'which group has most', reporting. It also distinguishes itself from search_incidents, so an agent can tell this is an aggregation tool rather than a record-retrieval tool.

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

Usage Guidelines5/5

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

The description explicitly says when to use the tool ('Use for...') and names the alternative (search_incidents) while explaining why this tool is preferable for counting: 'Much cheaper than pulling every record with search_incidents and counting them yourself.' This gives clear routing guidance.

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/Sourolio10/servicenow-mcp-agent'

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