Skip to main content
Glama

Get Legal Document Markdown

get_legal_document_markdown

Retrieve full Markdown text of Swedish legislation or court judgments from an HTML/PDF URL or official identifier for readable access and citation checking.

Instructions

Retrieve full Markdown text of a legislation document or court judgment (HTML or PDF) from Sweden (SE) 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

A3.8/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 burden; it does disclose the return format (raw Markdown), the source representations (HTML/PDF), and the jurisdiction, which is useful context. However, it says nothing about authentication needs, rate limits, document size limits, or that results are paginated — even though the schema exposes a page parameter, the description never mentions truncation 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?

A single front-loaded sentence with no filler; the resource and jurisdiction appear before the identifier mechanics.

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?

For a two-parameter read tool with an output schema and full schema coverage, the description covers the essentials: what is fetched, from where, and in what form. It falls short only on pagination/truncation expectations and on routing guidance relative to the sibling search tools.

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 the baseline is 3. The description restates the accepted identifier kinds (URL or official identifier) already covered by the schema's document_id_or_url description and adds no format syntax or edge-case guidance beyond it.

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 verb ('Retrieve'), a precise resource ('full Markdown text of a legislation document or court judgment'), and the scope (Sweden/SE, HTML or PDF source). An agent can distinguish this from sibling search tools without opening the schema.

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: the schema note 'official ID returned by search tools' hints this is the follow-up step after a search, but the description itself never says when to use this versus search_legislation, search_case_law, or verify_citation, nor any exclusions.

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