Skip to main content
Glama

pk_search_laws

Read-onlyIdempotent

Search Pakistan's 967 federal statutes using free-text keywords. Results are ranked by title relevance for efficient retrieval of applicable laws.

Instructions

Keyword search over Pakistan's 967 federal statutes (title-weighted ranking).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNomax results, 1-50 (default 10).
queryYesfree-text keywords, e.g. ``"penal code"`` or ``"electronic crimes"``.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsNo
queryYes
dataset_noteNoCorpus-based connector, not a live government API: Pakistan's official portal (pakistancode.gov.pk) exposes no machine interface, so statutes are served from the AyeshaJadoon/Pakistan_Laws_Dataset mirror on HuggingFace (967 federal laws, full text, ODC-BY 1.0), a static snapshot last updated 2025-01-30. Amendments after that date are NOT reflected - verify currency against pakistancode.gov.pk before relying on a provision.
total_matchesYes
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, etc. Description adds behavioral context: searches 967 statutes, uses title-weighted ranking. This goes beyond annotations by revealing ranking logic, though doesn't detail output format or pagination.

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?

Single sentence (10 words) with no waste. Front-loaded with key purpose: 'Keyword search over Pakistan's 967 federal statutes'.

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?

With output schema present, description needn't detail return values. Mentions statute count and ranking method – adequate for search tool, but could add brief guidance on query syntax or ranking implications.

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?

Schema covers 100% of parameters with descriptions. Tool description reinforces query as free-text keywords and adds ranking context, exceeding baseline value.

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?

Description states 'Keyword search over Pakistan's 967 federal statutes (title-weighted ranking)' – specific verb (keyword search), resource (Pakistan's federal statutes), and distinguishing feature (title-weighted ranking). Clearly differentiates from siblings like pk_case_search and pk_get_law.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use instructions. Sibling tool names provide contextual hints (e.g., pk_get_law for direct access, pk_case_search for cases), but description does not directly guide selection.

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/matematicsolutions/pk-eli-mcp'

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