Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_generate_representation

Idempotent

Generates the unsigned AEAT representation PDF for a company, starting the representation flow. Requires complete fiscal identity and no active representation before producing it.

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.

Endpoint: POST /v1/companies/{company_id}/representation

Input Schema

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

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

Adds substantial behavior beyond the annotations: the prerequisite of a complete fiscal identity, the 400 failure mode, and rejection when an active representation already exists. It also clarifies that the generated document is unsigned, which is not evident from the annotations alone. No contradiction with annotations.

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 lead sentence states the core purpose, followed by three focused bullets covering next steps, prerequisites, and failure conditions. There is no filler, and the most important scoping information is front-loaded.

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 mutating operation with no output schema, the description covers prerequisites, error behavior, and the downstream actions needed to complete the flow. The only notable gap is the exact response shape of the POST call, though the next-step guidance makes the intended usage clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

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

Schema description coverage is 100% and the parameter descriptions are already rich: company_id explains UUID vs NIF, account derivation, and 403 behavior, and idempotency_key explains collision behavior. The description adds no parameter-level information beyond what the schema provides.

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 states a specific verb ('Generates'), a specific artifact ('unsigned AEAT representation PDF'), and positions it as the first step of the representation flow. This distinguishes it from related siblings like beel_cancel_representation and beel_download_representation_document.

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 clearly frames when to use the tool: as the first step of the representation flow, with explicit next steps (download the PDF, sign it, submit it). It also states when not to call it: incomplete fiscal identity is rejected with 400, and an active existing representation must be canceled first. It does not name sibling tools directly, but the flow instructions are unambiguous.

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