Skip to main content
Glama

get_legislation_toc

Retrieve a law's table of contents with parts, chapters, and article/section labels; filter by keyword to locate provisions in large codes.

Instructions

Table of contents of a law (parts, chapters, articles/sections) with provision labels.

Args: jurisdiction: code from list_jurisdictions, e.g. "nl", "gb". id: law id from search_legislation. nl: BWB-id ("BWBR0005289"). gb: type/year/number ("ukpga/2006/46"). keyword: optional; only list provisions whose number/title starts a word with (else contains) this text, case-insensitive. It does NOT search the body text. Strongly recommended for big codes.

Use the provision labels it shows with get_legislation_provision.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "jurisdiction": "<jurisdiction>",
      "id": "<id>"
    },
    "name": "get_legislation_toc"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
keywordNo
jurisdictionYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it discloses that keyword matches provision number/title by word-start else substring, is case-insensitive, and explicitly does NOT search body text. It also reveals the returned hierarchy. Not covered: output size, pagination, or truncation behavior on huge codes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the outcome sentence, then a compact Args block with one line per parameter. Every line adds information; the only friction is the slightly fragmentary closing sentence, which is still useful routing information.

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?

Parameters are fully documented, the return structure is described even though an output schema exists, and follow-up usage is indicated. Remaining gaps (no read-only/rate-limit statement in the absence of annotations, no note on TOC size for large codes) are minor for a read-only lookup tool.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate, and it does: jurisdiction codes are exemplified ('nl', 'gb'), id format is given per jurisdiction ('BWBR0005289', 'ukpga/2006/46'), and keyword semantics (prefix-vs-contains, case-insensitive, scope) are fully defined.

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?

States a specific resource and scope: 'Table of contents of a law (parts, chapters, articles/sections) with provision labels.' The closing line routes the agent to get_legislation_provision for the actual content, which distinguishes this structural/browse tool from its content-fetching siblings.

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?

Names the upstream sources explicitly ('code from list_jurisdictions', 'law id from search_legislation') and gives conditional advice ('Strongly recommended for big codes'), which is real when-to-use guidance. It doesn't spell out when to prefer this over get_legislation_text for small laws, so a small gap remains.

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