Saltar al contenido

Agents and AI on Avanza Fibra

Let an AI agent quote, check coverage and contract Avanza Fibra services on behalf of a customer, through an MCP server or a REST API. What these docs say is the contract: if it is not here, it is not supported.

View as Markdown

Get started with a prompt

Paste this prompt into your coding agent. It loads the skill and connects to the MCP server.

Prompt
Read https://avanzafibra.com/agents/skill.md and use it as your instructions to quote and contract Avanza Fibra services. Connect to the MCP server at https://agents.avanzafibra.com/mcp and use its tools. Start with the public reads (products_list, pricing_calculate), never put an IBAN in a tool call, and ask me for any credential you need.

Build with AI tools

Machine-readable resources

MCP server
https://agents.avanzafibra.com/mcp

Streamable HTTP endpoint. Public reads need no credential.

Agent skill

The whole contract as one imperative Markdown skill.

llms.txt

Curated index of the site for language models.

Plain-text docs
Append .md to any /agents page

For example https://avanzafibra.com/agents/mcp.md. Every docs page exists as Markdown.

OpenAPI spec

The full REST contract with interactive docs.

Rules every agent follows

  1. Always send an idempotency key

    The idempotency-key header is optional for the server, but without it a retry after a lost response creates a second order. The same purchase carries the SAME key in all its attempts and the retry returns the original order. The replay window is 24 hours.

  2. Retry only what can be retried

    PRICE_MISMATCH, IDEMPOTENCY_KEY_REUSED and the 4xx validation errors do not improve when repeated: they give the same result. AGENT_RATE_LIMITED, 5xx responses and network errors do make sense to retry.

  3. Never send personal data to logs

    ID numbers, IBANs and full addresses do not go to logs, traces or error messages. The API masks them in its own output; an agent must not reintroduce them anywhere else. The IBAN, moreover, never passes through your hands: the customer types it in the secure link (see "Payments without an IBAN").

  4. Do not trust the total you calculate

    The authoritative amount is the one the server sets. An agent that builds its own price and sends it as truth receives PRICE_MISMATCH, and that is the correct behavior.

Out of scope

  • The MCP is at https://agents.avanzafibra.com/mcp, on the same host as this API, and it is public: any MCP client can connect, list the tools and call eight public reads without a credential (products_list, product_get, packs_list, packs_applicable, pricing_calculate, discount_validate, campaign_info and worker_public_profile), with usage caps per client and per tool. Everything else requires the agent's own credential in the Authorization header: coverage, drafts, orders and secure payment links. No write tool is anonymous.
  • Orders, secure-link payment and follow-up are also available as MCP tools. Payment goes through the secure link the customer opens or through the paymentRef that link returns; no tool accepts an IBAN. IBAN tokenization does not exist over MCP: only over REST, server to server, with payment:tokenize.
  • No agent ever sees a full IBAN, not even its own customer's. The API always returns the masked account.
  • Coverage is not an anonymous query: it would reveal where Avanza Fibra has network. You query it with a credential that carries catalog:read, and the order is resolved on the server with the address it carries.
  • With WebMCP on, the website (and the contracting funnel, if it also has it on) exposes tools to browser agents (WebMCP section). Those tools prepare the order but do not confirm it: full contracting by an agent still goes through the API.
  • An order created by an agent reaches the panel with its origin and its label, and goes through the same checks as a human one.

In the browser (WebMCP)

WebMCP-compatible browsers discover tools with a strict schema on the pages of avanzafibra.com, instead of reading the screen and pressing buttons. Each tool uses the same endpoints as the interface.

Available in browsers that expose document.modelContext (Chrome with the origin trial or with the chrome://flags/#enable-webmcp-testing flag). Without that support nothing is registered.

ToolWhereWhat it does
buscar_direccionany page of avanzafibra.comSearches towns and streets with the coverage autocomplete.
comprobar_coberturaany page of avanzafibra.comChecks whether an address has fibre, with the same states as the website.
listar_tarifasany page of avanzafibra.comLists fibre, mobile, TV, landline and packs with the current catalog prices.
calcular_presupuestoany page of avanzafibra.comCalculates the monthly quote with the server pricing engine.
promocion_vigenteany page of avanzafibra.comReturns the current promotion and its conditions.
empezar_contratacionany page of avanzafibra.comTakes the user to the contracting funnel with the configuration already chosen.

What no tool does

  • No tool submits the order, accepts conditions or signs: the final confirmation is always a click by the user.
  • No tool asks for or fills in name, ID number, IBAN, email or phone: the user types them.
  • The address tools (street, town, postal code, number) use the address the agent gives only to check coverage and prefill the order; the user reviews it. The address and the cart are saved when the tab closes, whether or not the user accepted the data processing, just as if the customer typed them; only commercial messages depend on consent.
  • The tools that remove or replace something already chosen (cart products, address, mobile line options, the order open in the funnel) reject it unless the agent passes sustituir: true, and they are marked as consequential so the browser asks for confirmation. A draft only opens with an empty order and no earlier content in the page session.
  • The tools only exist while the page is open in a WebMCP-compatible browser.
Personaliza tu tarifa