Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_patch_company

Update editable company fields: address, contact, bank details, legal representative, and invoice customization, while preserving immutable fiscal data. Returns confirmed stored company information.

Instructions

Updates the editable fields of a company; the set is the one UpdateCompanyRequest declares.

  • Immutable fields: nif, entity_type and legal_form, once set.

  • legal_name: changing it 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.

Test credentials on a Live company

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.

What comes back

The 200 returns CompanyData with every field this request accepts, under the same name and the same type — so the response is the confirmation of what was stored, and a later GET says the same. A field you never set comes back absent, which means "nothing stored", not "hidden".

Two things live outside this body and keep their own reads: the invoice series (GET /v1/companies/{company_id}/series) and the rendering block, which is also served on its own by GET /v1/companies/{company_id}/invoice-customization.

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

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

The description goes far beyond annotations: immutable fields, AEAT re-validation semantics, Test-vs-Live behavior, the 422 FISCAL_IDENTITY_LIVE_ONLY error, response shape, and absence semantics are all disclosed. It does not contradict readOnlyHint=false or openWorldHint=true; in fact, the 'absent means nothing stored' behavior reinforces openWorldHint.

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 long but well-structured with sections for immutable fields, Test credentials, return behavior, and exclusions. Each section earns its place for a mutation tool with this many guardrails, and the first sentence immediately establishes the core purpose.

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 having no output schema, the description explains exactly what the 200 returns and its relationship to a later GET. It covers the edge cases an agent needs to call this safely: field restrictions, immutable values, Test-vs-Live behavior, related endpoints, and a pointer to guardrails and exhaustive docs.

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 coverage is only 50%, so the description has to compensate, and it does: it highlights immutable fields, the writable Test-credential field set, and the legal_name revalidation behavior. The per-field schema definitions are already rich, and the description adds decision-relevant semantics on top rather than repeating every field.

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: 'Updates the editable fields of a company', and names the exact request schema. The endpoint and field-set restrictions differentiate it from create/delete/get company tools even without naming a sibling explicitly.

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 the call is valid, especially the Test-credential restrictions on Live-activated companies and the immutable-field rules. It doesn't explicitly state 'use another tool for X', but it does clarify what this tool does not touch (invoice series, rendering block) and points to beel_docs_search for exhaustive rules.

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