Skip to main content
Glama

چیستارا — Iranian Legal Corpus

محاسبهٔ حق سنوات و مزایای پایان کار — Calculate end-of-service entitlements

calculate_severance
Read-onlyIdempotent

Calculate an Iranian employee's end-of-service entitlements (حق سنوات، عیدی، مانده مرخصی) under قانون کار, using the current official minimum wage. Use this instead of computing by hand.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearNoPersian year for the minimum-wage basis. Defaults to the latest.
yearsNoYears of service (may be fractional).
monthsNoExtra months of service (0–11).
contract_typeNopermanent = دائمی, fixed = موقت. Default permanent.
last_salary_tomanNoLast monthly salary in TOMAN. Below the statutory minimum wage the minimum is used instead.
unused_leave_daysNoStored unused annual leave days (ماده ۶۶ ق.کار caps storage at 9 days/yr).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / contract_type
      Added value: +{
      +  "description": "permanent = دائمی, fixed = موقت. Default permanent.",
      +  "enum": [
      +    "permanent",
      +    "fixed"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / last_salary_toman
      Added value: +{
      +  "description": "Last monthly salary in TOMAN. Below the statutory minimum wage the minimum is used instead.",
      +  "type": "number"
      +}
    • removedInput schema / properties / monthly_wage
      Removed value: -{
      -  "description": "Monthly wage in Toman.",
      -  "type": "number"
      -}
    • addedInput schema / properties / months
      Added value: +{
      +  "description": "Extra months of service (0–11).",
      +  "type": "integer"
      +}
    • addedInput schema / properties / unused_leave_days
      Added value: +{
      +  "description": "Stored unused annual leave days (ماده ۶۶ ق.کار caps storage at 9 days/yr).",
      +  "type": "number"
      +}
    • addedInput schema / properties / year
      Added value: +{
      +  "description": "Persian year for the minimum-wage basis. Defaults to the latest.",
      +  "type": "integer"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "monthly_wage",
      -  "years"
      -]New value: +[]
  2. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already establish that the tool is read-only, idempotent, and non-destructive, so the description only needs to add context. It adds that the calculation uses the current official minimum wage and applies under the Labor Code, which is useful, but it does not disclose output format, rounding, or statutory-cap 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 two sentences with no filler: the first explains what the tool computes and the legal/minimum-wage basis, and the second gives a clear usage directive. Every phrase earns its place.

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

Completeness3/5

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

For a six-parameter calculation with no output schema, the description gives a clear high-level capability but omits what the response contains, how years and months combine, and how contract_type affects the result. The fully documented schema mitigates much of this gap, making it adequate but not fully complete.

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 the schema already documents all six parameters. The description mentions the entitlement categories but adds no parameter-specific semantics beyond the schema, so the baseline score of 3 applies.

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 states a specific verb ('Calculate') and a specific resource ('Iranian employee's end-of-service entitlements'), listing the main components (حق سنوات، عیدی، مانده مرخصی) and the governing law. This clearly separates it from the many calculate_* siblings for fines, fees, and other legal amounts.

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?

It explicitly says to use this tool instead of computing by hand, which is a direct usage signal. It does not name sibling alternatives or exclusion cases, but the subject matter is specific enough that an agent can route to it without ambiguity.

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