Skip to main content
Glama
josemvelez78

mcp-europe-business

get_einvoicing_rules

Read-onlyIdempotent

Retrieves current e-invoicing obligations for any European country. Provides mandatory status for B2G, B2B, B2C, required formats, and implementation timeline to ensure compliance.

Instructions

Returns the current e-invoicing (electronic invoicing) obligations for a given European country — whether it is mandatory for B2G (business-to-government), B2B (business-to-business), or B2C transactions, the required formats, and implementation timeline. Returns { country, b2g_mandatory, b2b_mandatory, b2c_mandatory, formats, timeline, platform, notes }. Use when building invoice generation systems, determining compliance requirements for EU customers, or automating invoice submission workflows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
country_codeYesTwo-letter ISO country code. Example: 'IT', 'DE', 'FR'

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countryNo
b2g_mandatoryNo
b2b_mandatoryNo
b2c_mandatoryNo
formatsNo
platformNo
timelineNo
notesNo
disclaimerNo
errorNo

Implementation Reference

  • index.js:508-531 (registration)
    The tool named 'get_einvoicing_rules' is registered using server.registerTool() on line 509. The registration includes the description, input/output schemas, and annotations.
    // ── 21. Get E-Invoicing Rules ──
    server.registerTool("get_einvoicing_rules", {
      description: "Returns the current e-invoicing (electronic invoicing) obligations for a given European country — whether it is mandatory for B2G (business-to-government), B2B (business-to-business), or B2C transactions, the required formats, and implementation timeline. Returns { country, b2g_mandatory, b2b_mandatory, b2c_mandatory, formats, timeline, platform, notes }. Use when building invoice generation systems, determining compliance requirements for EU customers, or automating invoice submission workflows.",
      inputSchema: { country_code: z.string().describe("Two-letter ISO country code. Example: 'IT', 'DE', 'FR'") },
      outputSchema: { country: z.string().optional(), b2g_mandatory: z.boolean().optional(), b2b_mandatory: z.boolean().optional(), b2c_mandatory: z.boolean().optional(), formats: z.array(z.string()).optional(), platform: z.string().optional(), timeline: z.string().optional(), notes: z.string().optional(), disclaimer: z.string().optional(), error: z.string().optional() },
          annotations: { title: "Get E-Invoicing Rules", readOnlyHint: true, idempotentHint: true, openWorldHint: false }
    }, async ({ country_code }) => {
      const rules = {
        IT: { country: "Italy", b2g_mandatory: true, b2b_mandatory: true, b2c_mandatory: true, formats: ["FatturaPA (XML)", "SDI"], platform: "SDI (Sistema di Interscambio)", timeline: "B2G: 2014. B2B+B2C: January 2019.", notes: "Most advanced e-invoicing system in EU. All invoices must pass through SDI. Codice destinatario required." },
        FR: { country: "France", b2g_mandatory: true, b2b_mandatory: true, b2c_mandatory: false, formats: ["Factur-X", "UBL 2.1", "CII"], platform: "Chorus Pro (B2G), PPF/PDP (B2B)", timeline: "B2G: 2017. B2B receipt: Sep 2026. B2B issuance: Sep 2026 (large) / Sep 2027 (SME).", notes: "Major reform. B2B mandatory from 2026-2027 depending on company size." },
        DE: { country: "Germany", b2g_mandatory: true, b2b_mandatory: true, b2c_mandatory: false, formats: ["XRechnung", "ZUGFeRD", "PEPPOL BIS"], platform: "PEPPOL network (B2G)", timeline: "B2G: Nov 2020. B2B receive: Jan 2025. B2B send: Jan 2027.", notes: "B2B e-invoicing mandatory from 2025 (receive) and 2027 (send). EN 16931 standard required." },
        ES: { country: "Spain", b2g_mandatory: true, b2b_mandatory: true, b2c_mandatory: false, formats: ["Facturae", "UBL", "PEPPOL"], platform: "FACe (B2G), Verifactu/SIF (B2B)", timeline: "B2G: 2015. B2B: 2025 (large companies), 2026 (SMEs) — Ley Crea y Crece.", notes: "Verifactu system being phased in. B2B mandatory pending final regulations." },
        PT: { country: "Portugal", b2g_mandatory: true, b2b_mandatory: false, b2c_mandatory: false, formats: ["CIUS-PT", "UBL 2.1", "PEPPOL"], platform: "eSPap / PEPPOL", timeline: "B2G: 2021. B2B: not yet mandatory.", notes: "ATCUD code mandatory on all invoices since 2023. Certified invoicing software required." },
        BE: { country: "Belgium", b2g_mandatory: true, b2b_mandatory: true, b2c_mandatory: false, formats: ["PEPPOL BIS", "UBL 2.1"], platform: "PEPPOL network", timeline: "B2G: 2020. B2B mandatory: Jan 2026.", notes: "B2B e-invoicing mandatory from January 2026 via PEPPOL network." },
        NL: { country: "Netherlands", b2g_mandatory: true, b2b_mandatory: false, b2c_mandatory: false, formats: ["PEPPOL BIS", "UBL 2.1"], platform: "PEPPOL network", timeline: "B2G: 2019. B2B: not yet mandatory.", notes: "Strong PEPPOL adoption. Government actively promotes voluntary B2B e-invoicing." },
        UK: { country: "United Kingdom", b2g_mandatory: false, b2b_mandatory: false, b2c_mandatory: false, formats: ["PEPPOL", "UBL"], platform: "No central platform", timeline: "No mandatory e-invoicing yet. HMRC consulting on introduction.", notes: "Post-Brexit, UK not bound by EU e-invoicing directive. Making Tax Digital (MTD) focuses on VAT records." },
        SE: { country: "Sweden", b2g_mandatory: true, b2b_mandatory: false, b2c_mandatory: false, formats: ["PEPPOL BIS", "Svefaktura"], platform: "PEPPOL network", timeline: "B2G: 2019 (central govt), 2021 (local govt). B2B: not mandatory.", notes: "Sweden has one of highest PEPPOL adoption rates in Europe." },
        PL: { country: "Poland", b2g_mandatory: true, b2b_mandatory: true, b2c_mandatory: false, formats: ["FA_VAT (XML)", "KSeF"], platform: "KSeF (Krajowy System e-Faktur)", timeline: "B2G: 2021. B2B mandatory: Feb 2026.", notes: "KSeF system. B2B e-invoicing mandatory from February 2026 after 2024 postponement." },
      };
      const code = country_code.toUpperCase();
      const data = rules[code];
      if (!data) return { content: [{ type: "text", text: JSON.stringify({ error: `Country ${code} not found. Available: ${Object.keys(rules).join(", ")}` }) }] };
      return { content: [{ type: "text", text: JSON.stringify({ ...data, disclaimer: "Reference information only. E-invoicing regulations change frequently. Verify with official sources." }) }] };
    });
  • The handler function (async callback from line 514) executes the tool logic: it looks up e-invoicing rules in the 'rules' dictionary keyed by country code (IT, FR, DE, ES, PT, BE, NL, UK, SE, PL) and returns the matching data or an error.
    }, async ({ country_code }) => {
      const rules = {
        IT: { country: "Italy", b2g_mandatory: true, b2b_mandatory: true, b2c_mandatory: true, formats: ["FatturaPA (XML)", "SDI"], platform: "SDI (Sistema di Interscambio)", timeline: "B2G: 2014. B2B+B2C: January 2019.", notes: "Most advanced e-invoicing system in EU. All invoices must pass through SDI. Codice destinatario required." },
        FR: { country: "France", b2g_mandatory: true, b2b_mandatory: true, b2c_mandatory: false, formats: ["Factur-X", "UBL 2.1", "CII"], platform: "Chorus Pro (B2G), PPF/PDP (B2B)", timeline: "B2G: 2017. B2B receipt: Sep 2026. B2B issuance: Sep 2026 (large) / Sep 2027 (SME).", notes: "Major reform. B2B mandatory from 2026-2027 depending on company size." },
        DE: { country: "Germany", b2g_mandatory: true, b2b_mandatory: true, b2c_mandatory: false, formats: ["XRechnung", "ZUGFeRD", "PEPPOL BIS"], platform: "PEPPOL network (B2G)", timeline: "B2G: Nov 2020. B2B receive: Jan 2025. B2B send: Jan 2027.", notes: "B2B e-invoicing mandatory from 2025 (receive) and 2027 (send). EN 16931 standard required." },
        ES: { country: "Spain", b2g_mandatory: true, b2b_mandatory: true, b2c_mandatory: false, formats: ["Facturae", "UBL", "PEPPOL"], platform: "FACe (B2G), Verifactu/SIF (B2B)", timeline: "B2G: 2015. B2B: 2025 (large companies), 2026 (SMEs) — Ley Crea y Crece.", notes: "Verifactu system being phased in. B2B mandatory pending final regulations." },
        PT: { country: "Portugal", b2g_mandatory: true, b2b_mandatory: false, b2c_mandatory: false, formats: ["CIUS-PT", "UBL 2.1", "PEPPOL"], platform: "eSPap / PEPPOL", timeline: "B2G: 2021. B2B: not yet mandatory.", notes: "ATCUD code mandatory on all invoices since 2023. Certified invoicing software required." },
        BE: { country: "Belgium", b2g_mandatory: true, b2b_mandatory: true, b2c_mandatory: false, formats: ["PEPPOL BIS", "UBL 2.1"], platform: "PEPPOL network", timeline: "B2G: 2020. B2B mandatory: Jan 2026.", notes: "B2B e-invoicing mandatory from January 2026 via PEPPOL network." },
        NL: { country: "Netherlands", b2g_mandatory: true, b2b_mandatory: false, b2c_mandatory: false, formats: ["PEPPOL BIS", "UBL 2.1"], platform: "PEPPOL network", timeline: "B2G: 2019. B2B: not yet mandatory.", notes: "Strong PEPPOL adoption. Government actively promotes voluntary B2B e-invoicing." },
        UK: { country: "United Kingdom", b2g_mandatory: false, b2b_mandatory: false, b2c_mandatory: false, formats: ["PEPPOL", "UBL"], platform: "No central platform", timeline: "No mandatory e-invoicing yet. HMRC consulting on introduction.", notes: "Post-Brexit, UK not bound by EU e-invoicing directive. Making Tax Digital (MTD) focuses on VAT records." },
        SE: { country: "Sweden", b2g_mandatory: true, b2b_mandatory: false, b2c_mandatory: false, formats: ["PEPPOL BIS", "Svefaktura"], platform: "PEPPOL network", timeline: "B2G: 2019 (central govt), 2021 (local govt). B2B: not mandatory.", notes: "Sweden has one of highest PEPPOL adoption rates in Europe." },
        PL: { country: "Poland", b2g_mandatory: true, b2b_mandatory: true, b2c_mandatory: false, formats: ["FA_VAT (XML)", "KSeF"], platform: "KSeF (Krajowy System e-Faktur)", timeline: "B2G: 2021. B2B mandatory: Feb 2026.", notes: "KSeF system. B2B e-invoicing mandatory from February 2026 after 2024 postponement." },
      };
      const code = country_code.toUpperCase();
      const data = rules[code];
      if (!data) return { content: [{ type: "text", text: JSON.stringify({ error: `Country ${code} not found. Available: ${Object.keys(rules).join(", ")}` }) }] };
      return { content: [{ type: "text", text: JSON.stringify({ ...data, disclaimer: "Reference information only. E-invoicing regulations change frequently. Verify with official sources." }) }] };
    });
  • The input schema for get_einvoicing_rules takes a 'country_code' string parameter (two-letter ISO code).
    inputSchema: { country_code: z.string().describe("Two-letter ISO country code. Example: 'IT', 'DE', 'FR'") },
    outputSchema: { country: z.string().optional(), b2g_mandatory: z.boolean().optional(), b2b_mandatory: z.boolean().optional(), b2c_mandatory: z.boolean().optional(), formats: z.array(z.string()).optional(), platform: z.string().optional(), timeline: z.string().optional(), notes: z.string().optional(), disclaimer: z.string().optional(), error: z.string().optional() },
  • The output schema defines the return structure with optional fields: country, b2g_mandatory, b2b_mandatory, b2c_mandatory, formats, platform, timeline, notes, disclaimer, error.
    outputSchema: { country: z.string().optional(), b2g_mandatory: z.boolean().optional(), b2b_mandatory: z.boolean().optional(), b2c_mandatory: z.boolean().optional(), formats: z.array(z.string()).optional(), platform: z.string().optional(), timeline: z.string().optional(), notes: z.string().optional(), disclaimer: z.string().optional(), error: z.string().optional() },
Behavior3/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so safety is clear. The description adds the return structure but doesn't discuss permissions or rate limits. With annotations handling the core behavioral disclosure, a 3 is appropriate.

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?

Two sentences with no fluff: first states the function and return fields, second lists use cases. Front-loaded with purpose, every word earns its place.

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?

Given the tool has one parameter, clear description, and an output schema (implied by the return field listing), the description is nearly complete. Minor gap: 'European country' in description vs. possibly non-EU, but that's a small detail.

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 coverage is 100% with a clear description for 'country_code'. The tool description doesn't add additional parameter meaning beyond 'for a given European country', which is already implied by the schema. Baseline 3 is correct.

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 clearly states the tool returns e-invoicing obligations for a given country, including specific fields like B2G/B2B/B2C mandatory flags, formats, and timeline. It distinguishes from sibling tools (VAT, working days, validation) by focusing on e-invoicing rules.

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?

The description explicitly says 'Use when building invoice generation systems, determining compliance requirements for EU customers, or automating invoice submission workflows.' No explicit when-not-to-use or alternatives, but the context is clear and covers typical use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/josemvelez78/mcp-europe-business'

If you have feedback or need assistance with the MCP directory API, please join our Discord server