Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_patch_by_id

Idempotent

Update editable company fields (NIF, address, banking, invoice customization) via PATCH, enforcing fiscal identity immutability and Live/Test write restrictions.

Instructions

Updates the editable fields of a company (NIF); the set is the one UpdateCompanyRequest declares. nif, entity_type and legal_form are immutable once set, and changing legal_name requires the NIF to pass an AEAT census re-validation — which for a company checks the CIF only, so it cannot fail because of the name sent.

Once the company is activated in Live, a test credential may only write the fields that affect how the invoice looks: logo_url, invoice_accent_color, invoice_template_type, invoice_language, email_language and additional_info. Any other field describes the real business — fiscal address, legal representative, bank details, contact data, IAE, activity start date, payment term — and answers 422 FISCAL_IDENTITY_LIVE_ONLY from Test, since the company is a single record shared by both modes. A company not activated in Live accepts the whole body from Test, and sending a field its current value is never a change.

The 200 returns CompanyData, which carries the identity of the NIF and not the rest of the request body. The rendering fields are read back from GET /v1/companies/{company_id}/invoice-customization; the remaining ones are write-only. The invoice series are read from GET /v1/companies/{company_id}/series.

Endpoint: PATCH /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
bodyYes
company_idYesNIF (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.
Behavior5/5

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

Annotations only declare readOnlyHint=false, idempotentHint=true, destructiveHint=false. The description goes far beyond: it explains immutability of `nif`, `entity_type`, `legal_form`, the AEAT census re-validation for `legal_name`, the write-only nature of most fields, the return type `CompanyData` that excludes the request body, and the exact live/test restrictions. This fully discloses side effects and response behavior without contradicting any annotation.

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 long but well-structured: it starts with the core purpose, then immutability, live/test rules, return behavior, and finally guardrails. Each paragraph carries essential information and the guardrail section is clearly separated. It could be slightly tightened (e.g., merging some repetitions about write-only fields), but the length is justified by the complexity of the rules.

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 return semantics (what `CompanyData` carries, which fields are read back from other endpoints), references the exact endpoint (`PATCH /v1/companies/{company_id}`), and points to exhaustive documentation. It also mentions the account/context derivation and the `BeeL-Active-Company` header non-involvement, which is essential for correct invocation. Nothing critical is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although the schema already provides descriptions for each field (NIF format, immutability notes, etc.), the description adds critical operational semantics: it distinguishes the six fields writable from Test on a Live company, clarifies that the rest are write-only and answered with `422`, and specifies that sending a field its current value is never a change. This goes beyond the schema's per-field descriptions and directly guides parameter choice.

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 verb ('Updates') and a precise resource ('editable fields of a company (NIF)'), and immediately scopes the field set to `UpdateCompanyRequest`. It differentiates from related operations by focusing on the patch semantics and by detailing immutability rules, which makes it unambiguous among the sibling tools that also write company data (create, activate, deactivate).

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?

The description gives explicit when-to-use context: it enumerates which fields are writable from Test on a Live-activated company, which fields trigger AEAT re-validation, and what error (`422 FISCAL_IDENTITY_LIVE_ONLY`) results from disallowed writes. It also directs the agent to `beel_docs_search` for exhaustive rules, and the guardrails pointer adds a resource-specific prerequisite. This clearly conditions invocation on credential mode and field selection.

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