Skip to main content
Glama

get_legislation_content

Retrieves Australian workplace legislation text, summaries, or metadata by canonical ID, downloading and caching it when unavailable; optionally filters to a specific section.

Instructions

Retrieve legislation content from cache or download if needed.

Args: canonical_id: Canonical legislation ID (e.g., "/au-victoria/ohs/2004") mode: Content mode - "text" (full statutory text), "summary" (plain language), or "metadata" (dates, amendments, related provisions) section: Optional section filter (e.g., "s21")

Returns: Legislation content as text or JSON error

Example: >>> get_legislation_content("/au-victoria/ohs/2004", mode="text") "# Occupational Health and Safety Act 2004\n\n..."

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": {
      "canonical_id": "<canonical_id>"
    },
    "name": "get_legislation_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNotext
sectionNo
canonical_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/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 disclose one important trait: content is served from cache or downloaded on demand, which affects latency and availability. It also notes returns may be 'text or JSON error', which cues error handling. It does not cover permissions, rate limits, or whether full statutory text can be truncated.

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 docstring is front-loaded with a one-line summary, then Args/Returns/Example sections that each add concrete value. The usage example demonstrates a real call and expected output shape, so nothing is padding.

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?

An output schema exists, so the description need not detail return values, and it correctly keeps the Returns note brief. For a 3-parameter read tool with no annotations, the description covers parameters, caching behavior, and error signaling adequately; only edge-case handling (invalid canonical_id, missing section) is unaddressed.

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?

Schema description coverage is 0%, so the description must compensate, and it does: every parameter is documented, with canonical_id given a concrete ID format example and each mode enum value explained in plain language beyond the bare enum strings. The section parameter gets an example ('s21') but no statement of behavior when the section is absent or invalid, keeping it below a 5.

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 and resource ('Retrieve legislation content') and adds scope detail about cache vs. download. It does not explicitly differentiate itself from siblings such as resolve_legislation, but the resource and operation are unambiguous on their own.

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 through the mode breakdown (full text vs. plain-language summary vs. metadata), which tells the agent which variant to pick. There is no explicit when-to-use/when-not-to-use guidance and no mention of when resolve_legislation should be called first to obtain canonical_id.

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