Skip to main content
Glama

MaCalculatriceEnLigne

Calculate Moroccan VAT

calculate_moroccan_vat
Read-onlyIdempotent

Compute Moroccan VAT (TVA) — convert between HT and TTC. Use for invoicing in Morocco. Inputs: amount, rate (20/14/10/7), mode (ht/ttc). Returns HT, TTC, tax amount. See list_bundles for related 'finance-afrique-quebec' calculators.

Input Schema

NameRequiredDescriptionDefault
modeNoInput mode: ht=hors taxe, ttc=toutes taxes comprisesht
rateNoVAT rate: 0%, 7%, 10%, 14%, or 20% (standard)20
amountYesAmount in MAD

Output Schema

NameRequiredDescriptionDefault
resultNoComputed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools).
sourceNoAuthoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21").
formulaNoHuman-readable formula or method used (e.g. "I=P·r·t", "Magnus formula").
reference_urlNoLink to a calcul2 page documenting the calculation in detail.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare this a pure, side-effect-free, idempotent computation (readOnlyHint, idempotentHint, destructiveHint=false), so the burden is light. The description restates the conversion semantics but adds no behavioral context beyond that (no rounding rules, currency assumption beyond the schema's MAD note, or output framing that isn't in the output schema). Adequate but thin against the lowered bar.

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?

The core purpose, inputs, and return values are front-loaded in tight sentences. The final sentence about list_bundles and the 'finance-afrique-quebec' bundle is a tangent that doesn't earn its place in a calculator definition, keeping it from a 5.

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?

For a three-parameter, annotation-covered, output-schema-backed calculator, the definition supplies enough to invoke it correctly: purpose, the country scope, and the input modes. The only gap is differentiation from other VAT tools, which is a guidance rather than a completeness issue.

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 description coverage is 100%, so both enums and the amount are already documented in the schema; the description merely echoes them. It even lists "20/14/10/7" and drops the 0% rate that the schema includes, so it adds no meaning and is slightly less complete than the schema. Baseline 3 for a fully-covered schema 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?

States a specific verb and resource (compute Moroccan VAT / TVA, convert between HT and TTC) and pins the country, which is exactly the axis that separates it from the many sibling VAT calculators (calculate_french_vat, calculate_swiss_vat, calculate_senegalese_vat, etc.). An agent can identify it from the name plus description alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Use for invoicing in Morocco" gives a usage context, but with calculate_vat_generic, calculate_vat_reverse, and five other country VAT tools as siblings, the description never says when this one is preferred over those alternatives or what distinguishes the HT/TTC conversion from the generic VAT tool. The trailing pointer to list_bundles is a routing hint but not usage guidance for this tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.