Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_delete_company

DestructiveIdempotent

Removes a company from the account, stopping its visibility and billing. Existing invoices are retained, but company-scoped API access ends once the NIF is removed.

Instructions

Removes a company from the account: it stops appearing and stops being billed.

  • Existing invoices: those already issued are retained, but the company-scoped API can no longer resolve them once the NIF is removed.

  • What blocks removal: a NIF activated in Live (409 COMPANY_ACTIVE_IN_PRODUCTION), one holding any invoice in Live — issued, draft or proforma (409 COMPANY_HAS_INVOICES) — and the account's primary NIF (400 CANNOT_DELETE_PRIMARY).

  • Deactivating first: switching off in Live is scheduled to the end of the paid cycle, so the removal only becomes possible once that takes effect.

  • Test: NIFs never activated, or activated only in Test, are removed right away, and invoices in Test never block.

  • Idempotency-Key: without one, a retry after a timeout answers 403 instead of the original 204.

Endpoint: DELETE /v1/companies/{company_id}

⚠️ Fiscal guardrails — read before calling:

  • Which company an operation acts on, and how that is selected. (resource: beel://guardrails/multi-nif)

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. Addedv0.5.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint, idempotentHint, readOnlyHint), the description discloses substantial behavioral details: existing invoices are retained but become unresolvable, which NIFs block removal, the deactivation scheduling, and the Idempotency-Key retry behavior (403 vs 204). This goes far beyond what annotations alone provide.

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 structured with bullet points and a warning, making it scannable. It front-loads the core effect and then lists conditional behaviors. While it includes several supplementary details (endpoint, guardrails link), each contributes meaningfully and nothing is redundant. It is slightly longer than ideal but remains focused and well-organized.

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 destructive tool with no output schema, the description covers all essential aspects: what the operation does, what happens to invoices, blocking conditions, the deactivation prerequisite, test vs. live behavior, and idempotency handling. It also points to documentation for exhaustive rules, making it complete for an agent to decide when and how to invoke it.

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 schema description coverage is 100% and the parameter description is already very rich, explaining that company_id is a UUID (not NIF), that it is the only source of context, and that it can yield 403 for non-existent or inaccessible companies. The tool description itself adds no additional parameter-specific information, so a baseline of 3 is appropriate.

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: 'Removes a company from the account: it stops appearing and stops being billed.' This clearly distinguishes it from other delete_* siblings by stating the exact scope (company) and the primary effect. The endpoint is also included, which reinforces the operation's identity.

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 on when removal is possible (Test NIFs immediately, Live after deactivation) and enumerates blocking conditions (active in production, holds invoices, primary NIF). It also mentions deactivation as a prerequisite, implying that a separate tool handles deactivation. However, it does not explicitly name an alternative tool or state 'use this only for permanent deletion,' so it falls just short of the explicit 'when-not' standard.

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