Skip to main content
Glama

Search laws and regulations

rk_search_laws
Read-onlyIdempotent

Search Iran's Official Gazette laws and regulations by title, full text, group, approver, special number, or Jalali gazette date; retrieve law codes for full-text access.

Instructions

Search the Official Gazette's laws and regulations database (rrk.ir) by title, full text, group, approver, special number or gazette date.

Filters are optional and combined; none lists the newest. Returns total, more and up to 20 laws with code; pass a code to rk_law_text. Laws only: company registration notices are not searchable on rrk.ir.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "rk_search_laws"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number, 20 per page.
textNoWords in the full text (slower than title).
groupNoGroup id or name words from rk_law_filters, e.g. 'دیوان عدالت' or '3'. A top-level group includes its sub-groups.
titleNoWords in the title, Persian (e.g. 'ماليات').
to_dateNoGazette date to, Jalali YYYY/MM/DD.
approverNoApprover (مرجع تصویب) code or name words from rk_law_filters.
from_dateNoGazette date from, Jalali YYYY/MM/DD, e.g. '1405/08/01'.
special_noNoSpecial issue number (شماره ویژه), e.g. '2301'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.2.0
    • changedInput schema / properties / approver / description
      Previous value: -"Approving authority (مرجع تصویب) code or name words from rk_law_filters, e.g. 'دبیر هیات دولت'."New value: +"Approver (مرجع تصویب) code or name words from rk_law_filters."
    • changedInput schema / properties / group / description
      Previous value: -"Law group (category) id or name words from rk_law_filters, e.g. 'آرای هیات عمومی دیوان عدالت اداری' or '3'. A top-level group includes its sub-groups; id 64 is the Majlis debates."New value: +"Group id or name words from rk_law_filters, e.g. 'دیوان عدالت' or '3'. A top-level group includes its sub-groups."
    • changedInput schema / properties / page / description
      Previous value: -"Page number, 20 laws per page, newest gazette first."New value: +"Page number, 20 per page."
    • changedInput schema / properties / special_no / description
      Previous value: -"The special issue number (شماره ویژه), e.g. '2301'."New value: +"Special issue number (شماره ویژه), e.g. '2301'."
    • changedInput schema / properties / text / description
      Previous value: -"Words inside the law's full text (slower than title search)."New value: +"Words in the full text (slower than title)."
    • changedInput schema / properties / title / description
      Previous value: -"Words in the law's title, Persian (e.g. 'ماليات', 'ديوان عدالت اداري')."New value: +"Words in the title, Persian (e.g. 'ماليات')."
    • changedInput schema / properties / to_date / description
      Previous value: -"Gazette date to, Jalali YYYY/MM/DD, inclusive."New value: +"Gazette date to, Jalali YYYY/MM/DD."
  2. First observedv0.1.2

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and non-destructive, so the safety profile is covered. The description adds genuinely useful behavior beyond that: the unfiltered default returns the newest entries, results are capped at 20 per page, and the response carries `total` and `more` for paging decisions. It does not discuss rate limits or query cost beyond the schema's note that full-text search is slower.

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, front-loaded with the verb and resource, then the filter/default semantics, then the return shape and next-step chaining. The trailing scope exclusion earns its place by preventing a plausible mis-invocation; nothing is redundant.

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 carries the return contract itself and does so (`total`, `more`, up to 20 `laws` with `code`). Combined with the chaining hint to rk_law_text and the explicit exclusion, an agent has everything needed to call this correctly and use the result.

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 every one of the 8 parameters is already documented with format examples and defaults. The description restates the filter categories at a high level ('title, full text, group, approver, special number or gazette date') without adding format or precedence detail beyond the schema, so the baseline 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?

Names a specific verb and resource ('Search the Official Gazette's laws and regulations database') and enumerates the searchable axes (title, full text, group, approver, special number, gazette date). It also draws a hard boundary — 'Laws only: company registration notices are not searchable' — which separates it from what an agent might otherwise expect from a general legal search.

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 states that filters are optional and combined, and that no filters lists the newest, which tells the agent the zero-argument behavior. It also routes the agent forward: 'pass a code to rk_law_text'. What's missing is an explicit pointer to rk_law_filters for obtaining group/approver codes (that hint lives only in the schema) and no contrast with the rk_latest_laws sibling, whose purpose overlaps with the 'none lists the newest' default.

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