Skip to main content
Glama

Count items

glpi_count_items
Read-onlyIdempotent

Count matching GLPI items without transferring full records, returning only totals for tickets, computers, users, and other assets. Use criteria filters to answer 'how many' queries.

Instructions

Count matching items without transferring them — answers 'how many' in one cheap call. Use glpi_list_search_options to discover criteria field IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
criteriaNoArray of {field, searchtype, value, link} — same shape as glpi_search
itemtypeYesItem type, e.g. Ticket, Computer, User

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.5.2

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, so the safety profile is fully covered. The description adds the behavioral note that no data is transferred and the call is cheap, which is genuine but modest added context; it says nothing about result shape or limits. A 3 is appropriate against a rich annotation set.

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 compact sentences, no padding, with the core purpose front-loaded and the companion-tool pointer trailing. Every clause earns its place.

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?

With an output schema present and both parameters documented in the schema, the description only needs to cover purpose, the cheap-count rationale, and how to build criteria — all of which it addresses. Nothing an agent needs to invoke it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; however, the description adds meaning the schema does not by directing the agent to glpi_list_search_options to discover valid criteria field IDs, which is the main ambiguity for the 'criteria' array. This is a real value-add beyond the structured fields.

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 and resource ('Count matching items') plus a scope qualifier ('without transferring them'), which functionally separates it from the search/list siblings that return records. An agent can tell what this does and how it differs from glpi_search without opening either schema.

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 clear context — use it to answer 'how many' cheaply — and points to glpi_list_search_options as the way to discover criteria field IDs. It does not explicitly name glpi_search as the alternative when full records are needed or state when not to use this, so it falls short of a full 5.

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