Skip to main content
Glama
Correios MCP Server

Correios MCP Server

by fabianoomura

Fatura analítica (CSV)

correios_fatura_analitico
Idempotent

Requests an itemized invoice and downloads the CSV when ready, enabling reconciliation of charged versus expected freight costs.

Instructions

Solicita a fatura ANALÍTICA (objeto a objeto: código, serviço, peso, valor) e baixa o CSV quando pronto (POST …/faturas/{fatura}/analitico → GET /processamentos/{id}/file). É o arquivo para conciliar frete cobrado × frete esperado. O arquivo fica disponível por 7 dias.

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": {
      "fatura": "<fatura>",
      "tipo_documento": "<tipo_documento>",
      "item_fatura": "<item_fatura>"
    },
    "name": "correios_fatura_analitico"
  }
}

Input Schema

NameRequiredDescriptionDefault
faturaYesNúmero da fatura.
dr_faturaNoDR da fatura (padrão: o da sessão).
item_faturaYesitemFatura (de correios_faturas).
tipo_documentoYestipoDocumento (de correios_faturas).
aguardar_segundosNoQuanto esperar o arquivo ficar pronto.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Adds meaningful behavior beyond the annotations: the two-step flow (POST …/faturas/{fatura}/analitico → GET /processamentos/{id}/file), the fact that the file is downloaded once ready, and a 7-day retention window. This is consistent with readOnlyHint=false (it submits a processing request) and idempotentHint=true, with no contradiction. It does not state what happens if the file isn't ready within the wait window, which keeps it from 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?

Three tight sentences that front-load the action and file content, then the purpose, then the retention caveat. The inline endpoint notation is compact and informative; nothing is filler.

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 annotations, a full output schema, and 100% schema coverage, the description supplies the remaining essentials: async flow, intended use, and retention. The main unresolved gap is the behavior when the wait elapses before the file is ready.

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 100%, so the baseline is 3 and the schema already explains each parameter. The description implicitly motivates aguardar_segundos ('baixa o CSV quando pronto') by describing the async processing flow, but it does not name parameters or add format details beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Solicita a fatura ANALÍTICA ... e baixa o CSV') and enumerates the file's contents (código, serviço, peso, valor), which distinguishes it from a PDF or preview invoice. It never names the sibling tools it differs from, so the differentiation is inferable rather than explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Gives a clear reason to use it ('É o arquivo para conciliar frete cobrado × frete esperado'), which is real usage context. However, there is no when-not guidance and no mention of when to prefer correios_fatura_pdf or correios_fatura_previa instead, leaving the choice to inference.

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