Skip to main content
Glama

Read a law's text

rk_law_text
Read-onlyIdempotent

Read the full text of an Iranian law or ruling from the Official Gazette by code, with offset and max_chars controls to retrieve long documents in parts.

Instructions

Read the full text of one law or ruling from the Official Gazette (rrk.ir): approver, gazette number and date, body.

Use with a code from a search. An unlisted code is located by paging the list (slow, 10-60 s; old laws may not be found). Long texts are cut at max_chars; continue with offset = next_offset.

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": {
      "code": "<code>"
    },
    "name": "rk_law_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesLaw `code` from rk_search_laws or rk_latest_laws.
offsetNoCharacter to start from.
max_charsNoMost characters to return.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.0
    • changedInput schema / properties / code / description
      Previous value: -"Law code (number) from rk_search_laws or rk_latest_laws."New value: +"Law `code` from rk_search_laws or rk_latest_laws."
    • changedInput schema / properties / offset / description
      Previous value: -"Character to start from, to read long texts in parts."New value: +"Character to start from."
  2. First observedv0.1.2

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, open-world and non-destructive behavior, and the description adds traits annotations cannot express: variable latency of 10-60 s on the paging fallback, possible non-finding of old laws, and truncation of long texts. Authentication requirements and any rate limiting are left unstated, which keeps it just below a 5.

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?

Three short sentences, with the identity and returned fields front-loaded before the usage constraint and the truncation/continuation rule. The parenthetical latency figure and the `next_offset` pointer each carry distinct information, so nothing is filler.

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?

There is no output schema, so the description compensates by naming the returned fields, and it covers the pagination loop and the failure mode for missing codes. For a three-parameter read tool with full annotation coverage, there is no material gap an agent would need filled before calling it.

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?

With 100% schema coverage the baseline is 3, but the description adds the operational relationship the schema does not encode: `max_chars` truncates long texts and `offset` should be set to the returned `next_offset` to continue. That tells the agent how the two numeric parameters interact rather than merely restating them.

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 and resource ("Read the full text of one law or ruling") plus the source (rrk.ir Official Gazette) and the fields returned (approver, gazette number and date, body). The single-record scope plus the requirement of a `code` clearly separates it from the list-producing siblings rk_search_laws, rk_latest_laws, and rk_law_filters.

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?

Explicitly says to call it with a `code` obtained from a search and discloses the costly fallback path for unlisted codes (paging, 10-60 s, old laws may not be found), which effectively routes the agent through rk_search_laws first. It doesn't name a specific sibling alternative for browsing or state when a law should not be read at all, so it falls short of full when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.