Skip to main content
Glama

get_law_revision

Retrieve revision history for Japanese laws by providing a law number to track amendments and changes over time.

Instructions

法令の改正履歴を取得します。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lawNumYes法令番号(例: 平成十七年法律第百十七号)

Implementation Reference

  • The main handler function for the 'get_law_revision' tool. It takes a lawNum argument, constructs the e-Gov API URL for law revisions, fetches the data, and returns it formatted as MCP content.
    async getLawRevision(args) {
      const { lawNum } = args;
      
      const url = `${EGOV_API_BASE}/lawrevisions/${encodeURIComponent(lawNum)}`;
      
      try {
        const response = await fetch(url);
        if (!response.ok) {
          throw new Error(`API request failed: ${response.status}`);
        }
        
        const data = await response.text();
        
        return {
          content: [
            {
              type: 'text',
              text: `改正履歴(法令番号: ${lawNum}):\n\n${data}`,
            },
          ],
        };
      } catch (error) {
        throw new Error(`改正履歴の取得に失敗しました: ${error.message}`);
      }
    }
  • Input schema for the 'get_law_revision' tool, defining the required 'lawNum' parameter as a string.
    inputSchema: {
      type: 'object',
      properties: {
        lawNum: {
          type: 'string',
          description: '法令番号(例: 平成十七年法律第百十七号)',
        },
      },
      required: ['lawNum'],
    },
  • index.js:85-98 (registration)
    Tool registration in the ListToolsRequestHandler response, providing name, description, and schema for 'get_law_revision'.
    {
      name: 'get_law_revision',
      description: '法令の改正履歴を取得します。',
      inputSchema: {
        type: 'object',
        properties: {
          lawNum: {
            type: 'string',
            description: '法令番号(例: 平成十七年法律第百十七号)',
          },
        },
        required: ['lawNum'],
      },
    },
  • index.js:112-113 (registration)
    Registration in the CallToolRequestHandler switch statement, routing calls to 'get_law_revision' to the getLawRevision method.
    case 'get_law_revision':
      return await this.getLawRevision(args);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It only states what the tool does ('取得します') but doesn't describe any behavioral traits: whether it's read-only or mutative, what permissions are needed, rate limits, pagination, error conditions, or response format. For a tool with zero annotation coverage, this is insufficient.

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?

The description is a single, efficient sentence that states the core purpose without any wasted words. It's appropriately sized for a simple retrieval tool and front-loads the essential information. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no annotations and no output schema, the description is incomplete. It doesn't explain what the revision history response looks like, what format it returns, or any behavioral constraints. For a tool that presumably returns structured historical data, more context about the output would be helpful to the agent.

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

Parameters3/5

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

The description doesn't mention parameters at all. However, the input schema has 100% description coverage, with the single parameter 'lawNum' clearly documented with an example. Since schema coverage is high, the baseline score of 3 is appropriate - the description adds no parameter information beyond what the schema already provides.

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 '法令の改正履歴を取得します' clearly states the tool's purpose: retrieving revision history of laws. It uses a specific verb ('取得します' - retrieve) and resource ('法令の改正履歴' - law revision history). However, it doesn't explicitly distinguish this tool from its siblings (get_law_data, search_law), which likely retrieve different aspects of law information.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus its siblings (get_law_data, search_law). There's no mention of alternative tools, prerequisites, or specific contexts where this tool is preferred over others. The agent must infer usage from the tool name alone.

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/groundcobra009/hourei-mcp-server'

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