Skip to main content
Glama
BeeL MCP server

BeeL MCP server

Official
by beel-es

beel_get_invoice_preview

Read-onlyIdempotent

Returns a temporary pre-signed URL for an invoice's WebP preview image so you can render it inline; the cached URL expires in five minutes and allows GET requests only.

Instructions

Returns a temporary pre-signed URL to a preview image (WebP) of the invoice, suitable for inline rendering. The image is generated and cached on first request, so a later call returns the cached image. The URL expires in five minutes and only allows GET.

The image of an issued invoice is taken from its stored PDF, the one delivered. While that PDF does not exist yet — right after issuing (whether or not the invoice goes through VeriFactu, since the PDF is generated asynchronously) or, for a VeriFactu invoice specifically, while it waits for the QR of its registration — the answer is 202, as for the PDF download. When BeeL. cannot produce that PDF, the answer is 409 INVOICE_PDF_UNAVAILABLE, also as for the PDF download.

BeeL API endpoint: GET /v1/companies/{company_id}/invoices/{invoice_id}/preview (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>",
      "invoice_id": "<invoice_id>"
    },
    "name": "beel_get_invoice_preview"
  }
}

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.
invoice_idYesInvoice ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.10.0
    • addedInput schema / properties / invoice_id / type
      Added value: +"string"
  2. Changed3 schema fields changedv0.5.0
    • removedInput schema / $defs / UUID / example
      Removed value: -"550e8400-e29b-41d4-a716-446655440000"
    • 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."
  3. First observedv0.3.1

TDQS

A4.3/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the five-minute URL expiry, GET-only access, caching on first request, and the exact 202/409 INVOICE_PDF_UNAVAILABLE outcomes including the VeriFactu QR-waiting edge case. Nothing here contradicts the readOnly/idempotent/non-destructive hints; it only adds failure-mode detail the annotations cannot express.

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 with the primary answer, then structured into paragraphs covering generation timing and failure modes. Slightly repetitive in restating 'as for the PDF download' twice and re-explaining the 202 condition, but no sentence is filler.

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?

With no output schema, the description carries the return contract itself and does so: URL contents, TTL, and the 202/409 responses are all spelled out. Only the absence of an explicit pointer to the PDF sibling keeps it short of fully complete.

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 100% and company_id already documents the 403 behavior and header-independence, so the baseline is met. The description additionally fixes the endpoint shape, confirming company_id is a path segment rather than a header or body field.

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?

States a specific verb and resource: returns a temporary pre-signed URL to a WebP preview image of an invoice, suitable for inline rendering. The 'preview image' framing, contrasted with the repeatedly referenced PDF download, lets an agent distinguish it from beel_get_invoice_pdf.

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?

Explains the operational context well: the image is generated and cached on first request, the URL expires in five minutes, and calls made before the stored PDF exists return 202 or 409. It stops short of explicitly naming the sibling to use for a downloadable PDF, relying on 'as for the PDF download' to imply it.

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