Skip to main content
Glama
BeeL MCP server

BeeL MCP server

Official
by beel-es

beel_create_account_import

Idempotent

Provisions managed accounts from an uploaded CSV, activates each eligible account in Live, and leaves them ready to invoice; re-runs reconcile existing records by external reference.

Instructions

Provisions the managed accounts described in an uploaded file, switches each one on in Live, and leaves them ready to invoice. It is the same act as calling POST /v1/accounts once per row and then POST /v1/companies/{company_id}/activations, with the bookkeeping done for you.

Idempotency and re-runs

  • Not atomic: each row is processed and reported independently, and a row that fails leaves the rows already provisioned in place. statistics.accounts_created is how many accounts this call actually created.

  • Declarative and re-runnable: each pass applies only what is missing — an external_ref you already provisioned is reconciled, not duplicated, and so are its series and its customers. That is the recovery path for anything that went wrong: fix the cause and upload the same file again; there is no resume and no partial state to clean up.

  • Idempotency-Key: required, but the real guarantee is in the data. Rows are idempotent by external_ref, so the same file uploaded twice creates nothing twice even under a different key.

  • Dry run: to see what this would do without writing anything, use POST /v1/accounts/imports/preview, a separate operation with no effects at all — the import is never governed by a boolean flag.

Files and limits

  • accounts_file: describes the accounts, one per row.

  • customers_file: optional, and holds a list of customers applied to every account of the import, new and pre-existing alike, so a new managed account is born knowing all the customers and a new customer reaches all the accounts on the next pass. It is the same CSV that GET /v1/templates/customer-import describes, and it is idempotent by tax id.

  • options.apply_customers_to_own_company: lands those customers on your own company as well — the one in focus, never one chosen for you. That outcome comes back apart, in own_company_customers, and stays out of statistics.customers_created.

  • Limits: 5 MB per file, 100 rows in the accounts file and 1,000 in the customers file. A larger population is imported in passes, which costs nothing because the file is declarative.

Live activation

Live activation is part of the act: every row is weighed against the same verdict the account state publishes, and only rows entitled to Live are executed; the rest come back BLOCKED with the reason. The import never opens a checkout, so it never charges you by surprise: settle your billing once and re-upload.

If your agreement caps the NIFs you can have in Live, each row switched on takes a place, in file order; the rows that no longer fit come back BLOCKED with NIF_LIMIT_REACHED, the same code POST /v1/companies/{company_id}/activations answers with.

Claim tokens

account.claim_token and account.claim_url: each newly provisioned row carries them in this response and nowhere else, so persist them before discarding it. A lost token is re-issued with POST /v1/accounts/{account_id}/claim-tokens.

Re-uploading the file never breaks the links you already handed out: a row whose account is still unclaimed and holds a valid claim link comes back with claim_token and claim_url null and account.claim_link_already_issued: true. Only an account with no valid link left (expired, or never issued) gets a fresh one.

BeeL API endpoint: POST /v1/accounts/imports (reference: https://docs.beel.es)

Input Schema

NameRequiredDescriptionDefault
bodyYes
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.10.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare idempotentHint=true and destructiveHint=false, but the description goes far beyond them: it discloses non-atomicity with per-row failure, idempotency keyed on `external_ref` rather than the `Idempotency-Key`, file and row limits, the NIF_LIMIT_REACHED blocking rule, and that claim tokens appear in this response and nowhere else. It also warns that a failed row leaves earlier rows provisioned and that billing settlement can happen via re-upload.

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 definition is long but front-loaded and sectioned under headings that let an agent scan to the relevant risk (idempotency, limits, activation, claim tokens). A few sentences restate the same point — the billing surprise is mentioned in the activation section and implied again earlier — but nothing is pure filler.

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 mutation tool with nested objects, no output schema, and only 2 top-level parameters, the description supplies the return-side facts an agent would otherwise lack: `statistics.accounts_created`, `own_company_customers`, per-row `BLOCKED` reasons, and `claim_link_already_issued` versus a fresh token. Nothing needed to call it correctly, or to persist what it returns, 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?

With schema coverage at 50%, the description carries meaningful weight: it explains that `customers_file` applies to every account including pre-existing ones and is idempotent by tax id, that `apply_customers_to_own_company` targets the in-focus company and surfaces in `own_company_customers`, and that the files are declarative so a larger population is imported in passes. It adds less on `idempotency_key` and `accounts_file` preamble handling than the schema already does, so not a 5.

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 opening sentence gives a specific verb and resource — provisions the managed accounts described in an uploaded file, switches them on in Live, leaves them ready to invoice — and then pins the semantics with an equivalence to `POST /v1/accounts` per row plus activations. An agent can tell this apart from `beel_provision_account` (single account) and `beel_preview_account_import` (no effects) without opening a schema.

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?

Explicitly routes away from this tool when no writes are wanted: 'to see what this would do without writing anything, use `POST /v1/accounts/imports/preview` ... the import is never governed by a boolean flag.' It also names the recovery path (fix the cause and re-upload the same file) and states that there is no resume, so both when-to-use and when-not-to-use are 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