Skip to content

Use with ChatGPT and other assistants

Run bharat-judgements locally, then give your assistant the records you choose to share. This repository ships a Python SDK, CLI and skill bundle; it includes a local Docker MCP server; hosted ChatGPT environments require a separately supported connection.

Docker MCP connection

A local Docker MCP server is now included. Follow Docker MCP setup to connect supported local assistants and verify their tools before researching cases.

01 / Fetch records locally

Install the command with archive and automatic CAPTCHA support:

python -m pip install "bharat-judgements[cli,ocr,archive]"

For structured historical research:

bharat-judgements --json archive query --court sci --judge chandrachud --year 2018-2024 --limit 10 > judgments.json

For live High Court judgment text search:

bharat-judgements --json judgments search --text "right to privacy" --page-size 10 > judgments.json

--json is a global option: put it before archive, judgments or any other subcommand. Live search needs a CAPTCHA solver and network access. Archive queries need the archive extra and network access.

02 / Review what you share

Open the output file first. Confirm that the command succeeded and that the records belong to your intended query. JSON metadata is not the judgment text. For substantive analysis, retrieve and inspect the PDFs as well.

Example prompt after attaching selected records:

Make a table of the supplied judgments: title, court, decision date and identifier. Mark missing fields as missing. Use only these records and keep the source with each row.

03 / Check the assistant's answer

Compare its table with the file. For summaries of PDFs, check the cited passages against the original. Fetched data improves the evidence available to an assistant; it does not eliminate mistakes in analysis or transcription.

Automated tool access

Builders can expose the SDK through their own local tool or agent framework. Start with the quickstart and the facade guide. A custom wrapper must manage execution permissions, network access and returned data.

A hosted Python environment needs both the installed package and outbound network access. An assistant's ability to read a file does not imply that it can contact a court portal. When execution is unavailable, use the local workflow above.

Cost and privacy

bharat-judgements has no query billing service. Assistant subscriptions, cloud execution, storage and internet access may have separate costs. Queries reach the source portals or archive hosts; pasted or uploaded results also reach your assistant provider.

Next: CLI commands, source notes, or example prompts.