Skip to main content
Glama

Enviar arquivo como documento

glpi_enviar_documento

Uploads a local file as a GLPI document and optionally links it to an item such as a Change. Use it to attach files that must exist as standalone documents rather than timeline entries.

Instructions

ENVIA um arquivo local como Documento do GLPI e, se informado, já o vincula a um item (vincular_itemtype="Change", vincular_id=12). Para anexar a um chamado prefira glpi_anexar_ao_chamado, que aparece na timeline. O arquivo precisa estar numa pasta liberada (GLPIHARBOR_PASTAS_UPLOAD).

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": {
      "caminho": "<caminho>"
    },
    "name": "glpi_enviar_documento"
  }
}

Input Schema

NameRequiredDescriptionDefault
nomeNo
caminhoYes
vincular_idNo
vincular_itemtypeNo
confirmado_pelo_usuarioNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare the write/open-world/non-idempotent/non-destructive profile, so the description only needs to add context — and it does, with the whitelisted upload folder constraint that would otherwise cause silent failures. It does not explain whether re-sending the same path creates duplicate documents or what the confirmado_pelo_usuario gate does, so it stops short of full disclosure.

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 sentences, front-loaded with the verb and resource, then the linking example, then the alternative and the precondition. No filler; every sentence carries information the schema and annotations do not.

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?

With five parameters at 0% schema coverage and a real write side effect, two parameters (nome, confirmado_pelo_usuario) remain opaque to the caller, and the confirmation flow is never described. The output schema offsets the need to explain return values, and the upload-folder constraint is a strong addition, but the definition is not fully self-sufficient for a mutating tool.

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 coverage is 0%, so the description must carry parameter meaning. It clarifies caminho via the folder restriction and gives a concrete example for the vincular_itemtype/vincular_id pair, but leaves nome (filename override?) and confirmado_pelo_usuario (confirmation requirement) completely unexplained in both description and schema.

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 ("ENVIA um arquivo local como Documento do GLPI") plus the optional linking behavior, and explicitly names the sibling it differs from (glpi_anexar_ao_chamado). An agent can tell this apart from attaching a file to a ticket 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 ticket attachments prefer glpi_anexar_ao_chamado because it shows in the timeline, implying this tool is for standalone documents or linking to other itemtypes. It also states a hard prerequisite (file must live in GLPIHARBOR_PASTAS_UPLOAD), so both when-to-use and when-not are covered.

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