Skip to main content
Glama

get_invoice_submissions

Read-onlyIdempotent

Show every attempt made for one invoice and what came back.

This is the tool that answers "why was it rejected". consult_invoice gives the status; this gives the tax authority's own code, its message, and the request and response exactly as they went over the wire. Read-only.

It takes the invoice_id, like reissue_invoice — a rejected document has no access key to look it up by. Get the id from list_invoices.

The rows are attempts, not documents: a reissued invoice has more than one, oldest first, and only the last describes the current state. Quote the authority's message rather than paraphrasing it; the code is what the user will search for.

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": {
      "invoice_id": "<invoice_id>"
    },
    "name": "get_invoice_submissions"
  }
}

Input Schema

NameRequiredDescriptionDefault
company_idNoUUID of the company acted for. Omit for a single company; else see list_authorized_companies. Send one, never both.
invoice_idYesThe local invoice id (a UUID), as list_invoices and issue_invoice return it. Not the access key.
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
attemptsNo
invoice_idNo

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. Changed20 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 / invoice_id / description
      Added value: +"The local invoice id (a UUID), as list_invoices and issue_invoice return it. Not the access key."
    • removedInput schema / properties / invoice_id / title
      Removed value: -"Invoice Id"
    • removedInput schema / title
      Removed value: -"get_invoice_submissionsArguments"
    • removedOutput schema / $defs / SubmissionAttempt / properties / access_key / title
      Removed value: -"Access Key"
    • removedOutput schema / $defs / SubmissionAttempt / properties / created_at / title
      Removed value: -"Created At"
    • removedOutput schema / $defs / SubmissionAttempt / properties / detail / title
      Removed value: -"Detail"
    • removedOutput schema / $defs / SubmissionAttempt / properties / environment / title
      Removed value: -"Environment"
    • removedOutput schema / $defs / SubmissionAttempt / properties / http_status / title
      Removed value: -"Http Status"
    • removedOutput schema / $defs / SubmissionAttempt / properties / id / title
      Removed value: -"Id"
    • removedOutput schema / $defs / SubmissionAttempt / properties / raw_request / title
      Removed value: -"Raw Request"
    • removedOutput schema / $defs / SubmissionAttempt / properties / raw_response / title
      Removed value: -"Raw Response"
    • removedOutput schema / $defs / SubmissionAttempt / properties / status / title
      Removed value: -"Status"
    • removedOutput schema / $defs / SubmissionAttempt / title
      Removed value: -"SubmissionAttempt"
    • removedOutput schema / properties / attempts / title
      Removed value: -"Attempts"
    • removedOutput schema / properties / invoice_id / title
      Removed value: -"Invoice Id"
    • removedOutput schema / title
      Removed value: -"SubmissionList"
  4. 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"
      +}
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, closed-world, so the description focuses on semantics the annotations cannot carry: rows are attempts rather than documents, a reissued invoice yields multiple rows ordered oldest-first, and only the last row reflects current state. It also tells the agent to quote the authority's raw message and code verbatim, which materially shapes correct use.

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 core action, then the sibling comparison, then the prerequisite, then output semantics — a sensible order with no filler. Slightly discursive in the closing advisory about quoting messages, though that sentence carries genuine instruction value.

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?

An output schema exists, so return values need not be described; annotations cover the safety profile and the schema covers all three parameters. What remains ambiguous for a diagnostic multi-row tool — row meaning, ordering, which row is authoritative — is fully addressed.

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 a bump by explaining why invoice_id is the local UUID rather than the access key (rejected documents have no access key). It does not touch company_id/company_tax_id selection, but the schema already documents that mutual exclusivity.

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 ("Show every attempt made for one invoice and what came back") and explicitly draws the boundary with consult_invoice (status) and reissue_invoice (id source). An agent can pick this tool over its siblings 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 use case ("answers 'why was it rejected'"), names the alternative consult_invoice and the condition that separates them, and includes a prerequisite chain: get the invoice_id from list_invoices because a rejected document has no access key.

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.