Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_ensure_default_series

Idempotent

Create missing default invoice series for standard, simplified, and corrective documents, keeping existing defaults, and return the full resulting set.

Instructions

Ensures the company has a default invoice series for STANDARD, SIMPLIFIED and CORRECTIVE in the current environment, and returns the resulting set. The request takes no body: the desired end state is one default per document type, so repeating it changes nothing.

  • Already there: a document type that already has a default keeps it, and it is returned unchanged.

  • Missing: it is created with code F, S or R and format {CODIGO}-{YYYY}-{NUM:4}, active and marked as default.

  • Code taken: if that code already belongs to another series, the document type is omitted from the response and is left with no default.

Closed catalogue. This collection is fixed and bounded — one entry per DocumentType: it carries no pagination, it takes no page/limit, and every response holds the whole set.

Endpoint: PUT /v1/companies/{company_id}/series/defaults

⚠️ Fiscal guardrails — read before calling:

  • 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
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. Changed2 schema fields changedv0.5.0
    • 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.2/5.0
Behavior5/5

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

Annotations already include idempotentHint and destructiveHint, and the description adds rich behavioral detail: already-present defaults are kept, missing ones are created with specific codes/formats, and a taken code results in omission rather than overwrite. It also discloses the closed-catalogue no-pagination behavior and points to fiscal guardrails. No contradiction with annotations.

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 longer than average, but it is tightly structured with a lead summary, behavior bullets, and a guardrail note. Each section earns its place; the only minor redundancy is the closed-catalogue paragraph restating constraints already implied by 'fixed and bounded.'

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?

Despite lacking an output schema, the description covers the return behavior (resulting set, unchanged vs created vs omitted), edge cases (code taken), idempotency, and where to find exhaustive rules. It even includes a fiscal-guardrails pointer, making it sufficient 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?

The single company_id parameter is already fully documented in the schema (100% coverage), including that it is a UUID, not a NIF, and how account context is derived. The description adds only the endpoint path reference and 'current environment' nuance, which does not materially raise the value above the schema baseline.

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: it 'ensures' the company has a default invoice series for STANDARD, SIMPLIFIED, and CORRECTIVE types and returns the resulting set. This makes its purpose distinct from the siblings beel_get_default_series and beel_set_default_series by emphasizing the idempotent ensure-all behavior.

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?

It clearly establishes when calling is useful ('the desired end state is one default per document type') and that repetition is harmless, but it never names or contrasts the closest sibling beel_set_default_series. No explicit when-not or alternative-routing guidance is provided, so the agent is left to infer when the single-series setter is better.

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