pk_get_judgment

Pack: pakistan-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/pk_get_judgment for the schema, then POST the same URL with its arguments for the data.

Read the text of one Pakistani High Court judgment from the judgment_url returned by pk_search_judgments (Islamabad, Sindh, Peshawar or Balochistan). Returns extracted text in pages of max_chars with next_offset; a scanned judgment with no text layer returns found:false rather than an empty string.

Parameters

NameTypeRequiredDescription
judgment_urlstringyesjudgment_url from a pk_search_judgments result.
offsetnumbernoCharacter offset to start from (default 0); use next_offset from the previous page.
max_charsnumbernoCharacters to return (default 12000, max 40000).

Example call

Arguments

{
  "judgment_url": "https://bhc.gov.pk/media/judgments/1584.pdf",
  "max_chars": 1500
}

curl

curl -X POST https://gateway.pipeworx.io/pakistan-law/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"pk_get_judgment","arguments":{"judgment_url":"https://bhc.gov.pk/media/judgments/1584.pdf","max_chars":1500}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('pk_get_judgment', {
  "judgment_url": "https://bhc.gov.pk/media/judgments/1584.pdf",
  "max_chars": 1500
});

Response shape

FieldTypeDescription
foundboolean
reasonstring
courtstring
judgment_urlstring
pagesnumber | null
charactersnumber
offsetnumber
returned_charactersnumber
truncatedboolean
next_offsetnumber | null
textstring
notestring
publisherstring
sourcestring
Full JSON Schema
{
  "type": "object",
  "properties": {
    "found": {
      "type": "boolean"
    },
    "reason": {
      "type": "string"
    },
    "court": {
      "type": "string"
    },
    "judgment_url": {
      "type": "string"
    },
    "pages": {
      "type": [
        "number",
        "null"
      ]
    },
    "characters": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "returned_characters": {
      "type": "number"
    },
    "truncated": {
      "type": "boolean"
    },
    "next_offset": {
      "type": [
        "number",
        "null"
      ]
    },
    "text": {
      "type": "string"
    },
    "note": {
      "type": "string"
    },
    "publisher": {
      "type": "string"
    },
    "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 pakistan-law pack
{
  "mcpServers": {
    "pakistan-law": {
      "url": "https://gateway.pipeworx.io/pakistan-law/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build November 11, 2026