Skip to main content
Glama

get_ai_usage

Read-only

Reports ServiceNow AI usage for Now Assist and other AI sources over a date range, grouping inventory/billing counts and generative AI consumption by a chosen field.

Instructions

Report AI usage for Otto (Now Assist) and other AI: AI Control Tower inventory/billing counts (sn_ai_governance_ai_inventory_usage, daily snapshots) and Generative AI assist consumption (sys_gen_ai_usage_log), over a date range and grouped by a field.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_ai_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd date YYYY-MM-DD (default today)
fromNoStart date YYYY-MM-DD (default 30 days ago)
sourceNoWhich usage source (default both)
group_byNoGroup field. inventory: type (default), source, accrual_date. genai_log: feature (default), plugin_name, license_name, strategy, status, execution_type, user, document_table

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.0.1

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds real context beyond them: that inventory data comes from daily snapshots (so granularity is by day, not real-time) and that the two sources are distinct tables with different groupable fields. It stops short of noting result volumes, limits, or whether counts are pre-aggregated.

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?

It is a single sentence that front-loads the purpose ('Report AI usage') before supplying source-table detail, so scanning works well. The parenthetical table names and the trailing grouping clause make it dense, but every element carries information an agent would otherwise lack.

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?

There is no output schema, so the description is the only place return values could be characterized, and it never says what a result row looks like (counts? per-group totals? both sources merged or separate sections?). For a reporting tool with fully documented inputs this is an understandable but real gap; the source-table and snapshot details partially compensate.

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%, with both date bounds and every group_by enum value documented per source, so the schema carries the parameter burden. The description only restates the date-range and grouping concept, adding no syntax, timezone, or default-override detail beyond what the schema already states. Baseline 3 applies.

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?

The description pairs a specific verb ('Report') with a specific resource ('AI usage') and enumerates the two underlying data sources (sn_ai_governance_ai_inventory_usage for inventory/billing counts, sys_gen_ai_usage_log for generative AI assist consumption). It does not name a sibling to contrast with, but the scope ('Otto/Now Assist and other AI') is narrow enough that an agent can distinguish it from generic asset or agent tools.

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?

Usage is implied by the framing — reach for this when you need usage/consumption or billing counts over a period — but there is no explicit when-to-use clause, no exclusions, and no reference to an alternative tool for related questions. The 'source' enum (inventory vs genai_log vs both) does implicitly tell the agent to pick a data domain, which is a partial substitute.

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

Deploy Server

Other Tools