pt_court_search

Pack: pt-law · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/pt_court_search for the schema, then POST the same URL with its arguments for the data.

Search Portuguese higher-court decisions (acordaos) in the courts’ Bases Juridico-Documentais (DGSI). Courts: stj (Supremo Tribunal de Justica), sta (Supremo Tribunal Administrativo), trl, trp, trc, tre, trg (Tribunais da Relacao). Free-text query; returns session date, case number, rapporteur (relator), descriptors and a decision link per hit, in dgsi relevance order. An empty hit list comes back with an explicit reason.

Parameters

NameTypeRequiredDescription
querystringyesPortuguese search words, e.g. “responsabilidade civil” or “acidente de viacao”
courtstringnoCourt database; default stj
limitnumbernoMax hits, 1-50 (default 10)
startnumbernoHit offset to start from, 1-based (default 1)

Example call

Arguments

{
  "query": "acidente de viacao",
  "court": "stj",
  "limit": 3
}

curl

curl -X POST https://gateway.pipeworx.io/pt-law/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"pt_court_search","arguments":{"query":"acidente de viacao","court":"stj","limit":3}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('pt_court_search', {
  "query": "acidente de viacao",
  "court": "stj",
  "limit": 3
});

Response shape

FieldTypeDescription
courtstring
court_namestring
querystring
startnumber
countnumber
resultsarray
sourcestring
Full JSON Schema
{
  "type": "object",
  "properties": {
    "court": {
      "type": "string"
    },
    "court_name": {
      "type": "string"
    },
    "query": {
      "type": "string"
    },
    "start": {
      "type": "number"
    },
    "count": {
      "type": "number"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "court": {
            "type": "string"
          },
          "session_date": {
            "type": "string"
          },
          "process": {
            "type": "string"
          },
          "relator": {
            "type": "string"
          },
          "descriptors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "relevance_pct": {
            "type": "number"
          },
          "url": {
            "type": "string"
          }
        },
        "additionalProperties": true
      }
    },
    "source": {
      "type": "string"
    }
  },
  "additionalProperties": true
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the pt-law pack
{
  "mcpServers": {
    "pt-law": {
      "url": "https://gateway.pipeworx.io/pt-law/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build December 4, 2026