Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_list_invoices

Read-onlyIdempotent

Retrieve a paginated list of a company's invoices, filterable by status, type, series, customer, issue date range, totals, and free text. Get a focused view of the documents you need.

Instructions

Returns a paginated list of the invoices of this company, filterable by status, type, series, customer, date range and free text. Only the documents of the company in the path are returned.

Endpoint: GET /v1/companies/{company_id}/invoices

⚠️ Fiscal guardrails — read before calling:

  • When an invoice can still be changed, and what to do once it cannot. (resource: beel://guardrails/invoice-state-machine)

For the exhaustive rules and worked examples, call beel_docs_search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number, starting at 1. The response echoes it back as `pagination.current_page`.
typeNoFilter by invoice type
limitNoHow many items to return per page. The response echoes it back as `pagination.items_per_page`.
searchNoGlobal search across invoice number, recipient name, recipient NIF, and series code (partial, case-insensitive)
statusNoFilter by invoice status. Accepts a comma-separated list to match any of several statuses, for example `status=DRAFT,ISSUED`. A single value is also valid.
date_toNoIssue date to (YYYY-MM-DD)
sort_byNoField to sort by (e.g., issue_date, invoice_number, invoice_total)
metadataNoFilter by metadata key/value pairs (exact match, AND between keys). Repeat the bracket-style param to filter on multiple keys. Max 50 pairs per request. Keys must match `^[A-Za-z0-9_\-.]{1,64}$`. Example: `?metadata[external_order_id]=ORD-42&metadata[tenant]=acme`
date_fromNoIssue date from (YYYY-MM-DD)
total_maxNoMaximum invoice total
total_minNoMinimum invoice total
company_idYesUnique identifier (UUID) of the company the operation acts on — its identifier, not its NIF. It is the only source of context: the account that owns it is derived from it, and the `BeeL-Active-Company` header plays no part. A company you do not reach answers `403`, and so does a company that does not exist, so the existence of a company in another account is never disclosed.
sort_orderNoSort directiondesc
customer_idNoFilter by customer UUID
fiscal_onlyNoWhen `true`, returns only fiscal documents (STANDARD, CORRECTIVE, SIMPLIFIED), excluding proformas and any other non-fiscal document. Defaults to `false` (the list returns every document type). Ignored when an explicit `type` is given.
series_codeNoFilter by series code (exact match, case-insensitive). Use `search` for partial matching across the invoice number, recipient and series code.
external_refNoFilter by exact external reference (client-supplied order/cart/contract id).
recipient_nifNoFilter by recipient's NIF (partial search)
invoice_numberNoSearch by invoice number (e.g., 2025/0001)
recipient_nameNoFilter by recipient's fiscal name (partial, case-insensitive search)
taxable_base_maxNoMaximum taxable base
taxable_base_minNoMinimum taxable base
verifactu_statusNoFilter by the VeriFactu submission status of the invoice, using the very same vocabulary that `verifactu.submission_status` publishes on each invoice. `NOT_SUBMITTED` selects issued invoices with VeriFactu enabled whose registration never happened (no live record).
verifactu_enabledNoFilter by whether VeriFactu is enabled for the invoice — the same flag published as `verifactu.enabled`. `false` returns the invoices that never reach AEAT.
rectified_invoice_idNoReturn the corrective invoices that correct this invoice. Accepts the id of an issued invoice; a single invoice can have several partial correctives.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.5.0
    • removedInput schema / $defs / SortOrder / example
      Removed value: -"desc"
    • removedInput schema / $defs / UUID / example
      Removed value: -"550e8400-e29b-41d4-a716-446655440000"
    • removedInput schema / $defs / VeriFactuSubmissionStatus / example
      Removed value: -"ACCEPTED"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / company_id / description
      Previous value: -"NIF (company) the operation acts on. It is the only source of context: the account that owns it is derived from it, and the `BeeL-Active-Company` header plays no part. A NIF you do not reach answers `403`, and so does a NIF that does not exist, so the existence of a NIF in another account is never disclosed."New value: +"Unique identifier (UUID) of the company the operation acts on — its identifier, not its NIF. It is the only source of context: the account that owns it is derived from it, and the `BeeL-Active-Company` header plays no part. A company you do not reach answers `403`, and so does a company that does not exist, so the existence of a company in another account is never disclosed."
  2. First observedv0.3.1

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnlyHint/idempotentHint annotations, the description discloses a critical behavioral caveat: "When an invoice can still be changed, and what to do once it cannot" via a dedicated guardrail resource. It also exposes the path-scoping behavior ("Only the documents of the company in the path are returned"), which is meaningful beyond the structured annotations.

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?

The description is tight and front-loaded: it states the core behavior, then the endpoint, then the critical guardrail pointer, then a docs fallback. No sentence is wasted, and the fiscal guardrail warning is placed before any exhaustive rule explanation, making the structure effective for agent consumption.

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?

For a complex 25-parameter list tool with no output schema, the description covers the essential invocation context: pagination, filtering scope, path scoping, and the important fiscal state-machine caveat. It does not describe the response shape beyond "paginated list", but it is sufficient for an agent to select and call the tool correctly, especially with the pointer to beel_docs_search for exhaustive rules.

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 the schema already fully documents all 25 parameters. The description adds a helpful high-level summary of filter categories ("filterable by status, type, series, customer, date range and free text"), but it does not add meaning beyond what the schema already provides, so a baseline 3 is appropriate.

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 description opens with a specific verb and resource: "Returns a paginated list of the invoices of this company". It also enumerates the filtering dimensions (status, type, series, customer, date range, free text), which makes the tool's purpose immediately distinguishable from singular getters like beel_get_invoice.

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

Usage Guidelines4/5

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

The description clearly contextualizes the tool by stating the endpoint, the company-path scoping, and pointing to beel_docs_search for exhaustive rules. It does not explicitly name sibling alternatives or state when not to use this tool, so it falls short of full alternative-routing guidance, but the usage context is otherwise clear.

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

Deploy Server

Other Tools