Skip to main content
Glama
kannkyo

e-gov-law-mcp

by kannkyo

添付ファイル取得

get_attachment

Retrieves attachments (images, PDF, ZIP) for a given law revision ID via e-Gov API, saves them locally, and returns the file path. Use optional src to target a specific attachment.

Instructions

法令改正IDを指定して法令本文の添付ファイル(画像・PDF・Zipなど)を取得し、一時ファイルに保存してそのパスを返す(e-Gov法令API v2 GET /attachment/{law_revision_id})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
srcNo添付ファイルの指定(本文中の参照名)
law_revision_idYes法令改正ID
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses a key side effect: saving the file to a temporary directory and returning its path. It also mentions the HTTP GET endpoint, implying a read-only operation. However, it omits details like authentication requirements, file size limits, or cleanup behavior, preventing a perfect score.

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, well-structured sentence that front-loads the core function, mentions the side effect (temp file + path), and includes the API endpoint in parentheses. No wasted words or redundancy.

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?

Without an output schema, the description explains the return value (path) and file types, which is essential. It also indicates the API. However, it does not explicitly clarify how src selects among multiple attachments, and given the tool's simplicity, this is a minor gap. Overall, the context is sufficiently complete.

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?

Schema description coverage is 100%, with both parameters documented in the schema. The description merely restates that law_revision_id is required and does not mention the src parameter at all, adding no significant meaning beyond the schema. Baseline of 3 applies because the schema is sufficient.

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?

The description clearly states that the tool retrieves attachment files (images, PDF, Zip) for a specified law_revision_id, saves them to a temporary file, and returns the path. It also names the exact e-Gov API endpoint, distinguishing it from siblings like download_law_file by focusing on attachments for a specific revision.

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?

The description implies usage when an attachment for a given law revision is needed, but it does not explicitly explain when to use this tool instead of alternatives such as download_law_file or get_law_data, nor does it provide any exclusions. This is a clear implied usage but lacks explicit differentiation.

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/kannkyo/e-gov-law-mcp'

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