Skip to main content
Glama

Get Legal Document Markdown

get_legal_document_markdown

Retrieve full Markdown text of New Zealand legislation or court judgments by URL or official identifier. Convert HTML or PDF legal documents into pageable Markdown for AI clients.

Instructions

Retrieve full Markdown text of a legislation document or court judgment (HTML or PDF) from New Zealand (NZ) by its URL or official identifier.

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": {
      "document_id_or_url": "<document_id_or_url>"
    },
    "name": "get_legal_document_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number (5,000 characters per page).
document_id_or_urlYesDocument URL (.html or .pdf), ECLI, ELI, or official ID returned by search tools.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.3/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 disclosure burden. It does add genuine behavior beyond the schema — that HTML or PDF sources are normalized to Markdown — but it says nothing about read-only semantics, authentication needs, rate limits, or what happens on an invalid/non-NZ URL. Pagination behavior is left entirely to the schema.

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?

A single front-loaded sentence with no filler, and the important scope (full Markdown text, NZ) comes first. The nested parentheticals for formats and jurisdiction are slightly dense but each carries real 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?

This is a simple two-parameter retrieval tool with a fully described schema and an output schema, so return values need no explanation. The description covers resource, jurisdiction, source formats, and identifier forms; only the relationship to the search tools is left implicit.

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%, so both parameters are already documented, including the 5,000-character page size. The description's "by its URL or official identifier" reinforces the accepted identifier forms but adds no format examples, precedence rules, or guidance on when to page. Baseline 3 is appropriate.

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 ("Retrieve") plus a precise resource ("full Markdown text of a legislation document or court judgment"), and adds jurisdiction (NZ) and source formats (HTML or PDF). It distinguishes fetch-full-text from the search/verify siblings by implication rather than by naming them, so it is clear but not maximally differentiated.

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 only implied: an agent can infer this is the tool to call after a search has produced an identifier or URL, and the schema note says the ID comes "from search tools." There is no explicit when-to-use/when-not, and no statement about what to do if the URL is not a NZ legal document.

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