Skip to main content
Glama

Morocco Salary and Income Tax Calculator

Gross salary needed for a net amount in Morocco

gross_for_target_net
Read-onlyIdempotent

The gross yearly salary in Morocco that leaves a given take-home pay, with the same situation options as net_salary. Use it to set a salary ask or check an offer.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "net_target": "<net_target>"
    },
    "name": "gross_for_target_net"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNoWhether net_target is per year or per month. Default year.
marriedNoMarried or registered partner. Default false.
childrenNoNumber of dependent children. Default 0.
tax_yearNoTax year. Offered: 2026 (final), 2025 (final). Default 2026. A year that is not listed is not available for this country.
fx_per_eurNoExchange rate: 1 euro = this many MAD, for the euro amounts. Default 10.7 (indicative).
net_targetYesTake-home pay wanted, in MAD
pension_pctNoVoluntary employee pension contribution through payroll, % of salary. Default 0.
bonus_annualNoYearly bonus in MAD. Default 0.
home_interestNoInterest on your home loan. Main home only. Deductible up to 10% of taxable income; paid to your bank, so take-home pay is not reduced. (DH / year). Default 0.
spouse_incomeNoPartner's gross yearly income in MAD, for joint taxation and spouse allowances. Default 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / home_interest
      Added value: +{
      +  "description": "Interest on your home loan. Main home only. Deductible up to 10% of taxable income; paid to your bank, so take-home pay is not reduced. (DH / year). Default 0.",
      +  "minimum": 0,
      +  "type": "number"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / tax_year
      Added value: +{
      +  "description": "Tax year. Offered: 2026 (final), 2025 (final). Default 2026. A year that is not listed is not available for this country.",
      +  "enum": [
      +    2026,
      +    2025
      +  ],
      +  "type": "integer"
      +}
  3. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds only the notion that it mirrors net_salary's option set; it says nothing about whether the gross figure is an estimate, how rounding or the indicative fx rate affects the answer, or what happens when no solution exists.

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, no filler, and the core inverse relationship is front-loaded before the usage hint. Every sentence carries information an agent needs.

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 10-parameter, fully documented, read-only calculator with annotations covering safety, the description is nearly sufficient as a selector. What remains unsaid — that the result is a computed estimate subject to the indicative exchange rate and that the yearly framing versus the period enum differs — is modest but not trivial.

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% with defaults and enum values documented for all 10 parameters, so the baseline is 3. The description contributes only the cross-reference to net_salary's options rather than any parameter-level meaning such as how net_target interacts with period or bonus_annual.

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?

States a specific computation and its exact inverse relation: 'The gross yearly salary in Morocco that leaves a given take-home pay.' That clearly differentiates it from the sibling net_salary, which goes the other direction. Minor friction: it says 'gross yearly salary' while the schema offers a period enum of year/month, so the scope wording is slightly narrower than the actual tool.

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?

Gives concrete usage contexts ('set a salary ask or check an offer') and points at net_salary as the source of the 'same situation options,' which helps the agent align inputs. It stops short of explicitly saying when NOT to use it (e.g., use net_salary when you already know gross), leaving that inversion to be inferred from the purpose statement.

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.

Resources