Skip to main content
Glama
japan-law-util-mcp-server

japan-law-util-mcp-server

by gotoai

search_law_text

Read-only

Search the text of every Japanese law for a keyword and get the laws it appears in with the matching sentences, each hit marked with 【】. The keyword may be a search expression: space for AND, | for OR, ! to exclude, () to group, or * and ?

Instructions

Search the text of every Japanese law for a keyword and get the laws it appears in with the matching sentences, each hit marked with 【】. The keyword may be a search expression: space for AND, | for OR, ! to exclude, () to group, or * and ? as wildcards (wildcards cannot be combined with the operators). scan_limit counts hit positions scanned, not laws; lower hits_per_law and raise scan_limit to see more laws.

Input Schema

NameRequiredDescriptionDefault
asofNoYYYY-MM-DD; search the text in force then.
offsetNo
keywordYesKeyword or search expression.
categoryNo分野, any of.
law_typeNoLaw types, any of.
text_sizeNoCharacters shown around each hit.
scan_limitNo
hits_per_lawNoMatching sentences shown per law.
promulgation_date_toNoYYYY-MM-DD.
promulgation_date_fromNoYYYY-MM-DD.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so safety is covered. The description adds genuinely non-obvious behavior: scan_limit counts hit positions scanned rather than laws, wildcards cannot be combined with operators, and the hits_per_law/scan_limit tradeoff. It stops short of describing result truncation signaling or pagination behavior via offset.

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 sentences with no filler; the core action and hit markup are front-loaded, then query syntax, then the scan_limit caveat that would otherwise cause the most misuse. Nothing is redundant with the schema prose.

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?

An output schema exists, so return format needn't be spelled out, and the description still sketches it helpfully. For a 10-parameter full-text search on open-world data, the main pitfalls (query grammar, scan_limit counting, paging via offset) are mostly addressed, though offset/pagination behavior is left unexplained.

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 coverage is 80%, so most parameters are self-documenting, but the description adds real meaning where the schema is silent: the full expression grammar for 'keyword' and the precise semantics of 'scan_limit' with its relationship to 'hits_per_law'. It says nothing extra about asof, category, law_type, offset, or promulgation date filters, relying entirely on the schema there.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ('search the text of every Japanese law') plus the return shape (laws containing the keyword with matching sentences, hits marked with 【】). It implicitly distinguishes itself from read_law_text and search_laws by scoping to full-text keyword search, but it never names those siblings, so differentiation is left to inference.

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?

It covers how to construct the query (AND/OR/not/grouping/wildcards) and gives concrete tuning advice for scan_limit versus hits_per_law isolated from other concerns. However, there is no explicit guidance on when to reach for this tool instead of search_laws (metadata search) or read_law_text, so the agent must infer the division of labor.

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