Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_create_invoice

Creates and issues Spanish invoices for a company, handling VeriFactu AEAT submission, PDF generation, and email delivery. Supports standard, simplified, and proforma types.

Instructions

Creates an invoice under this company (NIF); the issuer data is taken from the company in the path. With issue_directly: true the invoice is numbered and issued in the same call, and verifactu.submission_status comes back as PENDING, since submission to AEAT is asynchronous: a 2xx means accepted for submission, never registered with AEAT.

A proforma (type: PROFORMA) is a non-fiscal document: it is created directly in its only working state ACTIVE, numbered PRO-... from the non-fiscal series, and issue_directly does not apply to it. To copy an existing invoice into a new draft use POST …/invoices/derivations, which carries neither type, nor recipient, nor lines.

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

⚠️ Fiscal guardrails — read before calling:

  • How BeeL derives the AEAT invoice type, and the rules each type imposes. (resource: beel://guardrails/invoice-types)

  • How a line states its price, and which field combinations are rejected. (resource: beel://guardrails/invoice-lines)

  • What regime_key means, where it lives, and which combinations are rejected. (resource: beel://guardrails/regime-keys)

  • Why a name that does not match the census makes an invoice unsubmittable. (resource: beel://guardrails/nif-validation)

  • Why an issued invoice may never reach AEAT, and how to tell before issuing. (resource: beel://guardrails/verifactu-gates)

  • How invoice numbers are formed, and why numbering can never be rewritten. (resource: beel://guardrails/series-and-numbering)

For the exhaustive rules and worked examples, call beel_docs_search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
company_idYesNIF (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.
wait_for_pdfNoSame flag as `options.wait_for_pdf`. Only applies when the invoice is issued in this call (`options.issue_directly: true`).
idempotency_keyNoOptional idempotency key for this operation. Omit it and one is derived from the request itself, which makes a blind retry safe but also collapses a SECOND, deliberately identical operation into the first for 24 hours. Set it — to an order id, or anything unique per intended operation — whenever you mean to create something that may look identical to what you just created.
Behavior5/5

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

The annotations are weak (readOnlyHint=false, openWorldHint=true, no destructive info), so the description carries the full behavioral burden — and it delivers. It discloses the crucial async semantics: a 2xx means 'accepted for submission', never 'registered with AEAT', with submission_status returned as PENDING. It also discloses that proforma is created directly in ACTIVE state, numbered PRO- from the non-fiscal series, and that issue_directly does not apply to it. This goes well beyond the schema, and there is no contradiction with the annotations — the write/issue semantics align with readOnlyHint=false.

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 description is long but dense, and nearly every sentence earns its place: core semantics, proforma exception, derivation alternative, endpoint, and the guardrail pointers. It is well front-loaded with the issue_directly and submission_status semantics before the proforma aside. The six-bullet guardrail list is somewhat verbose but each bullet points to a distinct legal constraint, and closing on the beel_docs_search referral is a sensible compression strategy. Slightly long, but appropriately so for the complexity.

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?

For a tool of this magnitude — a nested body schema, no output schema, weak annotations — the description is remarkably complete. It covers the async submission semantics, the proforma special case, the derivation sibling, the endpoint, and surfaces six guardrail resources plus a docs-search fallback for exhaustive rules. Nothing an agent needs to call it correctly is missing; the external resource pointers are the correct way to handle the depth of Spanish fiscal law here.

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 high at 75%, so the schema already documents most parameters in exhaustive detail. The description adds real semantic value on top for the highest-stakes parameters: it explains what issue_directly actually does (numbered and issued in the same call), the verifactu submission_status=PENDING meaning, and how type: PROFORMA behaves. Given the schema does the heavy lifting, the description's targeted clarification of the trickiest fields earns a 4 rather than the baseline 3.

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: 'Creates an invoice under this company (NIF)' with issuer data drawn from the company in the path. It clearly distinguishes itself from siblings by name — it routes copying to beel_create_invoice_derivation, notes CORRECTIVE is handled elsewhere, and lays out proforma issuance behavior. An agent can immediately tell what this tool does and what it is not.

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 gives contextual usage guidance: the issue_directly vs draft distinction, when proforma semantics apply, and an explicit pointer to derivations for copying an existing invoice. However, it does not explicitly contrast against close siblings like beel_create_invoice_batch or beel_create_recurring_invoice, and only implicitly implies CORRECTIVE lives on beel_create_corrective_invoice via the schema rather than the description prose. Clear context with one named alternative, but not a systematic when-to-use/when-not-to-use matrix.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/beel-es/beel-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server