Skip to main content
Glama

Trocar a entidade ativa

glpi_trocar_entidade
Read-onlyIdempotent

Switches the session's active entity to a specified ID or all permitted entities, optionally including subentities, without writing to GLPI.

Instructions

Troca a entidade ativa da sessão: o id da entidade (veja glpi_entidades) ou "all" para todas as permitidas. recursivo inclui as subentidades. Não grava nada no GLPI.

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_trocar_entidade"
  }
}

Input Schema

NameRequiredDescriptionDefault
entidadeNoall
recursivoNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, but the description adds the important nuance that the change lives only in the session and writes nothing to GLPI ('Não grava nada no GLPI'). The recursivo semantics ('inclui as subentidades') further clarify the effect of the switch beyond what the boolean hints convey.

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?

Three short clauses, front-loaded with the action and scope, then the argument sourcing, then the effect on sub-entities and persistence. No filler and nothing repeated from the title alone.

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?

An output schema exists, so return values need no explanation, and the low-complexity two-parameter surface is well covered. Only minor gap is any note on failure when an entity id is not permitted.

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 description coverage is 0%, so the description must compensate, and it does for both parameters: entidade is an id or the literal "all", and recursivo controls inclusion of sub-entities. It stops short of restating defaults, but the meaning of each argument is clear.

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: it switches the session's active entity ('Troca a entidade ativa da sessão'). The scope (session-level, not a GLPI record) is stated up front, which distinguishes it from CRUD tools like glpi_entidades that read entity data.

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?

Tells the agent where the argument comes from ('o id da entidade (veja glpi_entidades)') and what 'all' means, so the call is actionable without further inference. It doesn't state when one would choose this over glpi_trocar_perfil, but the session scope makes the context implicit.

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