Skip to main content
Glama
Portugal Legal Research MCP Server

Portugal Legal Research MCP Server

by jurisatlas

Get Legal Document Markdown

get_legal_document_markdown

Retrieve Portuguese legislation or court judgment HTML/PDF content as full Markdown text by URL, ECLI, ELI, or official ID, with pagination for long documents.

Instructions

Retrieve full Markdown text of a legislation document or court judgment (HTML or PDF) from Portugal (PT) 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 supplied, the description carries the full behavioral burden. It discloses the input formats (HTML/PDF), the jurisdiction, and the output form (Markdown full text), but says nothing about failure modes for unsupported or non-PT documents, whether large documents are truncated, or how the 5,000-character paging interacts with the returned content.

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 sentence that front-loads the action and resource, with supporting qualifiers (formats, jurisdiction, key) in a logical order and no filler.

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?

Because an output schema exists, the description need not explain return values, and for a simple two-parameter read tool what is present is largely sufficient. The only meaningful omission is behavioral edge-case guidance, which matters more given the absence of annotations.

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 coverage is 100%, including a clear page description (5,000 characters per page) and accepted identifier forms, so the schema already does the heavy lifting. The description's mention of URL or official identifier only restates the schema and adds no syntax or format detail 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?

Names a specific verb (retrieve), a specific resource (full Markdown text of a legislation document or court judgment), the accepted source formats (HTML or PDF), the jurisdiction (Portugal/PT), and the lookup key (URL or official identifier). That is enough for an agent to distinguish it from the search_* siblings, which return result sets rather than full documents.

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 'official ID returned by search tools' implies the intended search-then-retrieve workflow, which is useful implicit guidance. However, the description never states explicitly when to prefer this tool, nor when not to use it (e.g. for non-Portuguese documents or citation verification, which verify_citation covers).

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