Skip to main content
Glama

چیستارا — Iranian Legal Corpus

محاسبهٔ سهم‌الارث — Calculate inheritance shares

calculate_inheritance

Calculate Iranian inheritance shares (سهم‌الارث) under قانون مدنی arts. 862–949, including حجب نقصانی reduction rules. The jurisprudential edge cases make hand computation unreliable — always use this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
son_countNoNumber of sons.
has_fatherNoFather alive?
has_motherNoMother alive?
has_spouseNoSurviving spouse?
sibling_countNoDeceased's siblings (for حجب نقصانی).
daughter_countNoNumber of daughters.
deceased_genderYesGender of the deceased.
total_assets_tomanYesTotal estate value in Toman.

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the burden of disclosing behavior. It mentions the legal basis and complexity, and notes that reduction rules are included. However, it does not describe the output format, assumptions, or any limitations (e.g., whether it requires all family members to be specified). This adds some context but leaves significant behavioral aspects undisclosed.

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 long and front-loaded with the core purpose. The second sentence adds value by emphasizing reliability and edge cases. There is no fluff or repetition.

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?

Given the tool has 8 parameters, no output schema, and no annotations, the description could do more to specify what the tool returns and how it handles missing parameters. It explains the legal domain and the complexity, but the agent may not know what to expect as a result (e.g., a numeric share, a breakdown, or a formatted legal report). This is adequate but not thorough.

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?

The input schema has 100% coverage, so the baseline is 3. The description does not add parameter-level detail beyond the schema, but the mention of حجب نقصانی aligns with sibling_count's schema description. It provides no extra meaning for parameters like total_assets_toman or deceased_gender, so a score of 3 is appropriate.

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 clearly states the tool calculates Iranian inheritance shares under specific legal articles (قانون مدنی arts. 862–949) and includes reduction rules (حجب نقصانی). It uses a specific verb ('calculate') and resource ('inheritance shares'), and is clearly distinguishable from sibling tools like calculate_diyeh or calculate_tax.

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?

The description implies usage for Iranian inheritance calculations and explicitly says hand computation is unreliable and to 'always use this tool' for jurisprudential edge cases. It provides a strong context for when to use, but does not mention alternatives or exclusion cases (e.g., when a simple share calculation might not need this). This is clear but lacks explicit when-not-to-use guidance.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool targets a specific legal calculation, lookup, or search source. The calculate_* tools each cover a distinct statutory computation (e.g., delay penalty vs. diyeh vs. mahrieh), the lookup_* tools are for direct retrieval of known items, and the search_* tools are split by source type (law, case law, opinions, circulars). While lookup_annual_rate and search_circular both touch rates, their descriptions clearly separate direct database retrieval from full-text search, so misselection is unlikely.

Naming Consistency5/5

All tools follow a consistent verb_noun snake_case pattern: calculate_* for computations, lookup_* for direct retrieval, and search_* for full-text search. There are no camelCase or mixed-style names, making the set highly predictable.

Tool Count4/5

Nineteen tools is slightly above the typical well-scoped range of 3-15, but the server covers a large legal domain with many distinct calculation types and research sources. Each tool earns its place given the breadth of Iranian law, though the number may feel a bit heavy.

Completeness5/5

The toolset covers statutory calculations (10), specific-article lookup and procedural lookups (5), and full-text search across laws, case law, advisory opinions, and circulars (4). This spans the essential needs of Iranian legal research—computing amounts, finding article text, checking deadlines/sentences/limitations, and finding authoritative interpretations—with no obvious dead ends.

Resources