Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_get_recurring_invoice_stats

Read-onlyIdempotent

Retrieve company-wide recurring invoice statistics: count of active schedules, total monthly forecast, and monthly amount halted by failed automatic generation.

Instructions

How many recurring schedules this company has alive, what they add up to per month, and how much invoicing is stopped because the unattended generation broke.

It is the whole company, and it takes no filters. It is an anchor, not a summary of whatever the list is showing: narrowing the list by customer or by status does not move these figures. Pagination does not apply either — the numbers cover every schedule of the company, not a page of them.

The two amounts are never added together. active.monthly_amount is a forecast of what is going to be invoiced; stopped.monthly_amount is invoicing that should be happening and is not. There is deliberately no grand total in the response.

The per-schedule figures behind them are the same ones GET /v1/companies/{company_id}/recurring-invoices publishes as amount, so the rows and this header cannot drift: adding the amount of every active row by hand gives active.monthly_amount exactly, to the cent.

Filters of the list are rejected, not ignored: sending status, customer_id or any other unknown parameter answers 400 naming it. Asking for a filtered header and getting whole-company figures back with a 200 would be worse than being told no.

Endpoint: GET /v1/companies/{company_id}/recurring-invoices/stats

⚠️ Read before calling:

  • Fiscal rules, domains simplified, taxes: beel_rules_list with domain, or resource beel://guardrails/.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive), and the description adds substantial behavior beyond that: no pagination applies, filter params are rejected rather than ignored (400 naming the parameter), the two amounts are never summed, and there is deliberately no grand total. That is exactly the kind of non-obvious contract an agent needs.

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 three headline figures and organized with bold emphasis on the key caveats. It is on the long side and lightly redundant (the 'never added together' point is restated as 'no grand total'), but each block carries real contract 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?

With no output schema, the description carries the return-value burden and does so: it names the active.monthly_amount and stopped.monthly_amount fields, explains their semantics, and states that per-schedule figures reconcile to the list endpoint's `amount` field. An agent has enough to interpret and call the tool correctly.

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?

Only one parameter (company_id) and schema coverage is 100%, with the schema already documenting UUID format, 403 semantics, and that the BeeL-Active-Company header is irrelevant. The description adds no parameter-level detail beyond what the schema provides, so the 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 precisely what the tool returns: a count of live recurring schedules, the active monthly forecast amount, and the stopped/invoicing-not-happening amount. It also explicitly separates itself from the list endpoint by declaring it is whole-company and takes no filters, so an agent can tell it apart from beel_list_recurring_invoices 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?

Explicit when/when-not: it is an 'anchor, not a summary of whatever the list is showing', narrowing the list does not move these figures, and filters are rejected with a 400. It also routes to beel_rules_list for fiscal/guardrail context. Nothing about selection is left to inference.

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