Skip to main content
Glama

Dadras — Iranian law (دادرس)

Diya — blood money (محاسبهٔ دیه)

calculate_diya
Read-onlyIdempotent

Compute the diya (دیه, blood money) owed for a death or a bodily injury under the Islamic Penal Code: the injury's legal fraction applied to the year's full diya from the Judiciary's annual circular, with the sacred-month and Haram increase and the woman's share where they apply. Use it when the question is how much diya an injury or death carries; for the full-diya figure of a year alone use get_reference_rates, and for the articles that set a fraction use search_iranian_law. Covers the 22 injuries listed under injury; for others the articles give the fraction. Returns the amount in rial and toman, its breakdown, the circular used and the legal basis. Amounts in rial; dates in the Jalali calendar.

Input Schema

NameRequiredDescriptionDefault
yearNoJalali year of the diya circular — the year of payment, which sets the amount; the current year when not given.
countNoHow many injuries of this kind (e.g. three fingers); 1 when not given.
injuryYesThe death or injury. Values: life = قتل نفس — قتل نفس — دیه کامل; eye-one = اعضا و منافع — از بین بردن یک چشم; eye-both = اعضا و منافع — از بین بردن هر دو چشم; ear-one = اعضا و منافع — از بین بردن یک گوش; nose = اعضا و منافع — از بین بردن کل بینی; tongue = اعضا و منافع — از بین بردن زبان (گویا); lip-one = اعضا و منافع — از بین بردن یک لب; hand-one = اعضا و منافع — قطع یک دست; foot-one = اعضا و منافع — قطع یک پا; finger = اعضا و منافع — قطع یک انگشت دست یا پا; phalanx = اعضا و منافع — قطع یک بند از انگشت غیرشست; thumb-phalanx = اعضا و منافع — قطع یک بند از انگشت شست; harseh = جراحات سر و صورت — حارصه — خراش پوست بدون خون‌آمدن; damiyeh = جراحات سر و صورت — دامیه — بریدگی همراه با خون‌آمدن; motalahemeh = جراحات سر و صورت — متلاحمه — بریدگی عمیق گوشت; semhaq = جراحات سر و صورت — سمحاق — رسیدن جراحت به پرده استخوان; muzeheh = جراحات سر و صورت — موضحه — نمایان شدن استخوان; hashemeh = جراحات سر و صورت — هاشمه — شکستگی استخوان; monaqqeleh = جراحات سر و صورت — منقله — جابه‌جایی استخوان; maamumeh = جراحات سر و صورت — مأمومه — رسیدن جراحت به کیسه مغز; damegheh = جراحات سر و صورت — دامغه — پاره شدن کیسه مغز; jaefeh = جراحات بدن — جائفه — نفوذ جراحت به داخل بدن.
inside_haramNoThe act took place inside the Haram of Mecca.
sacred_monthNoThe act took place in a sacred month (رجب، ذی‌القعده، ذی‌الحجه، محرم); adds one third to a death's diya.
victim_genderNoThe victim's sex; male when not given. Values: male = مرد; female = زن.
full_diya_rialNoA full-diya figure in rial to use instead of the table's, e.g. from a newer circular; normally left out.

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.4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds real behavioral context beyond that: which legal modifiers are applied (sacred-month one-third increase, Haram increase, woman's share), what is returned (rial and toman amounts, breakdown, circular used, legal basis), and the unit/calendar conventions.

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-loads the purpose and computation rule, then routes to alternatives, then states coverage limits and output conventions. The opening sentence is dense and long, but every clause carries information and nothing is repeated from the structured fields.

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?

An output schema exists so return values need not be explained, yet the description still names the unit (rial) and calendar (Jalali) and warns that unsupported injuries fall back to the articles. For a 7-parameter calculator with enum-heavy inputs, nothing an agent needs to call it correctly is missing.

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 each parameter documented including enum values in Persian, so the baseline is 3. The description reinforces that the year's circular drives the amount and that the sacred-month/Haram/gender rules modify it, but adds no syntax or format detail 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 (compute) and resource (diya for death or bodily injury) plus the legal framework it applies, and explicitly contrasts itself with two siblings (get_reference_rates for the full-diya figure, search_iranian_law for the fraction-setting articles). An agent can distinguish it from every other calculate_* sibling without opening a schema.

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?

Gives explicit when-to-use ('when the question is how much diya an injury or death carries') and two named alternatives with the conditions that select them. It also discloses the coverage boundary: the 22 injuries enumerated under `injury`, with the articles handling the rest.

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