Skip to main content
Glama

get_law_revision

Retrieve revision history for Japanese laws to track legislative changes and amendments over time using the e-Gov Law API.

Instructions

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

Input Schema

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

Implementation Reference

  • The main handler function that implements the 'get_law_revision' tool by fetching the amendment history for a specified law number from the e-Gov API and returning it as text 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}`); } }
  • index.js:85-98 (registration)
    The tool registration entry that defines the name, description, and input schema for 'get_law_revision' in the list of available tools.
    { name: 'get_law_revision', description: '法令の改正履歴を取得します。', inputSchema: { type: 'object', properties: { lawNum: { type: 'string', description: '法令番号(例: 平成十七年法律第百十七号)', }, }, required: ['lawNum'], }, },
  • The input schema defining the required 'lawNum' parameter as a string for the 'get_law_revision' tool.
    inputSchema: { type: 'object', properties: { lawNum: { type: 'string', description: '法令番号(例: 平成十七年法律第百十七号)', }, }, required: ['lawNum'], },
  • The dispatcher case in the CallToolRequestHandler that routes calls to 'get_law_revision' to the getLawRevision method.
    case 'get_law_revision': return await this.getLawRevision(args);

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