Skip to main content
Glama
BeeL MCP server

BeeL MCP server

Official
by beel-es

beel_generate_representation

Idempotent

Generates the unsigned AEAT representation PDF for a company as the first step of the representation flow; requires complete fiscal identity and no active representation.

Instructions

Generates the unsigned AEAT representation PDF of a company, the first step of the representation flow.

  • Next steps: download the PDF from GET /v1/companies/{company_id}/representation/document, sign it digitally and return it through POST /v1/companies/{company_id}/representation/submit.

  • Fiscal identity: must be complete before the document can be produced. An incomplete one is rejected with 400 naming what is missing.

  • Existing representation: a company that already holds an active one is rejected too. Cancel it first.

BeeL API endpoint: POST /v1/companies/{company_id}/representation (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>"
    },
    "name": "beel_generate_representation"
  }
}

Input Schema

NameRequiredDescriptionDefault
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. Changed2 schema fields changedv0.5.0
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / company_id / description
      Previous value: -"NIF (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."New value: +"Unique 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."
  2. First observedv0.3.1

TDQS

A4.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and idempotentHint=true, so the description's added value is the failure behavior: a 400 naming missing fiscal-identity fields, and rejection when an active representation already exists. That is genuine beyond-schema context, though it doesn't say whether a previously generated unsigned document is replaced or persisted, which matters for a generation step.

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?

Front-loaded purpose sentence followed by three short labeled bullets for next steps, fiscal identity and existing representation. Every line carries distinct information an agent needs before calling, and there is no restatement of the name or 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?

There is no output schema, but the description compensates by telling the agent where the produced document is retrieved from and what to do with it next, plus the two rejection paths. For a two-parameter, single-step generation tool, nothing needed 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.

Parameters5/5

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

Schema description coverage is 100%, and the schema text is unusually rich — company_id explains UUID-vs-NIF and the 403 disclosure behavior, idempotency_key explains the 24-hour collapse of identical operations. The description adds no parameter detail, but the baseline is 3 only when the schema is merely adequate; here the schema carries the full burden extremely well, and the workflow context around company_id (the company whose representation is generated) reinforces it.

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 first sentence gives a specific verb (Generates), a specific resource (unsigned AEAT representation PDF) and positions it explicitly as 'the first step of the representation flow'. That framing separates it from siblings such as beel_download_representation_document, beel_get_representation and beel_cancel_representation without the agent needing to open any 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?

It states the full when-to-use context: call this first, then download the PDF, sign it and submit it via a named endpoint. It also names two exclusion conditions — incomplete fiscal identity and an already-active representation (cancel it first) — so the agent knows both when to call and when not to.

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