Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_generate_payment_event_draft

Creates a draft invoice for payment events that failed automatic invoicing, applying the same tax and recipient rules, so you can review and issue it yourself.

Instructions

Builds a draft invoice from a payment event that could not be invoiced automatically, applying the same recipient resolution and tax treatment the automatic flow would have applied, under the NIF in the path. The document is left as a draft: it is not issued, not numbered against the series and not emailed — issue it yourself once it is right.

Only events that produced no invoice can produce a draft; otherwise the request returns 400. If invoicing rules reject the resulting document the request returns 422 and no draft is created.

Endpoint: POST /v1/companies/{company_id}/payment-connections/{provider}/events/{event_id}/draft

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_idYesIdentifier of the payment event, as returned by the list operation.
providerYesPayment provider slug in **lowercase**. Currently only `stripe` (Stripe Connect) is operative; `woocommerce` and `shopify` are reserved for future providers.
company_idYesNIF (company) the events belong to. 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.
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.
Behavior4/5

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

Annotations already indicate readOnlyHint=false, so the description goes beyond by detailing what is NOT done (not issued, numbered, emailed) and the draft state. It also discloses security behavior (403 for inaccessible NIFs) and error responses, adding valuable context beyond the 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?

Three concise paragraphs, each with a clear purpose: functionality, error conditions, and endpoint. No fluff, front-loaded with the primary action, and every sentence contributes to understanding.

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 creation tool with no output schema, it covers the essential operational context: preconditions, error cases, and the manual follow-up action. It could mention retrieval or further steps beyond issuing, but the description is sufficiently complete for correct invocation.

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% and the parameter descriptions are extremely detailed (e.g., provider enum, company_id NIF behavior, idempotency_key semantics). The tool description itself adds no parameter meaning, so the baseline of 3 is appropriate; the schema carries the full burden.

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 states a specific action ('Builds a draft invoice') with the exact resource (payment event) and context (could not be invoiced automatically). It clearly distinguishes itself from the automatic flow and siblings like beel_retry_payment_event or beel_get_payment_event by specifying it produces a draft, not an issued invoice.

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?

Explicitly defines when to use: only for events that produced no invoice. It also provides the 400/422 error conditions as guardrails, and instructs the agent to issue the draft manually. This gives clear usage context and excludes misuse.

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