Skip to main content
Glama

Recuperar PDF de etiqueta existente

recover_label_pdf

Recupera o PDF de uma pré-postagem já confirmada, a partir do supportCode da tentativa devolvido por generate_label. Use quando não tiver o prepostagemId ou não souber se a emissão terminou; com o prepostagemId em mãos, use get_label_pdf. Não cria etiqueta nem refaz emissão e cobre só emissões feitas por este MCP. Mantém controles de acesso e limites do download existente.

Input Schema

NameRequiredDescriptionDefault
instanceIdNoIgnorado no servidor autenticado; a credencial determina a loja.
supportCodeYes

Output Schema

NameRequiredDescriptionDefault
reasonNoWhy the PDF wasn't returned.
statusNoCorreios status/business message, when the label isn't printable.
actionUrlNoWhen set (e.g. reason=subscription_required), send the merchant here to finish setup.
labelPdfUrlNoClickable link to download the label PDF — share this with the merchant/customer in chat.
supportCodeNo
prepostagemIdNoThe pré-postagem id the PDF belongs to.
labelPdfBase64NoBase64-encoded label PDF, once ready.
journalUnavailableNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / supportCode / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • addedOutput schema / properties / supportCode / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only say non-destructive, open-world, non-read-only; the description adds real substance on top — it discloses that access controls and existing download rate limits apply, and that only emissions produced through this MCP are covered. It does not explain failure behavior when emission is still pending or the supportCode is unknown, but nothing it claims conflicts with the annotations.

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?

Dense but zero filler: purpose and exclusion come first, then the routing rule to the sibling, then scope and limits. Every clause carries a distinct, actionable constraint.

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 an output schema present, return values need no explanation, and the definition covers scope, credentials-based store resolution, and rate limits. The main remaining gap is what an agent should do on failure (e.g., emission not yet finished), which is implied but not spelled out.

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 coverage is 50%: instanceId is documented as ignored server-side, but supportCode has only format/pattern, no prose. The description compensates by explaining that supportCode is the attempt identifier returned by generate_label, which is exactly the semantic an agent needs to source the value correctly.

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 (recover the PDF of an already-confirmed pre-postage) keyed on supportCode, and immediately distinguishes itself from get_label_pdf and generate_label. An agent can tell which of the three siblings applies without opening any 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 selection rule: use this when you lack prepostagemId or don't know whether emission finished; use get_label_pdf when you have prepostagemId. It also rules out two adjacent intents (creating a label, re-running emission).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.