Skip to main content
Glama

get_received_invoice_xml

Read-onlyIdempotent

Return the full XML (procNFe) of an NF-e issued against this company. Read-only and never charged.

Only when list_received_invoices shows has_full_document; for a summary the answer says to manifest first. An XML above 500 KB is not inlined: the answer says to download it from the API instead.

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": {
      "access_key": "<access_key>"
    },
    "name": "get_received_invoice_xml"
  }
}

Input Schema

NameRequiredDescriptionDefault
access_keyYesThe 44-character access key of the received NF-e, as list_received_invoices returns it.
company_idNoUUID of the company acted for. Omit for a single company; else see list_authorized_companies. Send one, never both.
company_tax_idNoCNPJ or CPF of the company acted for, never the recipient or a taxpayer looked up. Omit for a single company; else see list_authorized_companies. Send one, never both.

Output Schema

NameRequiredDescriptionDefault
xmlYesThe procNFe, as stored.
access_keyYes
size_bytesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / company_id / description
      Previous value: -"UUID of the company acted for. Omit it if the connection covers a single company; else see list_authorized_companies. company_id or company_tax_id, never both."New value: +"UUID of the company acted for. Omit for a single company; else see list_authorized_companies. Send one, never both."
    • changedInput schema / properties / company_tax_id / description
      Previous value: -"CNPJ or CPF of the company acted for, never the recipient or a taxpayer looked up. Omit it if the connection covers a single company; else see list_authorized_companies. company_id or company_tax_id, never both."New value: +"CNPJ or CPF of the company acted for, never the recipient or a taxpayer looked up. Omit for a single company; else see list_authorized_companies. Send one, never both."
  2. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, but the description adds two facts outside them: that the call is 'never charged' (billing behavior) and that XML above 500 KB is not inlined, with the fallback being an instruction to download from the API. The only gap is that it doesn't say what the truncated/large-document response actually looks like at the field level, which is partly covered by the output schema.

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, zero filler, with the purpose and scope constraint front-loaded before the edge-case fallback. Every sentence carries a distinct decision-relevant fact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-document read tool with an output schema and full annotation coverage, the description supplies exactly the extra pieces an agent needs: the precondition, the read-only/no-cost profile, and the large-document fallback. Nothing required to call it correctly is missing.

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 access_key, company_id and company_tax_id are fully documented in the schema, including the 'send one, never both' rule. The description adds no syntax or format detail beyond that, so the baseline of 3 applies.

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 ('Return the full XML (procNFe) of an NF-e issued against this company') and immediately scopes it against the sibling that produces the document list ('Only when list_received_invoices shows has_full_document'). An agent can pick this tool versus list_received_invoices or manifest_received_invoice 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 precondition ('Only when list_received_invoices shows has_full_document') and an explicit when-not path ('for a summary the answer says to manifest first'). The alternative action is named, not merely implied, so the agent knows what to do instead of calling this tool.

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.