Skip to main content
Glama

Get ticket stats

glpi_get_ticket_stats
Read-onlyIdempotent

Ticket counts per built-in status (New, Processing assigned/planned, Pending, Solved, Closed), other_status_count for codes outside 1–6, and the total, without listing the tickets. Report other statuses separately and check counts_consistent before reporting an exact breakdown. For open tickets only, filter status (field 12) equals 'notold'; unfiltered counts include solved and closed tickets. Optional criteria narrow the scope, e.g. one entity: [{field: 80, searchtype: 'equals', value: }] (Ticket search option IDs: 80 = entity, 4 = requester, 5 = technician, 7 = category; same criteria shape as glpi_search).

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": "glpi_get_ticket_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
criteriaNoOptional criteria to narrow the scope: array of {field, searchtype, value, link}

Output Schema

NameRequiredDescriptionDefault
dataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, and the description adds real behavioral context beyond them: codes outside 1–6 are bucketed into other_status_count, and the agent is told to check counts_consistent before reporting an exact breakdown. It does not say what to do when counts_consistent is false, but the caveat itself is valuable disclosure.

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?

Front-loaded with what is returned before the caveats, and every clause (status filter, other_status_count, consistency check, criteria example) carries information. The parenthetical option-ID list is dense but earns its space; the sentence order could be slightly tighter.

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?

With an output schema present, return values need no explanation, and the description still clarifies count semantics, the open-vs-closed distinction, and how to scope with criteria. Minor gap: no guidance on how to interpret or remediate a counts_consistent failure, which is the one thing an agent could hit at call time.

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 coverage is 100% and the single param is optional, but the description still adds substantial meaning: a worked example criteria array, the search option ID map (80=entity, 4=requester, 5=technician, 7=category), and the pointer that the shape matches glpi_search. That is more than the bare {field, searchtype, value, link} schema conveys.

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?

States a specific verb+resource: returns ticket counts per built-in status (New, Processing, Pending, Solved, Closed), an other_status_count bucket, and a total, explicitly "without listing the tickets." That negative clause alone separates it from glpi_list_tickets and other aggregate siblings like glpi_count_items.

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?

Gives concrete conditional guidance: use status (field 12) = 'notold' for open-only counts, and notes that unfiltered counts include solved and closed tickets. Also points to glpi_search for the criteria shape. It never explicitly names an alternative aggregate tool (e.g. glpi_count_items) to route between, which keeps it short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.