Skip to main content
Glama
Dev10x-Guru
by Dev10x-Guru

list_recent_invoices

Retrieve invoice metadata from the last thirty days per subject type. Read-only and argument-free, it lists up to 50 invoices individually or summarizes counts and totals for larger volumes.

Instructions

List the invoice metadata of the last thirty days, per subject type.

Takes no arguments, for the same reason synchronise_invoices takes none: a window driven by the caller spends a twenty-per-hour metadata allowance in minutes, and the Ministry reads that pattern as working around a limit. The window ends on the hour, so asking again within the same hour is answered from disk and costs nothing.

Reads only. There is no confirmation to click: a gate on a read teaches the person to approve without looking, and spends the gate that a write needs.

At most fifty invoices are listed individually. Above that the rows are dropped and the answer carries the count and the gross total per currency instead — and message says so in as many words. An empty window is its own answer, restating the NIP, the environment, the subject type and both ends of the period, so "nothing arrived" can be told from "wrong question".

Metadata only. An FA(2)/FA(3) body holds a counterparty's personal data and is third-party input; it never enters this answer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nipYes
messageYes
warningsNo
period_toYes
thresholdYes
environmentYes
period_fromYes
subject_rolesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.3.4
    • removedOutput schema / $defs / DirectionListingResult
      Removed value: -{
      -  "properties": {
      -    "complete": {
      -      "title": "Complete",
      -      "type": "boolean"
      -    },
      -    "from_cache": {
      -      "title": "From Cache",
      -      "type": "boolean"
      -    },
      -    "gross_totals": {
      -      "items": {
      -        "$ref": "#/$defs/GrossTotal"
      -      },
      -      "title": "Gross Totals",
      -      "type": "array"
      -    },
      -    "invoice_count": {
      -      "title": "Invoice Count",
      -      "type": "integer"
      -    },
      -    "invoices": {
      -      "items": {
      -        "$ref": "#/$defs/InvoiceRow"
      -      },
      -      "title": "Invoices",
      -      "type": "array"
      -    },
      -    "message": {
      -      "title": "Message",
      -      "type": "string"
      -    },
      -    "outcome": {
      -      "title": "Outcome",
      -      "type": "string"
      -    },
      -    "queried_at": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Queried At"
      -    },
      -    "subject_type": {
      -      "title": "Subject Type",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "subject_type",
      -    "outcome",
      -    "message",
      -    "invoices",
      -    "invoice_count",
      -    "gross_totals",
      -    "complete",
      -    "queried_at",
      -    "from_cache"
      -  ],
      -  "title": "DirectionListingResult",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / SubjectRoleListingResult
      Added value: +{
      +  "properties": {
      +    "complete": {
      +      "title": "Complete",
      +      "type": "boolean"
      +    },
      +    "from_cache": {
      +      "title": "From Cache",
      +      "type": "boolean"
      +    },
      +    "gross_totals": {
      +      "items": {
      +        "$ref": "#/$defs/GrossTotal"
      +      },
      +      "title": "Gross Totals",
      +      "type": "array"
      +    },
      +    "invoice_count": {
      +      "title": "Invoice Count",
      +      "type": "integer"
      +    },
      +    "invoices": {
      +      "items": {
      +        "$ref": "#/$defs/InvoiceRow"
      +      },
      +      "title": "Invoices",
      +      "type": "array"
      +    },
      +    "message": {
      +      "title": "Message",
      +      "type": "string"
      +    },
      +    "outcome": {
      +      "title": "Outcome",
      +      "type": "string"
      +    },
      +    "queried_at": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Queried At"
      +    },
      +    "subject_role": {
      +      "title": "Subject Role",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "subject_role",
      +    "outcome",
      +    "message",
      +    "invoices",
      +    "invoice_count",
      +    "gross_totals",
      +    "complete",
      +    "queried_at",
      +    "from_cache"
      +  ],
      +  "title": "SubjectRoleListingResult",
      +  "type": "object"
      +}
    • addedOutput schema / properties / message
      Added value: +{
      +  "title": "Message",
      +  "type": "string"
      +}
    • addedOutput schema / properties / subject_roles
      Added value: +{
      +  "items": {
      +    "$ref": "#/$defs/SubjectRoleListingResult"
      +  },
      +  "title": "Subject Roles",
      +  "type": "array"
      +}
    • removedOutput schema / properties / subject_types
      Removed value: -{
      -  "items": {
      -    "$ref": "#/$defs/DirectionListingResult"
      -  },
      -  "title": "Subject Types",
      -  "type": "array"
      -}
    • addedOutput schema / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Warnings",
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "nip",
      -  "environment",
      -  "threshold",
      -  "period_from",
      -  "period_to",
      -  "subject_types"
      -]New value: +[
      +  "nip",
      +  "environment",
      +  "message",
      +  "threshold",
      +  "period_from",
      +  "period_to",
      +  "subject_roles"
      +]
  2. Changed2 schema fields changedv0.3.1
    • removedOutput schema / properties / period_to / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / period_to / type
      Added value: +"string"
  3. Addedv0.3.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so thoroughly: it discloses read-only semantics, absence of confirmation flow, a 50-invoice cap with aggregated fallback, the empty-window self-describing response, and the exclusion of personal data. These are non-obvious, agent-relevant behaviors that go far beyond a bare action statement.

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?

The opening sentence is a model of front-loaded clarity, but the remaining paragraphs are dense and stylized, with narrative explanations that could be tightened. Every sentence carries meaningful behavioral information, so nothing is wasted, but the overall length is greater than necessary for the simplicity of the tool.

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?

Given zero parameters, a rich output schema, and no annotations, the description still covers all critical agent-facing edge cases: the 50-row limit, aggregated totals, empty results, read-only guarantee, and privacy constraints. It leaves no meaningful ambiguity about how the tool behaves in unusual circumstances.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and the schema covers this fully. The description goes further by explaining why there are no arguments—the caller-driven window would consume the metadata allowance—which gives an agent semantic understanding of the parameter absence and prevents attempts to pass unsupported arguments.

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?

The first sentence states a specific verb ('List'), a concrete resource ('invoice metadata'), a clear time window ('the last thirty days'), and a grouping ('per subject type'). This immediately distinguishes it from siblings like render_invoice_pdf or export_period_statement, and the later reference to synchronise_invoices further separates its read-only, metadata-focused role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains why the tool takes no arguments, mentions the metadata allowance, and notes it is read-only, which implies safe usage. However, it never explicitly states when to choose this tool over alternatives such as synchronise_invoices or review_new_invoices, nor does it name exclusions or conditions that would route an agent to a different sibling.

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