Skip to main content
Glama

list_invoices

Read-onlyIdempotent

List the invoices this company issued, newest first.

One document type at a time: pass nfse for services or nfe for goods. A company that issues both has to be asked twice.

Use it for "my last invoices", "what was rejected today", and to find a document whose access key the user does not have at hand. Read-only.

An authorized document is stored as issued, which is the value the rows carry; authorized is accepted as a synonym and asks for the same thing.

Every row carries both identifiers the other tools need: id, which reissue_invoice takes, and access_key, which consult_invoice, cancel_invoice and get_invoice_pdf take. A rejected row has an id and no access key — the authorizer never assigned one.

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_invoices"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoRows per page, 1 to 100.
offsetNoRows to skip, for the next page: offset + limit.
statusNoOnly rows in this state. authorized is a synonym for issued. All states when omitted.
company_idNoUUID of the company acted for. Omit for a single company; else see list_authorized_companies. Send one, never both.
document_typeNonfse for a service invoice, nfe for goods.nfse
include_itemsNoKeep each row's item lines and fiscal_operation. Off by default: they are most of the size, and a page of 100 NF-e with them is about 130 KB. consult_invoice brings one document's lines back.
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.
external_referenceNoOnly documents with this external_reference.

Output Schema

NameRequiredDescriptionDefault
dataNoThe rows on this page.
pageNo
totalNoHow many exist, not how many are here.
per_pageNo
next_pageNo
prev_pageNo
total_pagesNo

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. 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."
  3. Changed1 schema field changed
    • changedInput schema / properties / status / anyOf
      Previous value: -[
      -  {
      -    "enum": [
      -      "pending",
      -      "issued",
      -      "authorized",
      -      "rejected",
      -      "cancelled"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "issued",
      +      "authorized",
      +      "rejected",
      +      "cancelled"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  4. Changed1 schema field changed
    • addedInput schema / properties / external_reference
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Only documents with this external_reference."
      +}
  5. Changed30 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 / document_type / description
      Added value: +"nfse for a service invoice, nfe for goods."
    • removedInput schema / properties / document_type / title
      Removed value: -"Document Type"
    • removedInput schema / properties / include_items / title
      Removed value: -"Include Items"
    • 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"
    • addedInput schema / properties / status / description
      Added value: +"Only rows in this state. authorized is a synonym for issued. All states when omitted."
    • removedInput schema / properties / status / title
      Removed value: -"Status"
    • removedInput schema / title
      Removed value: -"list_invoicesArguments"
    • removedOutput schema / $defs / InvoiceListItem / properties / access_key / title
      Removed value: -"Access Key"
    • removedOutput schema / $defs / InvoiceListItem / properties / amount / title
      Removed value: -"Amount"
    • removedOutput schema / $defs / InvoiceListItem / properties / client_name / title
      Removed value: -"Client Name"
    • removedOutput schema / $defs / InvoiceListItem / properties / created_at / title
      Removed value: -"Created At"
    • removedOutput schema / $defs / InvoiceListItem / properties / document_type / title
      Removed value: -"Document Type"
    • removedOutput schema / $defs / InvoiceListItem / properties / id / title
      Removed value: -"Id"
    • removedOutput schema / $defs / InvoiceListItem / properties / status / title
      Removed value: -"Status"
    • removedOutput schema / $defs / InvoiceListItem / title
      Removed value: -"InvoiceListItem"
    • 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 / properties / total_pages / title
      Removed value: -"Total Pages"
    • removedOutput schema / title
      Removed value: -"InvoiceList"
  6. Changed1 schema field changed
    • addedInput schema / properties / include_items
      Added value: +{
      +  "default": false,
      +  "description": "Keep each row's item lines and fiscal_operation. Off by default: they are most of the size, and a page of 100 NF-e with them is about 130 KB. consult_invoice brings one document's lines back.",
      +  "title": "Include Items",
      +  "type": "boolean"
      +}
  7. 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"
      +}
  8. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description focuses on what annotations cannot say: row contents (id and access_key), the fact that rejected rows have an id but no access key, the authorized/issued synonym, and a concrete payload warning (~130 KB for 100 NF-e with include_items). It stops short of describing permission requirements, but the operational context it adds is substantial.

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 main action, then constraints, then use cases, then row semantics — a sensible order. Some sentences wrap awkwardly mid-thought ('A company that issues both has to be asked twice' split across lines) and the access-key paragraph is dense, but no sentence 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?

An output schema exists, so return-field documentation is not required, yet the description still explains the two identifiers an agent needs to chain into other tools. With 8 all-optional parameters and a documented output, only edge cases like multi-company disambiguation are handled indirectly via a sibling pointer — otherwise complete.

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 100%, so baseline is 3; the description earns above baseline by explaining why the identifiers matter downstream ('id, which reissue_invoice takes, and access_key, which consult_invoice, cancel_invoice and get_invoice_pdf take') and by restating the mutual exclusivity of company_id/company_tax_id with the pointer to list_authorized_companies.

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?

Opens with a specific verb and resource plus scope and ordering: 'List the invoices this company issued, newest first.' It immediately narrows behavior with 'One document type at a time: pass nfse for services or nfe for goods,' so an agent can distinguish it from list_received_invoices or consult_invoice without opening a 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 concrete user phrasings that select this tool ('my last invoices', 'what was rejected today', finding a document without its access key) and names alternatives for the cases this tool does not serve: consult_invoice for item lines and list_authorized_companies for resolving the company when multiple exist.

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.