Skip to main content
Glama

legalize_get_law

Read-onlyIdempotent

Retrieve a law's metadata and full text by country code and law ID, optionally at a specific historical version.

Instructions

Fetch a law's metadata and full text by id (optionally at a historical commit).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shaNooptional commit SHA for a historical version (from ``legalize_list_reforms``).
law_idYesthe filename stem (e.g. ``"BOE-A-1978-31229"``).
countryYesISO-3166 alpha-2 code (e.g. ``"es"``).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
shaNoGit commit SHA if a historical version was requested.
rankNoCountry-specific legal text type.
extraNoCountry-specific frontmatter fields.
titleNo
law_idYesOfficial identifier (the .md filename stem).
statusNoin_force | repealed | ...
contentYesFull law text (Markdown, frontmatter stripped).
countryYes
byte_sizeNo
github_urlYesRaw provenance URL on github.com/legalize-dev.
source_urlNoOfficial source URL (frontmatter `source`).
last_updatedNo
publication_dateNo
human_readable_citationNo
Behavior4/5

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

Annotations already provide safety profile (readOnly, idempotent, non-destructive). The description adds that it returns both metadata and full text, which is beyond what annotations cover. No contradictions.

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?

Single sentence, no wasted words, front-loaded with action and resource. Every part earns its place.

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?

Given the input schema has full descriptions and an output schema exists, the description is complete for the tool's purpose. It mentions the key optional feature (historical commit) and the fact it returns both metadata and full text.

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 coverage is 100%, so the schema already describes all parameters. The description reinforces the purpose but does not add new meaning beyond stating 'by id' and the optional historical commit, which is already clear from the schema.

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 uses a specific verb 'Fetch' and identifies the resource 'a law's metadata and full text' with a clear method 'by id (optionally at a historical commit)'. It distinguishes from siblings like legalize_get_meta by indicating it returns both metadata and full text, and from legalize_list_reforms by noting the optional commit SHA.

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

Usage Guidelines4/5

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

Explicitly states when to use: when you have the law ID and optionally want a historical version using the SHA from legalize_list_reforms. However, it does not explicitly state when not to use or provide alternatives beyond the implied sibling context.

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/matematicsolutions/legalize-mcp'

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