Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_activate_company

Idempotent

Activates a company in TEST or PROD mode, registering its NIF with AEAT in PROD and handling billing via checkout when no card is on file. Idempotent and cancels pending switch-offs.

Instructions

Switches an existing company on in the mode carried in the body. The mode is always explicit and never taken from the credential's environment, so a Test key can switch a NIF on in Live.

Modes and billing

  • TEST: immediate and free.

  • PROD: immediate when the account already has a card on file or an enterprise contract, and the NIF is added to the existing subscription. With no card on file it answers 402 CHECKOUT_REQUIRED, returning a checkout_url when success_url and cancel_url are supplied. It also requires being the billing subject of the account (403 NOT_BILLING_OWNER otherwise).

Idempotency and pending switch-offs

  • Repeating the call: opens no second checkout and adds no second subscription item; it returns the existing activation with already_active: true. The same Idempotency-Key sent to this route and to the nested one it replaces is the same operation, so it is replayed and never charged twice.

  • A pending switch-off is cancelled: while it is pending the NIF is still on — it just carries an effective date — so switching it on again only removes that date, answers scheduled_deactivation_cancelled: true, and charges or credits nothing.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
company_idYesUnique identifier (UUID) of the company being switched 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.
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already include idempotentHint, but the description adds substantial behavior beyond them: mode is never inferred from the credential environment, PROD may return 402 with a checkout_url, 403 is returned for non-billing-owners, repeated calls return already_active and no second charge, and pending switch-offs are cancelled without charging. This is rich, non-redundant transparency.

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?

The description is organized under clear headings — modes/billing and idempotency — with the core purpose in the first sentence. Bullet points keep the billing and safety semantics digestible, and each sentence contributes unique operational knowledge rather than padding.

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 state-changing activation with billing and idempotency complexity and no output schema, the description covers the important outcomes: immediate vs checkout-required activation, error conditions, repeated-call behavior, and pending switch-off cancellation. An agent has enough to decide if this tool fits and to anticipate the main responses.

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 descriptions already cover company_id, idempotency_key, and the body fields well (67% coverage). The description supplements this by explaining that the environment/mode is always explicit and never taken from credentials, and by tying success_url/cancel_url to the checkout flow. It adds meaningful context without repeating the schema.

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 opening sentence names the specific operation — 'Switches an existing company on' — with the body-carried mode and the actor/scope called out. It is clearly distinct from siblings like beel_deactivate_company and beel_delete_company because the object ('company') and action ('activate on') are explicit.

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 clear context for when to call this tool: to activate a company in TEST or PROD, with concrete consequences for each mode. It does not explicitly name sibling alternatives or say 'use X instead', so it stops short of a 5, but the conditions around billing, checkout, and ownership are strong usage guidance.

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