Skip to main content
Glama
josemvelez78

mcp-europe-business

get_invoice_requirements

Read-onlyIdempotent

Retrieve mandatory fields for a valid VAT invoice in any European country. Use to generate compliant invoices or validate invoice templates.

Instructions

Returns the mandatory fields required on a valid VAT invoice for a given European country, as defined by EU VAT Directive 2006/112/EC and local implementations. Returns { country, mandatory_fields: [], optional_fields: [], notes }. Use when generating invoices for EU customers, validating invoice templates, or building invoice compliance checks in agent workflows. Information provided as reference only — not legal advice.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countryNo
mandatory_fieldsNo
optional_fieldsNo
notesNo
disclaimerNo
errorNo

Implementation Reference

  • index.js:448-481 (registration)
    Registration of the 'get_invoice_requirements' tool via server.registerTool.
    server.registerTool("get_invoice_requirements", {
      description: "Returns the mandatory fields required on a valid VAT invoice for a given European country, as defined by EU VAT Directive 2006/112/EC and local implementations. Returns { country, mandatory_fields: [], optional_fields: [], notes }. Use when generating invoices for EU customers, validating invoice templates, or building invoice compliance checks in agent workflows. Information provided as reference only — not legal advice.",
      inputSchema: { country_code: z.string().describe("Two-letter ISO country code. Example: 'PT', 'DE', 'FR'") },
      outputSchema: { country: z.string().optional(), mandatory_fields: z.array(z.string()).optional(), optional_fields: z.array(z.string()).optional(), notes: z.string().optional(), disclaimer: z.string().optional(), error: z.string().optional() },
          annotations: { title: "Get Invoice Mandatory Fields", readOnlyHint: true, idempotentHint: true, openWorldHint: false }
    }, async ({ country_code }) => {
      const baseFields = [
        "Sequential invoice number",
        "Invoice date",
        "Supplier name and address",
        "Supplier VAT/tax number",
        "Customer name and address",
        "Description of goods or services",
        "Quantity and unit price",
        "VAT rate applied",
        "VAT amount",
        "Total amount excluding VAT",
        "Total amount including VAT"
      ];
      const requirements = {
        PT: { country: "Portugal", mandatory_fields: [...baseFields, "Customer NIF (for B2B)", "ATCUD code (since 2023)", "Invoice series and sequence"], optional_fields: ["Customer VAT number (B2C)", "Payment method"], notes: "AT (Autoridade Tributária) requires certified invoicing software. ATCUD is mandatory since 2023." },
        ES: { country: "Spain", mandatory_fields: [...baseFields, "Customer NIF/CIF (for B2B)", "Place of supply if different"], optional_fields: ["Customer VAT number (B2C)", "Discount details"], notes: "Factura electrónica mandatory for B2G. Verifactu system being phased in 2024-2025." },
        FR: { country: "France", mandatory_fields: [...baseFields, "Customer SIRET (for B2B)", "Delivery address if different", "Payment terms"], optional_fields: ["Discount details", "Purchase order reference"], notes: "Facture électronique mandatory for B2G since 2017. B2B e-invoicing rollout 2024-2026." },
        DE: { country: "Germany", mandatory_fields: [...baseFields, "Customer VAT number (for B2B intra-EU)", "Tax point date if different from invoice date"], optional_fields: ["Bank details", "Skonto terms"], notes: "ZUGFeRD/XRechnung format required for B2G since 2020. B2B e-invoicing from 2025." },
        IT: { country: "Italy", mandatory_fields: [...baseFields, "Customer Codice Fiscale or Partita IVA", "SDI recipient code (codice destinatario)", "Progressive number"], optional_fields: ["CUP/CIG codes (for public contracts)"], notes: "Fattura elettronica mandatory for ALL B2B and B2C since 2019 via SDI system." },
        NL: { country: "Netherlands", mandatory_fields: [...baseFields, "Customer KVK number (recommended for B2B)", "BTW number (VAT)"], optional_fields: ["IBAN for payment", "Reference number"], notes: "E-invoicing mandatory for B2G (PEPPOL). B2B e-invoicing encouraged." },
        UK: { country: "United Kingdom", mandatory_fields: [...baseFields, "Supplier VAT registration number", "Tax point (time of supply)"], optional_fields: ["Customer VAT number", "Unique customer reference"], notes: "Post-Brexit UK VAT rules apply. Making Tax Digital (MTD) requires digital records." },
        BE: { country: "Belgium", mandatory_fields: [...baseFields, "Supplier VAT number (BE format)", "Customer VAT number (for B2B)"], optional_fields: ["Discount details", "Payment reference"], notes: "E-invoicing mandatory for B2G. B2B e-invoicing mandatory from 2026." },
      };
      const code = country_code.toUpperCase();
      const data = requirements[code];
      if (!data) return { content: [{ type: "text", text: JSON.stringify({ error: `Country ${code} not found. Available: ${Object.keys(requirements).join(", ")}`, note: "Reference only — not legal advice." }) }] };
      return { content: [{ type: "text", text: JSON.stringify({ ...data, disclaimer: "Reference information only — not legal advice. Verify with a qualified professional or tax authority." }) }] };
    });
  • Handler function that returns mandatory invoice fields for a given European country based on EU VAT Directive 2006/112/EC.
    }, async ({ country_code }) => {
      const baseFields = [
        "Sequential invoice number",
        "Invoice date",
        "Supplier name and address",
        "Supplier VAT/tax number",
        "Customer name and address",
        "Description of goods or services",
        "Quantity and unit price",
        "VAT rate applied",
        "VAT amount",
        "Total amount excluding VAT",
        "Total amount including VAT"
      ];
      const requirements = {
        PT: { country: "Portugal", mandatory_fields: [...baseFields, "Customer NIF (for B2B)", "ATCUD code (since 2023)", "Invoice series and sequence"], optional_fields: ["Customer VAT number (B2C)", "Payment method"], notes: "AT (Autoridade Tributária) requires certified invoicing software. ATCUD is mandatory since 2023." },
        ES: { country: "Spain", mandatory_fields: [...baseFields, "Customer NIF/CIF (for B2B)", "Place of supply if different"], optional_fields: ["Customer VAT number (B2C)", "Discount details"], notes: "Factura electrónica mandatory for B2G. Verifactu system being phased in 2024-2025." },
        FR: { country: "France", mandatory_fields: [...baseFields, "Customer SIRET (for B2B)", "Delivery address if different", "Payment terms"], optional_fields: ["Discount details", "Purchase order reference"], notes: "Facture électronique mandatory for B2G since 2017. B2B e-invoicing rollout 2024-2026." },
        DE: { country: "Germany", mandatory_fields: [...baseFields, "Customer VAT number (for B2B intra-EU)", "Tax point date if different from invoice date"], optional_fields: ["Bank details", "Skonto terms"], notes: "ZUGFeRD/XRechnung format required for B2G since 2020. B2B e-invoicing from 2025." },
        IT: { country: "Italy", mandatory_fields: [...baseFields, "Customer Codice Fiscale or Partita IVA", "SDI recipient code (codice destinatario)", "Progressive number"], optional_fields: ["CUP/CIG codes (for public contracts)"], notes: "Fattura elettronica mandatory for ALL B2B and B2C since 2019 via SDI system." },
        NL: { country: "Netherlands", mandatory_fields: [...baseFields, "Customer KVK number (recommended for B2B)", "BTW number (VAT)"], optional_fields: ["IBAN for payment", "Reference number"], notes: "E-invoicing mandatory for B2G (PEPPOL). B2B e-invoicing encouraged." },
        UK: { country: "United Kingdom", mandatory_fields: [...baseFields, "Supplier VAT registration number", "Tax point (time of supply)"], optional_fields: ["Customer VAT number", "Unique customer reference"], notes: "Post-Brexit UK VAT rules apply. Making Tax Digital (MTD) requires digital records." },
        BE: { country: "Belgium", mandatory_fields: [...baseFields, "Supplier VAT number (BE format)", "Customer VAT number (for B2B)"], optional_fields: ["Discount details", "Payment reference"], notes: "E-invoicing mandatory for B2G. B2B e-invoicing mandatory from 2026." },
      };
      const code = country_code.toUpperCase();
      const data = requirements[code];
      if (!data) return { content: [{ type: "text", text: JSON.stringify({ error: `Country ${code} not found. Available: ${Object.keys(requirements).join(", ")}`, note: "Reference only — not legal advice." }) }] };
      return { content: [{ type: "text", text: JSON.stringify({ ...data, disclaimer: "Reference information only — not legal advice. Verify with a qualified professional or tax authority." }) }] };
    });
  • Input and output schemas for get_invoice_requirements tool, defined with Zod schemas.
    inputSchema: { country_code: z.string().describe("Two-letter ISO country code. Example: 'PT', 'DE', 'FR'") },
    outputSchema: { country: z.string().optional(), mandatory_fields: z.array(z.string()).optional(), optional_fields: z.array(z.string()).optional(), notes: z.string().optional(), disclaimer: z.string().optional(), error: z.string().optional() },
        annotations: { title: "Get Invoice Mandatory Fields", readOnlyHint: true, idempotentHint: true, openWorldHint: false }
  • Base mandatory invoice fields common across all countries, used as a helper data structure.
    const baseFields = [
      "Sequential invoice number",
      "Invoice date",
      "Supplier name and address",
      "Supplier VAT/tax number",
      "Customer name and address",
      "Description of goods or services",
      "Quantity and unit price",
      "VAT rate applied",
      "VAT amount",
      "Total amount excluding VAT",
      "Total amount including VAT"
    ];
Behavior4/5

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

Annotations already declare read-only and idempotent. Description adds value by specifying the output structure ({country, mandatory_fields, optional_fields, notes}) and the data source (EU VAT Directive and local implementations). No contradictions.

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?

Three sentences, each serving a distinct purpose: purpose, output shape, usage guidance. No fluff, front-loaded, and efficiently structured.

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's simplicity (1 param, output schema exists), the description is complete enough. It mentions the return shape and usage context. Slight deduction because actual output schema details are not shown, but description covers key aspects.

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 well-described parameter (country_code with example values). Description does not add extra meaning beyond the schema, but given high coverage, a baseline of 3 is appropriate.

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 mandatory fields for a valid VAT invoice for a European country, using specific verb 'Returns' and resource 'mandatory fields'. It distinguishes from siblings like 'validate_invoice_schema' and 'get_vat_rate' by focusing on invoice requirements.

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?

Explicitly says when to use: generating invoices, validating templates, compliance checks. Also includes a disclaimer about not being legal advice. Lacks explicit when-not-to-use or alternatives, but context is clear.

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