Skip to main content
Glama

Search laws and regulations

qv_search
Read-onlyIdempotent

Search 168,000 Iranian laws, regulations, votes and opinions by title or full text to find which law covers a topic, list an approving body's rules, or locate recent legislation.

Instructions

Search the Iranian law and regulation database (qavanin.ir, 168,000 documents) and list matching titles.

Returns total hits, page count and items with id (the IDS to give qv_law, qv_law_info, qv_amendments and qv_related), title, approval date (Jalali), approving body and repealed for repealed ones. Text search shows no snippets. Use for "which law covers X", "all regulations of body Y in a date range" and "latest laws". Sorting by date has many ties, so paging a long list may repeat or skip a row; narrow the filters instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo'law' (Majlis statutes), 'regulation', 'vote' (court rulings), 'opinion' (legal opinions).
pageNoPage number, from 1.
sortNoBy approval date, or 'title' (alphabetical by database collation; stable for paging).newest
limitNoResults per page.
matchNo'all_words' every word as a whole word, 'phrase' words adjacent, 'part_of_word' substring match (the site default, widest), 'any_word' at least one whole word.all_words
queryNoWords to find, Persian or Arabic letters, e.g. 'مالیات بر ارزش افزوده'.
statusNoLegal status. 'repealed' = منسوخه; 'moot' = بااجرامنتفی می شود. 'valid' undercounts.
in_textNoSearch the full text of every law, not only the titles.
list_idNoA curated list id from qv_lookup(kind='list'), e.g. 113 for the latest laws.
type_idNoDocument type ids from qv_lookup(kind='type').
command_noNoNotification number (شماره ابلاغ), digits, substring.
subject_idNoSubject ids from qv_lookup(kind='subject').
approved_toNoApproval date to, Jalali 'YYYY/MM/DD'.
approver_idNoApproving body ids from qv_lookup(kind='approver'); several are OR-ed.
executor_idNoExecuting body ids from qv_lookup(kind='executor').
newspaper_noNoOfficial gazette number (شماره روزنامه رسمی), digits, substring.
approved_fromNoApproval date from, Jalali 'YYYY/MM/DD'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover readOnly/idempotent/openWorld, yet the description adds non-obvious behavior: text search returns no snippets, and date sorting has many ties so paging a long list may repeat or skip rows, with a concrete remedy ('narrow the filters'). It also enumerates the return payload fields in the absence of an output schema.

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?

Four sentences, front-loaded with purpose, then return contents, then use cases, then the pagination caveat. The return-field enumeration is slightly dense but earns its place because no output schema exists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 17-parameter, no-output-schema tool it covers what is returned, what the IDs feed into, and the one operational hazard (unstable date paging). It stops short of describing parameter interactions or behavior when no query is supplied, which a tool this complex could still benefit from.

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 17 parameters is already documented with enums, defaults and cross-references to qv_lookup kinds. The description adds no per-parameter syntax or constraint detail beyond what the schema provides, 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?

States a specific verb (search) and resource (Iranian law and regulation database, qavanin.ir, 168,000 documents) plus the output shape (matching titles). It is clearly distinguished from siblings: this is the discovery tool, while qv_law/qv_law_info/qv_amendments/qv_related consume the `id` values it returns.

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?

Gives explicit use cases ('which law covers X', 'all regulations of body Y in a date range', 'latest laws') and routes the agent to the ID-consuming siblings. It does not spell out when to prefer another tool over this one (e.g. direct-ID retrieval), but the downstream routing makes the intent clear.

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