Skip to main content
Glama
josemvelez78

mcp-europe-business

calculate_vat_amount

Read-onlyIdempotent

Calculate VAT amounts from net or gross values. Returns net amount, VAT amount, gross amount, rate, and currency for pricing tools or checkout flows.

Instructions

Calculates VAT amounts from either a net (excluding VAT) or gross (including VAT) amount for a given VAT rate. Returns { net_amount, vat_amount, gross_amount, vat_rate, currency }. Use when building pricing tools, invoice calculators, or checkout flows that need to split gross prices into net + VAT components.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesThe amount to calculate VAT for
vat_rateYesVAT rate as a percentage. Example: 23 for 23%
amount_typeYesWhether the input amount is net (excluding VAT) or gross (including VAT)
currencyNoCurrency code. Example: 'EUR', 'GBP'. Defaults to 'EUR'

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
net_amountYes
vat_amountYes
gross_amountYes
vat_rateYes
currencyYes

Implementation Reference

  • index.js:1006-1016 (registration)
    Registration of the 'calculate_vat_amount' tool with its input schema (amount, vat_rate, amount_type, currency), output schema (net_amount, vat_amount, gross_amount, vat_rate, currency), and description.
    server.registerTool("calculate_vat_amount", {
      description: "Calculates VAT amounts from either a net (excluding VAT) or gross (including VAT) amount for a given VAT rate. Returns { net_amount, vat_amount, gross_amount, vat_rate, currency }. Use when building pricing tools, invoice calculators, or checkout flows that need to split gross prices into net + VAT components.",
      inputSchema: {
        amount: z.number().describe("The amount to calculate VAT for"),
        vat_rate: z.number().describe("VAT rate as a percentage. Example: 23 for 23%"),
        amount_type: z.enum(["net", "gross"]).describe("Whether the input amount is net (excluding VAT) or gross (including VAT)"),
        currency: z.string().optional().describe("Currency code. Example: 'EUR', 'GBP'. Defaults to 'EUR'")
      },
      outputSchema: { net_amount: z.number(), vat_amount: z.number(), gross_amount: z.number(), vat_rate: z.number(), currency: z.string() },
          annotations: { title: "Calculate VAT Amount", readOnlyHint: true, idempotentHint: true, openWorldHint: false }
    }, async ({ amount, vat_rate, amount_type, currency = "EUR" }) => {
  • Input and output schema definitions for the calculate_vat_amount tool. Input takes an amount, VAT rate percentage, amount type (net or gross), and optional currency. Output returns net_amount, vat_amount, gross_amount, vat_rate, and currency.
    inputSchema: {
      amount: z.number().describe("The amount to calculate VAT for"),
      vat_rate: z.number().describe("VAT rate as a percentage. Example: 23 for 23%"),
      amount_type: z.enum(["net", "gross"]).describe("Whether the input amount is net (excluding VAT) or gross (including VAT)"),
      currency: z.string().optional().describe("Currency code. Example: 'EUR', 'GBP'. Defaults to 'EUR'")
    },
    outputSchema: { net_amount: z.number(), vat_amount: z.number(), gross_amount: z.number(), vat_rate: z.number(), currency: z.string() },
        annotations: { title: "Calculate VAT Amount", readOnlyHint: true, idempotentHint: true, openWorldHint: false }
  • Handler function for calculate_vat_amount. Calculates VAT from either a net (excl. VAT) or gross (incl. VAT) amount for a given VAT rate percentage. Returns net_amount, vat_amount, gross_amount rounded to 2 decimal places.
    }, async ({ amount, vat_rate, amount_type, currency = "EUR" }) => {
      const round = (n) => Math.round(n * 100) / 100;
      let net, vat, gross;
      if (amount_type === "net") {
        net = round(amount);
        vat = round(amount * vat_rate / 100);
        gross = round(net + vat);
      } else {
        gross = round(amount);
        net = round(amount / (1 + vat_rate / 100));
        vat = round(gross - net);
      }
      return { content: [{ type: "text", text: JSON.stringify({ net_amount: net, vat_amount: vat, gross_amount: gross, vat_rate, currency }) }] };
    });
Behavior4/5

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

Annotations already indicate read-only and idempotent behavior. The description adds value by explaining the two calculation modes (net vs gross input), the default currency, and the exact return field names. This goes beyond what annotations provide, giving the agent a clear understanding of behavior.

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 description is extremely concise with two sentences. The first sentence captures the core functionality, and the second provides use cases. Every sentence is meaningful and front-loaded. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema and 4 well-defined parameters, the description is complete. It explains the two input modes, the VAT rate interpretation, currency default, and typical usage scenarios. The output schema handles return value documentation.

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?

The input schema has 100% description coverage, so the schema already documents all parameters well. The description provides context about the meaning of 'amount_type' and default currency, but this is already in the schema descriptions. Thus, the description adds minimal extra value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool calculates VAT amounts from net or gross amounts for a given VAT rate. It provides the return object structure and examples of use cases. However, it does not explicitly differentiate from the sibling tool 'calculate_vat_breakdown', which might have a similar purpose.

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 when to use the tool: 'Use when building pricing tools, invoice calculators, or checkout flows that need to split gross prices into net + VAT components.' This provides clear context. It does not mention when not to use or alternatives, but the usage guidance is specific enough.

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