Skip to main content
Glama

Get Law

get_law
Read-onlyIdempotent

Fetch a Japanese law/ordinance by its e-Gov law id (from search_laws), e.g. "415AC0000000057". Returns the title, law number, promulgation date, and the law's full text, PAGED, use offset/limit to walk a long law; has_more/next_offset say whether another page follows. For a single article (incl. branch articles like 第二十七条の2), use japan_law_get_article instead, it is far cheaper than paging a whole law to find one provision. Pass as_of (YYYY-MM-DD) to fetch the version of the law in force on that date. Source: e-Gov 法令検索.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "law_id": "415AC0000000057"
    },
    "name": "get_law"
  }
}

Input Schema

NameRequiredDescriptionDefault
as_ofNoPoint-in-time date (YYYY-MM-DD). Returns the revision in force on that date instead of the current one.
limitNoMax characters to return in this page (default 30000, max 60000).
law_idYese-Gov law id, e.g. "415AC0000000057".
offsetNoCharacter offset into the full text to start this page at (default 0).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "law_id": "415AC0000000057"
      -  }
      -]New value: +[
      +  {
      +    "law_id": "415AC0000000057"
      +  },
      +  {
      +    "law_id": "415AC0000000057",
      +    "offset": 30000
      +  }
      +]
    • addedInput schema / properties / as_of
      Added value: +{
      +  "description": "Point-in-time date (YYYY-MM-DD). Returns the revision in force on that date instead of the current one.",
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Max characters to return in this page (default 30000, max 60000).",
      +  "type": "number"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Character offset into the full text to start this page at (default 0).",
      +  "type": "number"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "law_id": "415AC0000000057"
      +  }
      +]
  3. First observed

TDQS

A4.7/5.0
Behavior4/5

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 behavior beyond that: pagination via offset/limit, the has_more/next_offset continuation signal, the practical cost tradeoff of paging a whole law, and the data source (e-Gov). It stops short of noting auth or rate-limit behavior, so a 4 rather than a 5.

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?

Front-loaded with the core action and an example id, then paging mechanics, then the sibling alternative and the point-in-time option. Dense but every sentence carries distinct information; no restatement of the name or title.

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?

There is no output schema, but the description compensates by naming the returned fields (title, law number, promulgation date, full text) and the pagination fields (has_more, next_offset). Combined with the sibling routing and as_of semantics, an agent has everything needed to call it correctly.

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 100%, so the schema already documents all four params and the baseline is 3. The description adds value on top: it tells the agent where law_id comes from (search_laws), that offset/limit should be used together to walk a long law, and what as_of semantically selects (version in force on that date).

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 (fetch a Japanese law/ordinance by e-Gov law id) and grounds it with a concrete example id, plus the returned fields. It also explicitly distinguishes itself from the sibling japan_law_get_article, so an agent can route 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.

Usage Guidelines5/5

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

Gives explicit when-to-use and when-not-to-use: use offset/limit to walk a long law, but use japan_law_get_article for a single article (including branch articles like 第二十七条の2) because it is cheaper. It also states when to pass as_of for point-in-time versions, leaving nothing to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.