Skip to main content
Glama
smridhiwho

open-india-law-mcp

by smridhiwho

run_sql

Run read-only SQL queries over Indian legislation and court judgment parquet files to filter and retrieve legal records by act, case, year, or text pattern.

Instructions

Run a read-only SELECT against one or more Open India Law parquet files, referenced by the hf:// URIs from list_catalog, e.g.:

SELECT act_id, title, section_number, section_title
FROM read_parquet('hf://datasets/vaquill/open-india-law/in_central_legislation.parquet')
WHERE text ILIKE '%arbitration%' AND act_status = 'in_force'
ORDER BY year DESC

Only a single SELECT/WITH statement is allowed -- no DDL/DML, no multiple statements. limit is capped at 200 rows regardless of what the query asks for, since these files can be tens of GB and a filter still has to scan every row group it can't rule out via column stats. Narrow with a specific file (one court/state/regulator), a year range, and an indexed-looking equality filter (act_id, case_id) wherever you can -- it's the difference between a sub-second query and a slow scan.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and delivers richly: read-only execution, 'only a single SELECT/WITH statement is allowed -- no DDL/DML, no multiple statements,' the hard 'limit is capped at 200 rows' stop, and the scan-cost rationale for tens-of-GB files. No contradiction with annotations exists since none are present.

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?

Though long, every sentence earns its place: purpose, a fully executable example, hard constraints, the row cap, and performance guidance. Each element of the example teaches a required convention (URI format, read_parquet invocation, filter patterns), so no portion 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?

The output schema covers return values, freeing the description to focus on behavior, and it covers everything else an agent needs: prerequisites (list_catalog URIs), structural constraints, the 200-row cap, and an optimization strategy for avoiding slow scans. Nothing needed for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for both bare parameters, and it does. It explains the required shape of `sql` (single SELECT/WITH, hf:// URI + read_parquet pattern, example query) and the `limit` cap behavior at 200 rows. This fully makes up for the schema's lack of descriptions.

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 immediately: 'Run a read-only SELECT against one or more Open India Law parquet files.' The concrete example with hf:// URIs and the reference to `list_catalog` make the scope unambiguous and distinguish it from the higher-level search_* siblings.

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?

Provides clear operational context: URIs come from list_catalog, and it advises narrowing 'with a specific file (one court/state/regulator), a year range, and an indexed-looking equality filter (act_id, case_id).' However, it never explicitly states when NOT to use this tool in favor of sibling search/get tools, so routing to alternatives is implied rather than exclusionary.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/smridhiwho/india-law-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server