Skip to main content
Glama
BeeL MCP server

BeeL MCP server

Official
by beel-es

beel_patch_custom_field_option

Destructive

Update a custom field option's text or archived status without altering saved invoices; rename or reactivate options and handle duplicate-name conflicts safely.

Instructions

Updates only the properties present in the body. Invoices already saved keep the text they were saved with: renaming or archiving an option never changes an invoice.

  • Rename: value replaces the text. If another option of the field in the same scope — the same customer, or the common options for a common one — is equivalent to the new text (ignoring case, accents and repeated spaces), the answer is 409 with CUSTOM_FIELD_OPTION_DUPLICATE and nothing changes.

  • Archive or reactivate: is_archived. Options are never deleted.

BeeL API endpoint: PATCH /v1/companies/{company_id}/custom-fields/{key}/options/{option_id} (reference: https://docs.beel.es)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "company_id": "<company_id>",
      "key": "<key>",
      "option_id": "<option_id>",
      "body": "<body>"
    },
    "name": "beel_patch_custom_field_option"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesKey of the custom field: lowercase letters, digits and `_`, up to 64 characters. A key outside that format answers `422`.
bodyYes
option_idYesUnique identifier of the option.
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.12.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, and the description earns its keep beyond them: merge-patch semantics (omitted properties untouched, nothing clearable, customer scope immutable), duplicate detection returning 409 with `CUSTOM_FIELD_OPTION_DUPLICATE` and no change, and the historical-invoice guarantee. One tension: describing a pure merge patch where identical repeated bodies yield identical results reads as idempotent, while idempotentHint=false is declared — not a flat contradiction (a 409 race could break it) but worth flagging.

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 statement of patch semantics followed by two clearly labelled bullets, one per mutable property, then the endpoint reference. Dense but every sentence carries operational information. Minor cost: the duplicate-matching parenthetical is long and could be tightened.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter mutation with no output schema, the definition covers the risky edges: what happens on conflict (409), what is immutable (customer scope, historical invoice text), and what cannot be done (deletion, clearing). Missing are the success response shape and any permission/scope requirements beyond the implicit company context handled in the schema.

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 75%, and the description still adds meaning the schema does not spell out: `value` is compared against sibling options case-, accent- and whitespace-insensitively to detect duplicates, and `is_archived` is framed as archive-versus-reactivate rather than deletion. It does not touch the three path parameters, which the schema already documents thoroughly.

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?

The description opens with the operative semantics ("Updates only the properties present in the body") and then names the two concrete operations, rename via `value` and archive/reactivate via `is_archived`, on a custom field option. Combined with the endpoint line (PATCH /custom-fields/{key}/options/{option_id}) an agent can identify the verb and resource precisely. It does not explicitly contrast itself with the create/get/list option siblings, so it stops short of a 5.

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?

It gives clear routing between its two modes and states a key exclusion: options are never deleted, so archiving is the substitute for removal. It also warns that renaming/archiving never alters already-saved invoices. What is absent is explicit guidance on when to reach for this versus `beel_create_custom_field_option` or an upsert on the parent field.

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