Skip to main content
Glama

Dadras — Iranian law (دادرس)

Inheritance shares (محاسبهٔ سهم‌الارث)

calculate_inheritance
Read-onlyIdempotent

Divide a deceased person's net estate among the heirs under the Civil Code's classes and fixed shares (فروض), with return (رد) and shortfall (ورود نقص; no عول, as in Shia law) and a bequest of up to one third, flagging the rule on a wife's share of land. Use it when the question is who inherits how much; for the articles behind a share use search_iranian_law or get_law_article (قانون مدنی, مواد ۸۶۱ تا ۹۴۹). Give only the living heirs: a later class inherits only when every earlier class is empty, and a spouse inherits with every class. Returns each heir's fraction and amount in rial with the articles applied. Amounts in rial; dates in the Jalali calendar.

Input Schema

NameRequiredDescriptionDefault
sonsNoLiving sons.
wivesNoNumber of surviving wives when spouse is wife.
fatherNoThe father is alive.
motherNoThe mother is alive.
spouseNoThe surviving spouse, if any; none when not given. Values: none = ندارد; husband = زوج (شوهر); wife = زوجه (همسر).
daughtersNoLiving daughters.
bequest_rialNoA bequest (وصیت) in rial; capped at one third.
full_sistersNoSisters of the same father and mother (class 2).
full_brothersNoBrothers of the same father and mother (class 2).
maternal_auntsNoMother's sisters, خاله (class 3).
mother_blockedNoThe mother's share is reduced by siblings (حاجب, Civil Code 892): two brothers, four sisters, or a brother and two sisters, with the father alive.
paternal_auntsNoFather's sisters, عمه (class 3).
maternal_unclesNoMother's brothers, دایی (class 3).
net_estate_rialYesNet estate in rial, after debts, funeral costs and financial obligations.
paternal_unclesNoFather's brothers, عمو (class 3).
paternal_sistersNoSisters by the father only (class 2).
maternal_siblingsNoBrothers and sisters by the mother only (class 2).
paternal_brothersNoBrothers by the father only (class 2).
maternal_grandfatherNoMother's father is alive (class 2).
maternal_grandmotherNoMother's mother is alive (class 2).
paternal_grandfatherNoFather's father is alive (class 2).
paternal_grandmotherNoFather's mother is alive (class 2).

Output Schema

NameRequiredDescriptionDefault
textYesThe result, in Persian, as it should be quoted.
linksYesThe dadrasai.com pages the result cites, in order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

With readOnly/idempotent/non-destructive already covered by annotations, the description adds substantive domain behavior: رد and ورود نقص treatment, no عول under Shia law, the one-third bequest cap, a flagged special rule for a wife's share of land, and the return format (fraction + amount in rial with applied articles).

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?

Front-loaded with the core action and organized into purpose, routing, and input rules; every sentence carries information. It is dense with parenthetical Persian legal terms and stacks several caveats, which slightly slows scanning but does not waste 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?

For a 22-parameter legal calculator with an output schema, the description supplies the routing, the input-population rules, the jurisdictional caveats, and the unit/calendar conventions (rial, Jalali) an agent needs. Return values are already covered by the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns above that by adding a genuinely non-obvious input rule that the schema does not encode ('a later class inherits only when every earlier class is empty', spouse inherits alongside every class). It still does not clarify the spouse/wives interaction or mother_blocked semantics beyond the schema.

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+resource (divide a deceased person's net estate among heirs) and qualifies it with the legal framework (Civil Code classes, fixed shares فروض, رد/ورود نقص, no عول, one-third bequest cap). It is unmistakably distinct from monetary siblings such as calculate_diya, calculate_mehrieh, and calculate_court_fee.

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

Usage Guidelines5/5

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

Explicitly states when to use it ('when the question is who inherits how much') and where to go otherwise ('for the articles behind a share use search_iranian_law or get_law_article'). It also gives the calling rule for heirs: only living heirs, earlier classes block later ones, spouse inherits with every class.

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