qavanin-mcp
This is a read-only MCP server for searching and reading Iranian laws, regulations, court votes, and legal opinions from qavanin.ir.
Search ~168,000 documents by title or full text, with filters for document kind, approving/executing body, subject, type, status, dates, gazette/notification numbers, and curated lists.
Look up filter IDs for approving bodies, executing bodies, subjects, document types, statuses, and curated lists.
Read a law’s text as paged sections, a single article with its notes, the text as of a past Jalali date, or with interpretive opinions.
Get law metadata: type, approving body, approval/notification/gazette dates and numbers, last status, effective date, and executors.
Trace amendments: which laws amended a law, which it amends, which articles changed, and the full amendment history of one article with replacing text.
Find related laws, regulations, court votes, and legal opinions that cite or interpret a law.
All 7 tools are read-only, require no authentication, use Jalali dates and string document IDs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@qavanin-mcpWhat does Article 10 of the Iranian Civil Code say?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
qavanin-mcp: Iranian laws and regulations MCP server for AI agents
Let your AI agent read Iranian law (قوانین و مقررات ایران). An unofficial, read-only MCP server for qavanin.ir (سامانه ملی قوانین و مقررات جمهوری اسلامی ایران), the national database of Iranian laws, regulations, court votes and legal opinions. Search about 168,000 documents by title or full text, read a law or a single article, see how an article was amended, and follow the regulations and court votes that cite it, all from Claude, Cursor or Copilot.
For AI agents · Why · What it can do · Quick start · Tools · How it works · Good to know · FAQ · Configuration · فارسی · Development · Related · Disclaimer · License
For AI agents
What: unofficial MCP server (model context protocol) for qavanin.ir, Iran's national laws and regulations database. Queries work in Persian (Arabic ي/ك and Persian ی/ک are equivalent); dates are Jalali
YYYY/MM/DD.Install:
uvx qavanin-mcporclaude mcp add qavanin -- uvx qavanin-mcp. Transport: stdio. Needs uv (Python 3.10+).Auth: none, no API key or account. Optional
QAVANIN_MCP_PROXY(HTTP proxy URL, or a comma-separated list tried in turn); system proxy settings are ignored.Access: read-only. No login, subscription or purchase calls exist, so no confirmation is needed before calling any tool.
Tools: 7, all prefixed
qv_. Typical sequence:qv_search->qv_law(witharticle) ->qv_amendments->qv_article_history.Units: dates are Jalali strings (
1405/07/22); document ids (id, the site'sIDS) are 20-digit strings, keep them as strings; text uses Persian ی/ک.Use when: looking up what an Iranian law, regulation, court ruling or legal opinion says, when it was approved and published, whether it was amended or repealed, and what cites it.
Do not use when: the user needs legal advice or a binding interpretation. The site is a reference database; always say which version and status you read. Sections marked
repealedoramendedare not current text.Machine-readable:
server.jsonand the iran-mcp catalog (TOOLS.md,servers.json,llms.txt).
Related MCP server: Legalize
Why
Iranian legislation is spread over thousands of laws, by-laws, court votes and opinions, and a law's current text depends on later amendments. Answering "what does article 10 of the civil code say, was it ever amended, and which regulations cite it?" means a lot of searching on a slow, server-rendered site. With qavanin-mcp an agent does it in a few calls and returns only the relevant article instead of an 892 KB law.
You: ماده ۱۰ قانون مدنی چه می‌گوید؟
Agent: calls
qv_search(query="قانون مدنی", kind="law")->qv_law(ids=..., article="10")It finds the civil code, reads just article 10 with its notes, and can follow up with
qv_article_historyto show whether that article was changed.
What it can do
Search about 168,000 laws, regulations, court votes and legal opinions by title or full text, with filters for kind, approving body, executor, subject, document type, status, dates and gazette numbers
Read a law as sections, a single article with its notes, or the text as of a past date
Check status: approval, notification and gazette numbers and dates, last status, executors
Trace amendments: which laws amended this one, which it amends, and every amendment of one article with its replacing text
Follow citations: regulations, court votes and legal opinions related to a law
Look up filter ids: approving bodies, executing bodies, subjects, document types, statuses and curated lists
Read-only by design: no login, no comments, no subscriptions, no purchases
Quick start
You need uv. No API key or account.
claude mcp add qavanin -- uvx qavanin-mcpSettings → Developer → Edit Config, then add:
{
"mcpServers": {
"qavanin": { "command": "uvx", "args": ["qavanin-mcp"] }
}
}Add the Claude Desktop block to ~/.cursor/mcp.json.
Click Install in VS Code above, or add to .vscode/mcp.json:
{
"servers": {
"qavanin": { "type": "stdio", "command": "uvx", "args": ["qavanin-mcp"] }
}
}codex mcp add qavanin -- uvx qavanin-mcpOr in ~/.codex/config.toml:
[mcp_servers.qavanin]
command = "uvx"
args = ["qavanin-mcp"]Add to ~/.gemini/settings.json:
{
"mcpServers": {
"qavanin": { "command": "uvx", "args": ["qavanin-mcp"] }
}
}Add the Claude Desktop block to ~/.codeium/windsurf/mcp_config.json.
It's a standard stdio MCP server: run uvx qavanin-mcp, or pip install qavanin-mcp and run qavanin-mcp.
Then just ask:
"What does article 10 of the Iranian civil code say?"
"Was article 1 of this law ever amended? Show the amendment history."
"Find the latest laws approved by the Majlis and list their gazette numbers."
"Which regulations and court votes are related to the Iranian Commercial Code?"
"Show the text of this law as it was on 1400/01/01."
ماده ۱۰ قانون مدنی چه می‌گوید؟
آیا ماده ۱ این قانون اصلاح شده است؟ تاریخچه اصلاحات را نشان بده.
آیین‌نامه‌ها و آرای مرتبط با قانون تجارت کدام‌اند؟
Tools
All tools return compact JSON. Document ids from qv_search go to the other tools; qv_lookup finds the ids that qv_search filters take.
Tool | What it does |
| Search titles or full text, with filters for kind, approving body, executor, subject, type, status, dates and gazette numbers |
| Find the ids the search filters take: approving bodies, executing bodies, subjects, document types, statuses, curated lists |
| Read the text of a law as sections, one article with its notes, or the text as of a past date |
| Metadata: type, approver, approval, notification and gazette numbers and dates, last status, executors |
| Which laws amended this one, which it amends, and which of its articles were amended |
| Every amendment of one article: type, date, amending law, replacing text |
| Regulations, court votes and legal opinions related to a law |
All 7 tools are annotated readOnlyHint: true.
How it works
AI agent (Claude, Cursor, Copilot, ...)
│
│ MCP over stdio
▼
qavanin-mcp (runs on your machine)
│
│ HTTPS
└──────▶ qavanin.ir laws, regulations, court votes, opinionsqavanin-mcp runs locally and reads the same pages the qavanin.ir website serves (server-rendered HTML plus two small JSON lookups). There is no hosted server in between and no API key. The site's bot-check cookie is solved in Python, so no browser is needed.
Good to know
The site is slow: 1-15 s per call. The civil code takes about 15 s on first read; it is cached for 5 minutes, so paging through it is fast.
Dates are Jalali (
1405/07/22), ids stay strings (20-digit), and text is normalised to Persian ی/ک. Placeholder dates such as0000/00/00are dropped.Status matters: sections marked
repealedoramendedare not current text. Say which version and status you read.Full-text search shows no snippet. With
in_textit finds words inside the law text, so open candidates withqv_law(article=...).The site sometimes ignores search filters and answers with the whole database; the server detects that and retries.
Sorting by date has ties, so paging a long list can repeat or skip a row: narrow the filters instead of paging deep.
Not covered: comments, subscriptions, purchases and any account feature. It is a research aid, not legal advice.
FAQ
Yes: qavanin-mcp is an unofficial MCP server with 7 read-only tools for searching and reading laws, regulations, court votes and legal opinions on qavanin.ir. It reads the same pages as the website; no API key is needed.
Add the server with claude mcp add qavanin -- uvx qavanin-mcp (or the matching config in Quick start), then ask in plain language, in Persian or English.
It is unofficial and not affiliated with qavanin.ir or the Iranian government. It is read-only, runs on your machine, and is free under the MIT license.
No. It shows what the site shows. Check each document's status and amendments (qv_law_info, qv_amendments) before relying on it, and consult a lawyer for legal advice.
Yes. The site stores Arabic ي/ك, and queries in either form match. Output is normalised to Persian ی/ک.
The site returns a whole law in one response (the civil code is about 892 KB). The server caches it for 5 minutes, so reading further articles is fast.
No. It has no login and never calls comment, subscription or purchase endpoints.
The server solves qavanin.ir's cookie challenge itself. If your network still cannot reach the site, set QAVANIN_MCP_PROXY to an HTTP proxy that can. System proxy variables are ignored on purpose.
Use the full path to uvx (where uvx on Windows, which uvx on macOS/Linux) as command.
Configuration
Variable | Default | Meaning |
| unset | Optional HTTP proxy URL, or a comma-separated list tried in turn, for qavanin.ir; system proxies are ignored |
فارسی
سرور MCP قوانین و مقررات ایران برای دستیار هوش مصنوعی
qavanin-mcp یک سرور MCP غیررسمی و فقط‌خواندنی برای سامانه ملی قوانین و مقررات جمهوری اسلامی ایران (qavanin.ir) است. دستیار هوش مصنوعی شما (Claude، Cursor، Copilot و ...) با آن می‌تواند در حدود ۱۶۸ هزار سند شامل قوانین، مقررات، آرای قضایی و نظرات حقوقی جستجو کند.
چه کارهایی می‌کند
جستجو در عنوان یا متن اسناد، با فیلتر نوع سند، مرجع تصویب‌کننده، دستگاه اجرایی، موضوع، وضعیت، تاریخ و شماره روزنامه رسمی.
خواندن متن قانون، یک ماده با تبصره‌هایش، یا متن قانون در یک تاریخ گذشته.
اطلاعات سند: تاریخ تصویب و ابلاغ، شماره روزنامه رسمی، آخرین وضعیت و دستگاه‌های اجرایی.
اصلاحات: کدام قوانین این قانون را اصلاح کرده‌اند و تاریخچهٔ اصلاح هر ماده.
مقررات و آرای مرتبط: آیین‌نامه‌ها، آرای دادگاه‌ها و نظرات مرتبط با هر قانون.
نکته‌ها
فقط خواندنی است: وارد حساب نمی‌شود، اشتراک یا خرید ندارد.
تاریخ‌ها شمسی (مثل
1405/07/22) هستند و حروف عربی «ي» و «ك» در جستجو با «ی» و «ک» یکی حساب می‌شوند.سایت کند است (۱ تا ۱۵ ثانیه برای هر درخواست). این ابزار مشاوره حقوقی نیست؛ وضعیت و اصلاحات هر متن را بررسی کنید.
روی سیستم خود شما اجرا می‌شود و کلید API لازم ندارد.
کلیدواژه‌ها: قوانین و مقررات ایران، سامانه ملی قوانین و مقررات، قوانین کشور، متن قانون، قانون مدنی، آرای قضایی، نظرات مشورتی، اصلاحات قانون، سرور MCP قوانین.
نصب (اول uv را نصب کنید). در Claude Code:
claude mcp add qavanin -- uvx qavanin-mcpدر Claude Desktop، Cursor و بقیه برنامه‌ها همان تنظیم بخش Quick start را بگذارید.
نمونه پرسش‌ها
«ماده ۱۰ قانون مدنی چه می‌گوید؟»
«آیا ماده ۱ این قانون اصلاح شده است؟»
«آیین‌نامه‌های مرتبط با قانون تجارت را فهرست کن.»
«متن این قانون در تاریخ ۱۴۰۰/۰۱/۰۱ چه بود؟»
Development
git clone https://github.com/sepehr071/qavanin-mcp && cd qavanin-mcp
uv sync
uv run python -m pytest # offline, against recorded responses
uv run python -m pytest -m live # real site, slow
uv run ruff check .Tools live in src/qavanin_mcp/search.py and law.py; each is a typed async function with a docstring that tells the agent when to use it. Issues and PRs are welcome.
Releases: bump the version in pyproject.toml and server.json, then push a v* tag. GitHub Actions tests, publishes to PyPI and the MCP Registry, and creates the GitHub Release.
Related servers
Iran Tax MCP server for Iranian tax and Codal data
Paziresh24 MCP server for doctors and appointments
Iran News MCP server for Iranian news
Iran Apps MCP server for Iranian apps
iran-mcp: catalog of all Iranian-service MCP servers
Listed on mcpfarsi.ir, the Persian MCP marketplace
Disclaimer
Unofficial and not affiliated with or endorsed by qavanin.ir or the Iranian government. It reads the pages of the qavanin.ir website, which can change without notice, and it is a research aid, not legal advice. Please keep request rates reasonable.
Author
Built and maintained by Sepehr Radmard (سپهر رادمرد). Connect on LinkedIn or follow @sepehr071 on GitHub for more MCP servers for Iranian websites, all listed in iran-mcp. If this saves you time, a star on the repo helps other people find it.
License
If this saves you time, a star helps others find it.
Available Tools
7 toolsqv_amendmentsAmendments of a lawARead-onlyIdempotent
Which laws amended this one, which this one amends, and which of its articles were amended.
Returns amended_by and amends (id, title, approval date) and articles: section id, label, number of
changes and the latest change. Read one article's full history with qv_article_history(section_id).
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | Law id (IDS) from qv_search, digits only, e.g. '12021850837713548188'. | |
| limit | No | Max amending/amended laws listed per direction. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, open-world, non-destructive. With no output schema, the description usefully discloses the return shape (amended_by/amends with id, title, approval date; articles with section id, label, change count, latest change). It does not mention ordering or whether limit applies to both lists beyond what the schema says.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads the three questions answered, then the return contents, then the sibling pointer. No filler, though the middle sentence is densely packed with field lists that border on schema recap.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Since there is no output schema, the description's enumeration of returned fields is exactly what an agent needs to consume the result. Combined with the routing hint and full schema coverage, nothing material is missing for calling it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% – both ids and limit are documented in the schema, including the IDS source and the digits-only pattern. The description adds no parameter-level detail beyond that, so baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific subject (amendments of a law) and enumerates exactly the three relationships it answers: which laws amended this one, which it amends, and which articles were amended. The reference to qv_article_history for a different granularity cleanly separates it from siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly routes the agent to qv_article_history(section_id) when a single article's full history is wanted, which is a real alternative. It gives no guidance on when this tool is unnecessary (e.g. if only law metadata is needed, qv_law_info may suffice), so it stops just short of full when/when-not coverage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
qv_article_historyHistory of one articleARead-onlyIdempotent
Every amendment of one article: type (اصلاحی...), date, the amending law and the replacing text.
Use after qv_law or qv_amendments when asked how an article changed. Oldest change first. An article that was never amended returns an empty list.
| Name | Required | Description | Default |
|---|---|---|---|
| section_id | Yes | Section id from qv_law (items marked history) or qv_amendments. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavioral context that annotations cannot: ordering ('oldest change first') and the empty-result contract for unamended articles.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences plus a sentence fragment, front-loaded with what is returned and followed by the usage condition. The Persian '(اصلاحی...)' gloss with a trailing ellipsis is slightly opaque but does not cost much space.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description carries the return-value burden and does so reasonably: it names the fields, the ordering, and the empty case. It does not specify the exact response shape (list vs wrapped object) or any pagination, leaving a small gap for a history-list tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There is one parameter with 100% schema description coverage, and the schema already explains the pattern and where the section_id comes from. The description adds no syntax or sourcing detail beyond that, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('Every amendment of one article') and enumerates the returned fields (type, date, amending law, replacing text), so the agent can distinguish it from qv_amendments and qv_law 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.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives an explicit trigger and prerequisite chain: use after qv_law or qv_amendments when asked how an article changed, and notes the empty-list case for never-amended articles. It does not state a when-not condition or an exclusion against other siblings, so it stops short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
qv_lawRead a law's textARead-onlyIdempotent
Read the full text of a law, regulation, court vote or opinion as sections (articles, notes, headings).
Each section has id, label ('ماده 10', 'تبصره 1'), text, status ('amended', 'repealed', 'opinion'; absent
when plain) and history: true when qv_article_history can show its amendments. Long laws are paged by
offset/next_offset within max_chars; the civil code has about 1,500 sections and takes about 15 s to load
the first time. Get the id from qv_search. Use article to answer "what does article N say".
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | Law id (IDS) from qv_search, digits only, e.g. '12021850837713548188'. | |
| date | No | Jalali 'YYYY/MM/DD': the text as it stood on that date (before later amendments). | |
| offset | No | Skip this many sections (use next_offset from the last call). | |
| article | No | Only this article with its notes, e.g. '10', 'ماده 10', '10 مکرر'. | |
| max_chars | No | Text budget per call. | |
| with_opinions | No | Add interpretive opinions (نظر تفسیری) as extra sections. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description adds material context beyond them: first-call latency (~15 s) and scale (~1,500 sections in the civil code), pagination semantics via offset/next_offset bounded by max_chars, and the per-section field structure (`id`, `label`, `text`, `status`, `history`). With no output schema, this is exactly the burden the description should carry.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads the core purpose, then layers return structure, paging/perf, and sourcing in descending priority. Every sentence carries actionable information; no filler or restatement of the name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read tool with six parameters, no output schema, and rich annotations, the description covers purpose, sourcing, pagination, latency, and return shape. An agent has everything needed to call it correctly and interpret the result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline would be 3, but the description earns extra value: it explains the paging contract between `offset` and `next_offset` within `max_chars`, and ties `article` to the 'what does article N say' question, and shows example labels ('ماده 10', 'تبصره 1') that clarify the label format the id must match.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Names a specific verb and resource ('Read the full text of a law, regulation, court vote or opinion') and immediately scopes the output shape ('as sections'). It is distinguishable from siblings: qv_search supplies the id, qv_article_history supplies amendments, and qv_law supplies the text itself.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives clear routing ('Get the id from qv_search') and a concrete use case for the `article` parameter ('to answer "what does article N say"'), plus points at qv_article_history via the `history: true` flag. It lacks an explicit statement of when NOT to use this tool versus qv_law_info or qv_lookup, so it stops 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.
qv_law_infoLaw metadataARead-onlyIdempotent
Metadata of a law: type, approving body, approval, notification and gazette dates and numbers, last status, effective date, executing bodies and recipients of the copy.
Use after qv_search to cite a law ("approved 1318/..., published in gazette no. ...") or to check its type. Court votes and opinions carry almost no metadata. Dates are Jalali.
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | Law id (IDS) from qv_search, digits only, e.g. '12021850837713548188'. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds real context beyond that: dates are Jalali (affects how the agent reads every returned value) and metadata is sparse for court votes/opinions. It does not cover failure modes for unknown IDs or any rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the resource and its returned fields, then usage, then two caveats (sparse metadata for opinions, Jalali dates). Every sentence carries distinct information and nothing is repeated from the schema or annotations.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the field enumeration plus the Jalali and sparse-metadata caveats give the agent nearly everything needed to interpret the result. Minor gap: the parameter is named 'ids' (plural) but typed as a single-digit string, and behavior on non-existent IDs is unstated.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the single parameter already documents its source (qv_search), digit-only pattern and an example value. The description adds nothing about the ID beyond implying provenance via 'Use after qv_search', so the schema carries the weight and a baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific resource (a law's metadata) and enumerates exactly which fields come back: type, approving body, approval/notification/gazette dates and numbers, status, effective date, executing bodies. It implicitly distinguishes itself from full-text siblings by noting that court votes and opinions carry almost no metadata, but it never explicitly contrasts with qv_law or qv_amendments.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives concrete trigger conditions: use after qv_search to cite a law, or to check its type. It also flags a de facto when-not case (court votes and opinions have almost no metadata, so this tool adds little there). No alternative sibling is named as an explicit substitute, which keeps it below a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
qv_lookupLook up filter idsARead-onlyIdempotent
Find the ids that qv_search filters take: approving bodies, executing bodies, subjects, types, statuses, lists.
Returns items with id and name; approvers, executors and subjects also have count (documents) and are
paged by 20. Example: kind='approver', query='مجلس' gives the Majlis id to pass as approver_id.
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | 'approver' (مرجع تصویب), 'executor' (دستگاه مجری), 'subject' (موضوع), 'type' (نوع مصوبه), 'status' (وضعیت) or 'list' (curated lists). | |
| page | No | Page of 20 for approver, executor and subject. | |
| query | No | Name fragment, e.g. 'دیوان' or 'بانک'. Empty lists the most used. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the bar is lower. The description adds real behavioral detail beyond them: return shape (items with `id` and name), that approver/executor/subject also carry `count`, and that those kinds are paged by 20. It does not disclose page limits for the unpaged kinds (type/status/list) or what an empty honest query returns precisely.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core purpose, then return shape, then a worked example. Every sentence carries information and there is no filler, though the enumeration of kinds slightly duplicates the schema's enum list.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description takes on the burden of describing returns and does so (id, name, count, 20-per-page). An agent has enough to call it correctly, though the differing paging behavior across kinds and the query-matching semantics are only partially covered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and each enum value plus page/query is already documented with Persian glosses in the schema. The description's example for kind='approver' adds a little applied meaning, but mostly restates the paging behavior already in the schema. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('find the ids that qv_search filters take') and enumerates exactly which filter dimensions it resolves. It explicitly ties itself to sibling qv_search, so an agent can distinguish lookup from search without opening either schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description makes the use case clear: resolve a human name (e.g. 'مجلس') into an id to pass as approver_id to qv_search. It gives a concrete example, but offers no explicit when-not-to-use or guidance on which kind to pick versus calling qv_search directly with a raw query.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
qv_searchSearch laws and regulationsARead-onlyIdempotent
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.
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | 'law' (Majlis statutes), 'regulation', 'vote' (court rulings), 'opinion' (legal opinions). | |
| page | No | Page number, from 1. | |
| sort | No | By approval date, or 'title' (alphabetical by database collation; stable for paging). | newest |
| limit | No | Results per page. | |
| match | No | '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 |
| query | No | Words to find, Persian or Arabic letters, e.g. 'مالیات بر ارزش افزوده'. | |
| status | No | Legal status. 'repealed' = منسوخه; 'moot' = بااجرامنتفی می شود. 'valid' undercounts. | |
| in_text | No | Search the full text of every law, not only the titles. | |
| list_id | No | A curated list id from qv_lookup(kind='list'), e.g. 113 for the latest laws. | |
| type_id | No | Document type ids from qv_lookup(kind='type'). | |
| command_no | No | Notification number (شماره ابلاغ), digits, substring. | |
| subject_id | No | Subject ids from qv_lookup(kind='subject'). | |
| approved_to | No | Approval date to, Jalali 'YYYY/MM/DD'. | |
| approver_id | No | Approving body ids from qv_lookup(kind='approver'); several are OR-ed. | |
| executor_id | No | Executing body ids from qv_lookup(kind='executor'). | |
| newspaper_no | No | Official gazette number (شماره روزنامه رسمی), digits, substring. | |
| approved_from | No | Approval date from, Jalali 'YYYY/MM/DD'. |
TDQS
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.
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.
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.
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.
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.
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.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
7 tool updates
v0.1.0- First observed
qv_amendments - First observed
qv_article_history - First observed
qv_law - First observed
qv_law_info - First observed
qv_lookup - First observed
qv_related - First observed
qv_search
TDQS
Scored across 7 tools
Each tool targets a distinct aspect: search, filter-id lookup, full text, metadata, amendment relationships, per-article history, and related documents. The only real overlap is between qv_amendments (summary of which laws amended this one) and qv_article_history (full history of one article), but the descriptions explicitly cross-reference each other to clarify the boundary.
All tools share a consistent 'qv_' prefix and readable snake_case suffixes, giving a predictable family. However, the convention mixes verbs (qv_lookup, qv_search) with nouns (qv_law, qv_law_info, qv_amendments, qv_related), so it is mostly rather than fully consistent.
Seven tools is well-scoped for a read-only legal database, with each tool earning its place by covering a distinct layer (search, lookup, read, metadata, amendments, history, relations). No redundant or filler tools are present.
The surface covers the full read lifecycle of a law: find it, resolve filter ids, read its text, get metadata, trace amendments and related documents. Since the server is read-only over an external corpus, CRUD is not expected; minor gaps like a direct citation/formatter or bulk-export tool remain but are workable via existing tools.
Maintenance
Related MCP Connectors
Iranian statutes, rulings, opinions and legal calculators. Needs a paid Chistara connection link.
95,000+ articles of Iranian law, a legal glossary and 8 Iranian legal calculators. Free.
Resolve, search and verify legal citations against the official sources, with provenance.
Grounded MENA legal search, reasoning, citation resolution, and citation-graph traversal.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides AI assistants with up-to-date legal documents from official sources, enabling accurate legal information retrieval and analysis.20AGPL 3.0

Legalizeofficial
AlicenseNot gradedqualityBmaintenanceEnables AI assistants to search and read consolidated legislation from multiple countries, retrieve exact law texts as of any historical date with citations and git commit SHAs, and create webhook or email subscriptions to track legal changes.2MIT- AlicenseAqualityAmaintenanceEnables AI agents to look up Iranian tax information from the National Tax Administration's public systems without login: e-invoice goods/service IDs and VAT rates, activity codes, official property transaction values, and the text of tax laws, circulars, rulings and FAQ answers. Read-only stdio tools return compact Persian-friendly JSON, making it useful for accountants and businesses that need authoritative tax references.682 PyPIMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to search Turkish legislation by natural-language query or citation, retrieve full article text including ranges and paragraphs, and return results with official citations, Official Gazette details, and source links.Apache 2.0