Skip to main content
Glama

Motor de busca do GLPI

glpi_buscar
Read-onlyIdempotent

Search GLPI records of any item type using custom field criteria, operators, columns, sorting, and pagination; use it for advanced filters beyond ticket-specific searches.

Instructions

Motor de busca do GLPI para qualquer tipo. Para chamados, o caminho mais simples é glpi_buscar_chamados; use esta para filtros que ela não tem.

criterios: lista de {"campo": 12, "operador": "equals", "valor": "notold", "ligacao": "AND"}. operador: contains, notcontains, equals, notequals, lessthan, morethan, under, notunder, empty. ligacao: AND, OR, AND NOT, OR NOT. Para agrupar (parênteses): {"ligacao": "AND", "criterios": [...]}. Para campo de outro tipo: "meta": true e "itemtype_meta": "User". contains é parcial; use ^texto$ para exato. equals/notequals servem para listas (status, pessoas, grupos). Valores especiais: "myself" em campos de usuário e "mygroups" em campos de grupo; em Ticket.status (campo 12): notold, old, all, process, notclosed. colunas: números dos campos a trazer (veja glpi_opcoes_de_busca). ordenar_por: número do campo (em Ticket, 19 = última atualização, 15 = abertura). A resposta traz colunas (número → nome) uma vez e as linhas com os números.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "itemtype": "<itemtype>"
    },
    "name": "glpi_buscar"
  }
}

Input Schema

NameRequiredDescriptionDefault
ordemNoDESC
inicioNo
colunasNo
itemtypeYes
criteriosNo
quantidadeNo
ordenar_porNo
max_caracteres_por_celulaNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive and open-world behavior, so the safety profile is covered. The description adds real value beyond that by describing the response shape — a `colunas` number-to-name map returned once plus rows keyed by those numbers — and by explaining special sentinel values like "myself" and "mygroups". It does not discuss pagination limits or permissions, which keeps it short of a 5.

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 the tool's role and the sibling routing rule, then a dense but well-organized parameter reference. The `criterios` block is long, but each line conveys a distinct usable fact; only the formatting is slightly ragged.

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?

An output schema exists, so return values need not be explained (though the description does so helpfully). The gap is on the input side: with 0% schema coverage and 8 parameters, pagination (`inicio`, `quantidade`) and cell truncation (`max_caracteres_por_celula`) are left entirely undefined, which matters for a result-set tool where paging behavior affects how an agent iterates.

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 0% across 8 parameters, so the description carries the full burden. It compensates well for the most complex parameter (`criterios`, with operator list, AND/OR/NOT linking, nested grouping, meta fields, partial-vs-exact matching), and explains `colunas` and `ordenar_por`. However `inicio`, `quantidade`, `ordem` and `max_caracteres_por_celula` are never mentioned, leaving nearly half the surface undocumented.

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 resource and scope: a generic GLPI search engine usable with any itemtype. It also explicitly distinguishes itself from the sibling glpi_buscar_chamados, which is described as the simpler path for tickets, so an agent can route 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 Guidelines5/5

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

Gives an explicit routing rule: for tickets prefer glpi_buscar_chamados, and use this tool only for filters that the specialized tool lacks. It also points to glpi_opcoes_de_busca as the way to discover field numbers, covering the prerequisite for building a correct call.

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