Skip to main content
Glama

list_received_invoices

Read-onlyIdempotent

List NF-e documents other companies issued against this one.

The mirror of list_invoices: that one shows what this company issued, this one what it received. Read-only.

It reads what the API already collected and never calls the tax authority; collection runs every six hours and sync_received_invoices asks now. Each row carries the issuer, the amount, has_full_document and, once one was filed, the manifestation; final_answer_due means only an awareness was filed. Before a manifestation the authority sends a summary only; the full document arrives after one.

Past the plan's monthly allowance each new one costs credit (get_usage).

The result carries sync, how fresh the list is. When sync.status is cooling_down or failing, tell the user the list may be incomplete and when the next read is possible (sync.next_sync_at). When sync.competing_reader is true, give sync.hint: another system (an ERP, the accountant) reads the same CNPJ with the same certificate and only the customer can stop it. Do not call sync_received_invoices before sync.next_sync_at: asking early renews the block.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_received_invoices"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoRows per page, 1 to 100.
offsetNoRows to skip, for the next page: offset + limit.
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
dataNo
pageNo
syncNo
totalNo
per_pageNo
next_pageNo
prev_pageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / $defs / ReceivedSyncStatus
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "How fresh the list is, from the API's DF-e cursor.",
      +  "properties": {
      +    "competing_reader": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Another system reads the same CNPJ's queue (656)."
      +    },
      +    "error_code": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "error_message": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "failing_since": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "gaps_pending": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "hint": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "last_synced_at": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "next_sync_at": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "No read is allowed before this instant (UTC)."
      +    },
      +    "status": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "ok, cooling_down, failing or never."
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / sync
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/ReceivedSyncStatus"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. 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."
  3. Changed2 schema fields changed
    • changedInput schema / properties / company_id / description
      Previous value: -"UUID of the company this call acts for. Omit it when the connection covers a single company; with several it is required (see list_authorized_companies). Send company_id or company_tax_id, never both."New 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."
    • changedInput schema / properties / company_tax_id / description
      Previous value: -"CNPJ or CPF of the company this call acts for, never the recipient or a taxpayer being looked up. Omit it when the connection covers a single company; with several it is required (see list_authorized_companies). Send 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 it if the connection covers a single company; else see list_authorized_companies. company_id or company_tax_id, never both."
  4. Changed2 schema fields changed
    • addedOutput schema / $defs / ReceivedItem / properties / final_answer_due
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "A conclusive answer is still owed."
      +}
    • addedOutput schema / $defs / ReceivedItem / properties / has_full_document
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  5. Changed23 schema fields changed
    • changedInput schema / properties / company_id / description
      Previous value: -"UUID of the company this call acts for, as list_authorized_companies shows it. Omit it when the connection covers a single company: that company is used. Required when the connection covers several — call list_authorized_companies to see them, with their ids and what each one allows. Give company_id or company_tax_id, never both."New value: +"UUID of the company this call acts for. Omit it when the connection covers a single company; with several it is required (see list_authorized_companies). Send company_id or company_tax_id, never both."
    • removedInput schema / properties / company_id / title
      Removed value: -"Company Id"
    • changedInput schema / properties / company_tax_id / description
      Previous value: -"CNPJ or CPF of the company this call acts for — the company using Stackin, never the recipient or a taxpayer being looked up. Punctuation is ignored. Omit it when the connection covers a single company: that company is used. Required when the connection covers several — call list_authorized_companies to see them, with their ids and what each one allows. Give company_id or company_tax_id, never both."New value: +"CNPJ or CPF of the company this call acts for, never the recipient or a taxpayer being looked up. Omit it when the connection covers a single company; with several it is required (see list_authorized_companies). Send company_id or company_tax_id, never both."
    • removedInput schema / properties / company_tax_id / title
      Removed value: -"Company Tax Id"
    • addedInput schema / properties / limit / description
      Added value: +"Rows per page, 1 to 100."
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • addedInput schema / properties / offset / description
      Added value: +"Rows to skip, for the next page: offset + limit."
    • removedInput schema / properties / offset / title
      Removed value: -"Offset"
    • removedInput schema / title
      Removed value: -"list_received_invoicesArguments"
    • removedOutput schema / $defs / ReceivedItem / properties / access_key / title
      Removed value: -"Access Key"
    • removedOutput schema / $defs / ReceivedItem / properties / amount / title
      Removed value: -"Amount"
    • removedOutput schema / $defs / ReceivedItem / properties / issued_at / title
      Removed value: -"Issued At"
    • removedOutput schema / $defs / ReceivedItem / properties / issuer_name / title
      Removed value: -"Issuer Name"
    • removedOutput schema / $defs / ReceivedItem / properties / issuer_tax_id / title
      Removed value: -"Issuer Tax Id"
    • removedOutput schema / $defs / ReceivedItem / properties / manifestation / title
      Removed value: -"Manifestation"
    • removedOutput schema / $defs / ReceivedItem / title
      Removed value: -"ReceivedItem"
    • removedOutput schema / properties / data / title
      Removed value: -"Data"
    • removedOutput schema / properties / next_page / title
      Removed value: -"Next Page"
    • removedOutput schema / properties / page / title
      Removed value: -"Page"
    • removedOutput schema / properties / per_page / title
      Removed value: -"Per Page"
    • removedOutput schema / properties / prev_page / title
      Removed value: -"Prev Page"
    • removedOutput schema / properties / total / title
      Removed value: -"Total"
    • removedOutput schema / title
      Removed value: -"ReceivedList"
  6. Changed2 schema fields changed
    • addedInput schema / properties / company_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 64,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "UUID of the company this call acts for, as list_authorized_companies shows it. Omit it when the connection covers a single company: that company is used. Required when the connection covers several — call list_authorized_companies to see them, with their ids and what each one allows. Give company_id or company_tax_id, never both.",
      +  "title": "Company Id"
      +}
    • addedInput schema / properties / company_tax_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 18,
      +      "minLength": 11,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "CNPJ or CPF of the company this call acts for — the company using Stackin, never the recipient or a taxpayer being looked up. Punctuation is ignored. Omit it when the connection covers a single company: that company is used. Required when the connection covers several — call list_authorized_companies to see them, with their ids and what each one allows. Give company_id or company_tax_id, never both.",
      +  "title": "Company Tax Id"
      +}
  7. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, and the description reinforces read-only and adds that it never calls the tax authority. It also discloses the six-hour collection cadence, per-document credit cost past the plan allowance, and the sync.status/competing_reader/hint semantics, which is substantial context beyond the annotations. That richness pushes it above baseline, though the credit and sync-field details are partly repeated across several paragraphs.

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?

Front-loaded with the purpose and the sibling contrast, then behavior, then operational caveats in priority order. Slightly verbose in the sync/competing_reader paragraph, but every section carries decision-relevant information.

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?

Output schema exists so return values need no explanation, yet the description still explains the key row fields and, crucially, how to interpret sync.status, sync.next_sync_at and sync.hint when reporting to a user. Nothing an agent needs in order to call and interpret this tool 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 limit, offset, company_id and company_tax_id are already fully documented, including the 'send one, never both' rule. The description adds no parameter-level meaning of its own, so baseline 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 ('List NF-e documents other companies issued against this one') and immediately distinguishes itself from list_invoices by scope of issuance vs receipt. An agent can identify this tool without opening the 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?

Explicitly routes between alternatives: list_invoices for issued documents, sync_received_invoices to force a fresh collection, and a hard constraint not to call sync_received_invoices before sync.next_sync_at because it renews the block. Covers when-to-use and when-not-to-use.

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.