Skip to main content
Glama
BeeL MCP server

BeeL MCP server

Official
by beel-es

beel_create_custom_field_option

Idempotent

Adds a value to a custom field's options for one customer or all customers, reusing an equivalent existing option instead of creating a duplicate.

Instructions

Adds a value to the options of this custom field, for one customer or, without customer_id, common to every customer. Use it to seed a catalogue before the first invoice; values used on invoices are added on their own.

  • Equivalent values: two values are equivalent when they match ignoring case, accents and repeated spaces. If the field already has an equivalent option — of that customer or a common one — no option is created: the response is 200 with the existing option, and its text is kept. Only when nothing equivalent exists is the option created, with 201.

  • Archived options: an equivalent archived option counts as existing. It comes back with 200 and stays archived; reactivate it with PATCH /v1/companies/{company_id}/custom-fields/{key}/options/{option_id}.

  • Suggestions off: a field with suggest_values: false accepts options in the same way, so a catalogue can be prepared before turning suggestions on. They are not offered on invoices while the setting is off.

BeeL API endpoint: POST /v1/companies/{company_id}/custom-fields/{key}/options (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>",
      "body": "<body>"
    },
    "name": "beel_create_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
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.
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.12.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=true, destructiveHint=false) it discloses response-code semantics (200 with the existing option vs 201 on creation), the equivalence rules that trigger the no-op path, and that an equivalent archived option is returned untouched and must be reactivated via a specific PATCH endpoint. It also explains the `suggest_values: false` case, which is behavior no annotation conveys.

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-loads the one-sentence purpose, then uses three labeled bullets for the exception cases. Every bullet carries new information, though the bolded headings and repetition of equivalence examples make it slightly longer than strictly necessary.

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 4-parameter, nested-body mutation with no output schema, the description covers the write's outcomes (200 vs 201, which record is returned), the idempotent collapse behavior, and the archived-option edge case. Nothing an agent needs to call it correctly is missing.

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%, so the baseline is already high, but the description adds meaning beyond the schema by framing `customer_id` presence/absence as the switch between per-customer and common options and by restating the equivalence rule that governs whether `value` produces a new option at all. It does not expand on `idempotency_key`, leaving that entirely to the schema.

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?

States a specific verb and resource ("Adds a value to the options of this custom field") and pins down scope: per-customer when `customer_id` is given, otherwise common to every customer. An agent can tell what it creates without opening the schema. It stops short of naming a sibling such as `beel_patch_custom_field_option` to distinguish creation from modification.

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?

"Use it to seed a catalogue before the first invoice; values used on invoices are added on their own" gives an explicit triggering context and an implicit exclusion. There is no direct pointer to the alternative tool for changing or reactivating an existing option, so the alternative is only partly covered.

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