Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_ensure_default_series

Idempotent

Ensures a company has one default invoice series for standard, simplified, and corrective documents, creating missing defaults and returning the 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

⚠️ Read before calling:

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

  • How a series formats numbers, and which series configurations are rejected. (resource: beel://guardrails/series-and-numbering)

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.1/5.0
Behavior5/5

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

Goes well beyond the annotations by enumerating the three outcomes: already-present (returned unchanged), missing (created with code F/S/R and format {CODIGO}-{YYYY}-{NUM:4}), and code-taken (type silently omitted and left with no default). That last partial-failure case is exactly the kind of behavior annotations cannot convey, and the closed-catalogue/no-pagination note closes the loop.

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 core purpose and organized into labeled bullets that each carry distinct information. It is somewhat long, and the 'Closed catalogue' paragraph could be tightened, but no sentence is pure filler.

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 mutation endpoint with no output schema, the description fully covers the response contract (the resulting set, with omissions named), the safety profile (idempotent, non-destructive), and the relevant domain references. An agent has everything needed to call it and interpret the result.

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 single company_id parameter is documented exhaustively in the schema (UUID, header independence, 403 behavior). The description adds nothing about parameters, so the baseline 3 for fully-covered schemas applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('ensures') plus the exact resources (default invoice series for STANDARD, SIMPLIFIED, CORRECTIVE) and return behavior. It is clearly differentiated from a plain read like get_default_series, but it never names the near-siblings (beel_set_default_series, beel_create_series), leaving that distinction to be inferred.

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?

Explains the calling context well: no request body, an ensure/idempotent semantic where repeating changes nothing, and it routes the agent to beel_rules_list and beel://guardrails resources before calling. It lacks an explicit when-not-to-use or a direct pointer to set_default_series as the alternative, so it stops short of a 5.

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