Skip to main content
Glama

lawyer-mcp

MCP (Model Context Protocol) server for Legalize.dev: AI tools to query and understand legal frameworks across countries.

Goal: help an AI quickly answer questions about a country’s legal framework by querying Legalize.dev’s structured legislation API.

Status

Work in progress.

Related MCP server: Vaquill-AI/vaquill-mcp

Data source

Auth

Legalize.dev uses a bearer token in the Authorization header (see components.securitySchemes.ApiKeyAuth in the OpenAPI spec).

This server expects:

  • LEGALIZE_API_KEY env var (either the raw leg_... token or the full Bearer leg_... value)

TLS / certificates (Codex on Windows)

If you hit errors like certificate verify failed: certificate signature failure, your Python/Codex environment may be missing the right CA bundle.

Options:

  • Prefer installing/updating CA certificates in your environment (recommended).

  • Set LEGALIZE_SSL_CERT_FILE=/path/to/ca-bundle.pem to point to a CA bundle.

  • If certifi is installed, lawyer-mcp will automatically use it.

  • As a last resort (NOT recommended): LEGALIZE_SSL_INSECURE=1 disables certificate verification.

Tools (MCP)

Tools are derived from https://legalize.dev/openapi.json.

Toolset selection

By default we expose a full read-only toolset. If you want the smallest useful surface area (to reduce model confusion), set:

  • LEGALIZE_TOOLSET=minimal

Minimal toolset includes:

  • legalize_openapi_summary — public summary of the OpenAPI spec (no API key)

  • legalize_countries — list supported countries

  • legalize_jurisdictions — list jurisdictions within a country

  • legalize_laws — search/list laws within a country (single page)

  • legalize_laws_all — same, but auto-paginates (best-effort flattening)

  • legalize_law_meta — lightweight law metadata

  • legalize_law_get — full law payload

  • legalize_reforms — list reforms/diffs for a law

Full toolset additionally includes:

  • legalize_commits — list git commits for a law

  • legalize_law_at_commit — fetch law content at a commit SHA

  • legalize_rangos — list legal hierarchy/ranks (rangos)

  • legalize_stats — summary statistics per country (optional jurisdiction)

  • legalize_account — current API key account/usage/limits (does not count against quota)

Dangerous tool (opt-in)

  • legalize_rotate_key — rotate API key (invalidates current key). Disabled by default; enable with LEGALIZE_ENABLE_DANGEROUS_TOOLS=1.

Install

For now this is a single-file Python module (no external dependencies).

git clone https://github.com/pugafran/lawyer-mcp.git
cd lawyer-mcp

# required
export LEGALIZE_API_KEY="leg_..."   # or "Bearer leg_..."

python3 -m lawyer_mcp

Option B: pipx / pip (if you have pip available)

pipx install git+https://github.com/pugafran/lawyer-mcp.git
# or: python -m pip install git+https://github.com/pugafran/lawyer-mcp.git

export LEGALIZE_API_KEY="leg_..."
lawyer-mcp

Configure in Claude Desktop (MCP)

  1. Install the server (see Install above).

  2. Open Claude Desktop → SettingsDeveloperEdit MCP config.

  3. Add a server entry like this:

{
  "mcpServers": {
    "lawyer": {
      "command": "python3",
      "args": ["-m", "lawyer_mcp"],
      "env": {
        "LEGALIZE_API_KEY": "leg_...",
        "LEGALIZE_TOOLSET": "minimal"
      }
    }
  }
}

Restart Claude Desktop. You should then see the legalize_* tools available.

Configure in OpenAI Codex / IDEs

Codex support depends on the client you are using (Codex CLI vs an IDE with MCP support).

If your Codex/IDE supports MCP servers via a JSON config, use the same command/env as above:

  • command: python3

  • args: -m lawyer_mcp

  • env: LEGALIZE_API_KEY=...

If you tell me which “Codex” you mean (Codex CLI, VS Code extension, Cursor, etc.), I’ll add an exact, copy/paste config snippet for that client.

Run

# required
export LEGALIZE_API_KEY="leg_..."   # or "Bearer leg_..."

# optional (useful for tests/self-hosted mirrors)
# export LEGALIZE_BASE_URL="https://legalize.dev"
# export LEGALIZE_HTTP_RETRIES=2
# export LEGALIZE_HTTP_TIMEOUT=30

# optional (DANGEROUS): exposes `legalize_rotate_key`
# export LEGALIZE_ENABLE_DANGEROUS_TOOLS=1

python3 -m lawyer_mcp

Available Tools

13 tools
legalize_accountA

Get account usage/limits info for the current API key (does not count against quota).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations available, the description carries the transparency burden. It discloses a key behavioral trait: 'does not count against quota', which is useful for the agent to know. It does not mention response format or side effects, but given the read-only nature and simplicity, this is sufficient.

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, front-loaded sentence that conveys both the action and an important caveat. There is no redundant information or unnecessary detail.

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?

For a zero-parameter, read-only tool with no output schema, the description is complete. It states what the tool does, adds the quota exemption context, and contains no ambiguities. The lack of an output schema means no need to document return values.

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?

The tool has zero parameters, so the empty schema is self-explanatory. The baseline for 0 parameters is 4, and the description adds no confusion. No additional parameter semantics are needed.

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 the tool's purpose: 'Get account usage/limits info for the current API key'. It specifies the resource (account usage/limits) and scope (current API key), distinguishing it from sibling tools focused on legal content like laws and countries.

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?

Usage is implied but not explicitly contrasted with alternatives. The phrase 'for the current API key' indicates it is for checking the caller's own account limits, but no examples or when-not-to-use guidance are provided. Since this is a simple, zero-parameter tool, this level of guidance is acceptable.

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

legalize_commitsB

List git commits for a law repository (lightweight history).

ParametersJSON Schema
NameRequiredDescriptionDefault
law_idYes
countryYes

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It says 'list git commits' which indicates a read-only operation, but it doesn't describe what is returned (e.g., commit hashes, messages, dates), any pagination, or ordering. The term 'lightweight history' gives a hint but not enough detail for an agent to predict behavior.

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 concise sentence with no filler, tautology, or redundant phrasing. It conveys the core purpose efficiently and earns its place without any waste.

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 two required parameters, no annotations, and no output schema, this description is underspecified. It fails to explain the return structure, parameter semantics, or how it compares to sibling tools like legalize_law_at_commit. The minimal detail leaves significant gaps for an agent deciding when and how to invoke it.

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

Parameters1/5

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

Schema description coverage is 0%, and the description says nothing about the two required parameters (country and law_id). It does not explain how these parameters affect the commit list, what values they accept, or why both are required. The description completely fails to compensate for the schema's lack of context.

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 the action (list git commits) and the resource (a law repository), and the qualifier 'lightweight history' distinguishes this as a summary-level view from more detailed sibling tools like legalize_law_at_commit. The verb and object are specific and unambiguous.

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 phrase 'lightweight history' implies when this tool might be used (for a quick commit list), but it does not explicitly state when to use it versus alternatives or mention any exclusions. There is no direct comparison with sibling tools, so the guidance remains implied rather than explicit.

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

legalize_countriesB

List supported countries.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are present, so the description must carry the burden of disclosing behavioral traits. It only says 'List supported countries', which implies a read-only operation but does not explicitly state that it is safe, describe the return format, or mention error behavior. The description adds no information beyond what the tool name suggests.

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 sentence with no redundant or extraneous information. It is front-loaded with the action ('List') and the object ('supported countries'), making it concise and efficient.

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?

The tool has no output schema, so the description should explain what the response contains. It only says 'List supported countries' without specifying the format of the list (e.g., strings, objects) or providing any additional context about the data. Given the tool's simplicity, this is a notable gap.

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?

The tool has zero parameters, and the input schema confirms this with no properties. The description does not need to explain parameter semantics because there are none, and the baseline for 0 params is 4.

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 uses a specific verb ('List') and a specific resource ('supported countries'), clearly stating what the tool does. However, it does not explicitly differentiate from sibling tools like 'legalize_jurisdictions', which could also list legal entities, so it lacks sibling distinction.

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 gives no explicit guidance on when to use this tool versus alternatives. The verb 'List' implies a simple query operation, but no context about use cases, prerequisites, or exclusions is provided, so usage guidance is only implied rather than stated.

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

legalize_jurisdictionsB

List jurisdictions within a country.

ParametersJSON Schema
NameRequiredDescriptionDefault
countryYes

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the action and scope, but does not reveal whether the operation is read-only, what the response format is, or potential error conditions. This is minimal guidance for an agent.

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, concise sentence with no redundant words. It is front-loaded and efficient, earning its place by stating the essential purpose without wasted detail.

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

Completeness3/5

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

Given the simplicity (1 parameter, no output schema, no annotations), the description is minimally viable for a basic list operation. However, it lacks return value structure, error handling, or usage nuances. It is adequate but has clear gaps in completeness.

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

Parameters2/5

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

The single parameter 'country' is implicitly referenced in the phrase 'within a country,' but no additional meaning is provided. Schema coverage is 0%, and the description does not explain the expected format (e.g., name, code) or constraints, leaving the parameter underspecified.

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 'List' and a distinct resource 'jurisdictions within a country,' clearly differentiating it from sibling tools like legalize_countries and legalize_laws. The scope is precise: 'within a country' separates it from global country listing.

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 usage is implied: use this tool to list jurisdictions for a given country. However, no explicit when-to-use or alternatives are mentioned. It does not name sibling tools or exclude any use cases, leaving some ambiguity about when it should be preferred over similar tools.

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

legalize_law_at_commitA

Fetch the law content as it was at a specific git commit SHA.

ParametersJSON Schema
NameRequiredDescriptionDefault
shaYes
law_idYes
countryYes

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations provided, the description must carry the transparency burden. It clearly indicates a read operation ('Fetch') and specifies the temporal scope (at a specific commit SHA), which implies non-mutating behavior. However, it does not disclose what the response contains, error conditions, or whether the SHA must come from legalize_commits, leaving gaps in behavioral transparency.

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 sentence that is direct and front-loaded. Every word contributes to understanding the tool's core function, with no unnecessary detail or repetition.

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 three required parameters, no annotations, and no output schema, the description is too sparse. It does not explain how the parameters relate, what the response format is, or how this tool relates to siblings like legalize_law_get. The minimal information may be insufficient for an agent to invoke the tool correctly without additional context.

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

Parameters2/5

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

The schema has zero description coverage, and the description only partially explains the parameters. It references 'git commit SHA' which maps to the 'sha' parameter, but does not explain 'country' or 'law_id'. Since the description must compensate for low schema coverage, it does so only for one of three parameters, earning a low score.

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 as 'law content at a specific git commit SHA', which clearly distinguishes it from sibling tools like legalize_law_get (current law) and legalize_commits (commit history). It unambiguously states what the tool does.

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 you need law content at a particular commit. However, it does not explicitly mention alternatives or when not to use this tool. The context is clear enough to infer the use case, but it lacks explicit guidance such as 'use legalize_law_get for current law'.

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

legalize_law_getC

Fetch a full law payload.

ParametersJSON Schema
NameRequiredDescriptionDefault
law_idYes
countryYes

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states 'Fetch' (implying read-only) but does not disclose authentication needs, response size, potential errors, or what 'full' includes. This is a significant gap for a tool that may return complex law payloads.

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 sentence with no wasted words. It is exceptionally concise and front-loaded, containing only the essential verb and object.

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?

The tool has no output schema and lacks annotations, yet the description only says 'Fetch a full law payload.' It does not clarify what the payload includes, how to interpret the response, or how this differs from related tools like legalize_law_meta. Given the complexity of law data and the sibling toolset, this description is incomplete.

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

Parameters2/5

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

Schema description coverage is 0% for two required parameters (country, law_id), and the description does not explain their format, allowed values, or how they affect the result. The parameter names are somewhat self-explanatory but lack any additional meaning, so the description fails to compensate for low coverage.

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 verb 'Fetch' and resource 'full law payload' clearly indicate this tool retrieves complete law data, distinguishing it from siblings like legalize_law_meta (metadata) and legalize_laws (list). The 'full' qualifier helps differentiate from partial or metadata-focused tools, though it does not explicitly name alternatives.

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 alternatives such as legalize_law_meta or legalize_law_at_commit. There is no mention of prerequisites, typical use cases, or filtering; the usage context is only implied by 'full law payload'.

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

legalize_law_metaC

Get metadata for a law (lightweight endpoint).

ParametersJSON Schema
NameRequiredDescriptionDefault
law_idYes
countryYes

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries full responsibility. 'Get' implies a read-only operation, and 'lightweight endpoint' hints at performance, but there is no disclosure of what metadata actually includes, error behavior, or access requirements. This is minimal and leaves significant gaps.

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 sentence with no fluff. It front-loads the key verb and resource, and 'lightweight endpoint' adds useful context without redundancy. 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?

Despite having only 2 parameters and no output schema, the description is too thin. It does not explain what 'metadata' includes, how the country/law_id parameters interact, or what the expected return shape is. For a tool with no annotations or output schema, more contextual detail is needed.

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

Parameters1/5

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

Schema description coverage is 0% and the description mentions neither 'law_id' nor 'country'. With no parameter explanation in either the schema or the description, the agent gets no additional meaning beyond the raw type definitions.

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 gets metadata for a law using 'Get metadata for a law', which is a specific verb+resource. It is distinguishable from sibling tools like legalize_law_get (which likely retrieves full law details) by the 'lightweight' qualifier and the 'meta' suffix, though it does not explicitly name an alternative.

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?

No guidance is provided on when to use this tool versus legalize_law_get, legalize_laws, or other siblings. The description simply states what it does without any contextual hints or exclusions.

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

legalize_lawsA

Search/list laws within a country (single page).

ParametersJSON Schema
NameRequiredDescriptionDefault
qNo
pageNo
yearNo
statusNo
countryYes
law_typeNo
per_pageNo
jurisdictionNo

TDQS

A3.5/5.0
Behavior3/5

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

The description discloses that the tool returns a single page of results, which is a useful behavioral trait. However, with no annotations provided, it lacks details about return format, filtering behavior, or any side effects, leaving much of the behavior undisclosed.

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, taut sentence with no filler, front-loading the core purpose. Every word earns its place, making it highly scannable and concise.

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 8 parameters, no output schema, and no annotations, the description is far too minimal. It fails to explain the required `country` parameter, optional filters, pagination details, or the expected return structure, making it inadequate for reliable agent invocation.

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

Parameters2/5

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

Schema description coverage is 0%, and the description only implicitly references 'country' and 'single page' (pagination). It does not explain the other six parameters (`q`, `year`, `status`, `law_type`, `jurisdiction`, `per_page`), so most of the input schema is left semantically undefined.

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 ('Search/list'), a clear resource ('laws'), and scoping constraints ('within a country', 'single page'). This distinguishes it from sibling `legalize_laws_all`, which likely covers all laws or multiple pages.

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 for country-scoped law searches with pagination, but it does not explicitly name alternatives like `legalize_laws_all` or `legalize_law_get`, nor does it state when not to use this tool. The 'single page' hint suggests a limitation relative to other tools, but this is only implicit.

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

legalize_laws_allB

Search/list laws within a country, automatically paging until exhaustion or max_pages. Returns raw page payloads plus a best-effort flattened list when the API returns an array or a {items|data|results} container.

ParametersJSON Schema
NameRequiredDescriptionDefault
qNo
yearNo
statusNo
countryYes
law_typeNo
per_pageNo
max_pagesNo
start_pageNo
jurisdictionNo

TDQS

B3.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses significant behaviors: paging automatically, stopping at max_pages, returning raw payloads, and providing a flattened list conditionally. It omits error handling, rate limits, and permission requirements, but for a search tool this is reasonably transparent.

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 two sentences, front-loads the primary purpose, and every phrase carries meaning. No filler or repetition, making it highly efficient and well-structured.

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?

While the description covers paging and output shape, it does not explain defaults, filter interactions, or the exact meaning of 'best-effort', and there is no output schema to fill gaps. With 9 parameters and no annotations, the description is insufficient for complete operational context.

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

Parameters2/5

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

Schema description coverage is 0%, and the description only indirectly references 'country' and 'max_pages'. It does not explain q, year, status, law_type, per_page, start_page, or jurisdiction, leaving the agent without crucial semantics for a tool with 9 parameters.

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 states a clear action ('Search/list laws within a country') and a distinct behavior (automatic paging until exhaustion or max_pages). It differentiates from the sibling legalize_laws through the '_all' name and the explicit paging mention, though it does not directly name the alternative.

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 this tool is for exhaustive law listing/searching, but it does not provide explicit guidance on when to use it versus legalize_laws or other siblings. No exclusions or alternative conditions are stated, leaving usage context only implied.

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

legalize_openapi_summaryA

Public: summarize the Legalize.dev OpenAPI spec (endpoints, versions). No API key required.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the disclosure burden. It states that access is public and no API key is required, and 'summarize' implies a non-mutating read. It does not mention rate limits or return format, but for a zero-parameter summary tool this is adequate.

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 entire description is one sentence, front-loading 'Public' and 'summarize', and it conveys all key information without wasted words.

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 no parameters, no output schema, and a simple summary operation, the description provides sufficient context: what it does, what it covers, and access requirements. It is complete for this level of tool complexity.

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?

The tool has zero parameters, so the description does not need to elaborate on parameter usage. A baseline of 4 is appropriate since schema coverage is trivially 100%.

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 states a specific verb ('summarize') and resource ('Legalize.dev OpenAPI spec') with scope details ('endpoints, versions'). This clearly distinguishes it from sibling tools that access specific legal data like laws or countries.

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?

The context is clear: this tool provides an overview of the API spec. However, it does not explicitly mention when to prefer this over sibling tools or state exclusions, though the distinction is implicit.

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

legalize_rangosB

List the legal hierarchy/ranks (rangos) for a country.

ParametersJSON Schema
NameRequiredDescriptionDefault
countryYes

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It only states a basic 'list' operation without disclosing behavior such as required permissions, error handling, return format, or any edge cases. The lack of detail makes the tool's behavior opaque beyond the literal action.

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, front-loaded sentence with no filler. Every word contributes to defining the tool's purpose.

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

Completeness3/5

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

For a simple tool with one parameter and no output schema, the description gives the essential idea but lacks critical context such as what 'rangos' means in practice, how the output is structured, or what happens if the country is invalid. It is minimally viable but leaves noticeable gaps.

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

Parameters2/5

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

The schema has zero description coverage, and the tool description only reuses the parameter name ('country') without adding meaning. It does not clarify whether country expects a name, ISO code, or other valid format, leaving the agent to guess.

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 the tool's function with a specific verb ('List') and resource ('legal hierarchy/ranks (rangos)'), and scopes it by country. It distinguishes itself from sibling tools like legalize_laws or legalize_jurisdictions by focusing on 'rangos' specifically.

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 alternatives. It does not mention exclusions, prerequisites, or any context for selecting this tool among the sibling legalize_* tools.

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

legalize_reformsB

List reforms (diffs) for a law, newest-first; useful for change tracking.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
law_idYes
offsetNo
countryYes

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the burden. It discloses the scope ('for a law') and ordering ('newest-first'), which is useful behavioral context. However, it does not mention pagination behavior, response format, or any side effects, though a list operation is implicitly read-only.

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 sentence, front-loaded with the verb 'List', and contains no redundant or filler content. Every word adds value.

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?

For a tool with 4 parameters, a required country, and no output schema or annotations, the description is too sparse. It leaves out that country is required and does not clarify the meaning of reforms/diffs or pagination, leaving an agent with insufficient context to reliably invoke the tool.

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

Parameters2/5

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

Schema coverage is 0% and the description only vaguely maps to parameters via 'for a law', which implies law_id. It does not explain the required country parameter or the limit/offset pagination parameters. This is minimal compensation for the complete lack of schema documentation.

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 states 'List reforms (diffs) for a law, newest-first', giving a specific verb and resource with ordering. It is unambiguous about the core action, though it does not explicitly distinguish itself from siblings like legalize_commits or legalize_law_at_commit.

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 says it is 'useful for change tracking', but provides no guidance on when to use this tool versus alternatives such as legalize_commits or legalize_law_at_commit. No exclusions or alternative suggestions are given.

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

legalize_statsA

Get summary statistics for a country (optionally filtered by jurisdiction).

ParametersJSON Schema
NameRequiredDescriptionDefault
countryYes
jurisdictionNo

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of disclosing behavior. The description only says 'Get summary statistics,' which implies a read-only operation but gives no details about the output format, the exact statistics included, or any edge cases. This is minimal disclosure for a tool with no annotation support.

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, front-loaded sentence with no redundant words. It earns a 5 for efficiency.

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

Completeness3/5

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

The tool has a simple interface (two parameters, no output schema), so a brief description could be sufficient. However, with many sibling tools and no annotations, the description does not fully elaborate on what 'summary statistics' include or how this relates to other tools, leaving some ambiguity.

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

Parameters2/5

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

The schema has 0% description coverage, and the description only adds 'optionally filtered by jurisdiction,' which reiterates the schema's optionality. It does not explain the expected format of 'country' or 'jurisdiction' (e.g., ISO codes, names) or any constraints, leaving the agent to infer from property names.

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 the tool's function with a specific verb ('Get') and resource ('summary statistics'), and specifies the scope ('for a country') with an optional filter ('jurisdiction'). This distinguishes it from sibling tools like legalize_laws or legalize_reforms, which deal with legal content rather than statistics.

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?

The description provides clear context for when to use the tool: whenever summary statistics for a country are needed, with the option to narrow by jurisdiction. However, it does not explicitly mention alternative tools or conditions when not to use it, so it stops short of a full 5.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 13 tool updatesv0.1.0
    • First observedlegalize_account
    • First observedlegalize_commits
    • First observedlegalize_countries
    • First observedlegalize_jurisdictions
    • First observedlegalize_law_at_commit
    • First observedlegalize_law_get
    • First observedlegalize_law_meta
    • First observedlegalize_laws
    • First observedlegalize_laws_all
    • First observedlegalize_openapi_summary
    • First observedlegalize_rangos
    • First observedlegalize_reforms
    • First observedlegalize_stats

TDQS

A3.7/5.0

Scored across 13 tools

Disambiguation5/5

Each tool targets a distinct resource or action: metadata vs full law, paginated vs single-page search, diffs vs git history. The pagination variant (laws_all) is clearly differentiated from laws, and the hierarchy/rank tool is unique. No two tools appear to do the same thing.

Naming Consistency5/5

All 13 tools share the consistent `legalize_` prefix and use snake_case. The suffix pattern is predictable: simple resource names (countries, laws) or resource_qualifier (law_get, law_at_commit). Even the paginated variant follows a clear `_all` suffix, making the naming scheme uniform and easy to navigate.

Tool Count5/5

13 tools is well within the ideal 3-15 range for a domain-specific API client. Each tool addresses a distinct need, from listing countries to retrieving historical law content, with no redundancy or bloat.

Completeness5/5

The tool set provides comprehensive read-only coverage of the Legalize.dev API: discovery (countries, jurisdictions, rangos), search (laws, laws_all), retrieval (law_get, law_meta), change tracking (reforms, commits, law_at_commit), and account management (account). No obvious gaps exist for the stated purpose of legal information retrieval.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers