Skip to main content
Glama

Buscar documentos (imagens)

buscar_documentos
Read-only

Fetches each chargeback defense document as a PNG with metadata so an agent can extract evidence details and validate them against contestation rules.

Instructions

Retorna cada documento da contestação como imagem PNG, com metadados (nome do arquivo e tipo declarado: ar, comprovante_entrega, nota_fiscal, email_acesso). Leia cada imagem e extraia: tipo do documento, nome do recebedor, se há assinatura, se há RG, endereço completo, data do documento, código de rastreio, se indica devolução. Depois chame conferir_provas com esses campos. Transcreva exatamente o que está na imagem (ex.: número do endereço, campo de RG em branco = tem_rg false); não corrija nem complete com os dados do pedido. Minimização de dados: NUNCA repita na conversa números de documentos pessoais lidos nas imagens (RG, CPF, chave de NF); diga apenas 'com RG' ou 'sem RG'.

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": {
      "contestacao_id": "<contestacao_id>"
    },
    "name": "buscar_documentos"
  }
}

Input Schema

NameRequiredDescriptionDefault
contestacao_idYesID da contestação, ex.: CB-002

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

readOnlyHint=true already establishes the safety profile, and the description adds real context beyond it: the output is one PNG per document, the metadata enumerates declared types (ar, comprovante_entrega, nota_fiscal, email_acesso), and there is an explicit data-minimization rule about never repeating RG/CPF/NF numbers. Gaps remain on edge behaviors (no documents found, partial metadata), which keeps it below 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?

It is front-loaded with the return shape, then moves to extraction rules and finally the privacy constraint, so each block is easy to locate. It is somewhat long and mixes tool behavior with step-by-step analysis instructions, but every sentence carries operational value for the agent.

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 no output schema, the description must explain returns, and it does: per-document PNG images plus named metadata fields and the enumerable declared types. Combined with the downstream handoff to conferir_provas and the transcription rules, an agent has enough to call it correctly; only failure/empty-result behavior is left unstated.

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?

There is a single parameter with 100% schema description coverage (including the '^CB-\d{3,}$' pattern and example CB-002), so the schema already carries the semantics. The description only implies the contestação context and adds no format details beyond it, matching the baseline 3 for high-coverage schemas.

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?

The description opens with a concrete verb and resource: it returns each document of the 'contestação' as a PNG image plus metadata (file name and declared type). That is specific enough to separate it from the retrieval siblings (buscar_conversas, buscar_logs_acesso, buscar_pedido), and it names conferir_provas as the downstream consumer.

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?

It states the workflow explicitly: read the images, extract the listed fields, then call conferir_provas with those fields, and it warns against correcting or completing data with the order's information. What it does not cover is when NOT to use it or which sibling to pick if the user wants text rather than documents, so it falls short of a full when/when-not/alternatives statement.

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