courtmesh-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@courtmesh-mcpSearch for Supreme Court cases on right to privacy"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@courtmesh/mcp-server
An MCP (Model Context Protocol) server for the CourtMesh public REST API. It gives any MCP capable AI client, Claude Desktop, Claude Code, Cursor, or a custom agent, tools to search and analyze Indian court case law: 310M plus case records spanning the Supreme Court, High Courts, District Courts and tribunals.
Built with the official @modelcontextprotocol/sdk. MIT licensed.
Quickstart
1. Get an API key
Sign up and generate a key at https://research.courtmesh.ai. Keys look like cm-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxx (a legacy vv- prefix also works).
2. Run it
You do not need to install anything by hand, npx will fetch and run the package. Set COURTMESH_API_KEY in your MCP client config, see the copy pasteable blocks below.
Local checkout:
npm install
npm run build
COURTMESH_API_KEY=cm-your-key-here node dist/index.jsRelated MCP server: canlii-mcp
Environment variables
Variable | Required | Default | Description |
| Recommended | none | Your CourtMesh API key. Tools list fine without it, but any real API call will fail with a 401 style error until it is set. In HTTP mode a per session |
| No |
| Override to point at a different CourtMesh environment. |
| No |
| Set to |
| No |
| Port for the HTTP transport. |
Transports
This server supports two transports, chosen at startup:
stdio (default): the standard transport for local MCP clients such as Claude Desktop, Claude Code and Cursor. The client spawns the server process and talks to it over stdin and stdout.
Streamable HTTP: pass
--httpor setMCP_TRANSPORT=httpto run as a long lived HTTP server, mounted at/mcp, suitable for hosting behind a URL such asmcp.courtmesh.ai/mcp. A plainGET /healthroute is also available on the HTTP server itself, separate from thecheck_api_healthtool, which checks the upstream CourtMesh API instead.
Tools
Tool | Endpoint | Credits | One line |
|
| No | Fast keyword and boolean search over the full 310M plus case index. |
|
| Yes | AI vector search over the roughly 2M case subset with embeddings, for natural language questions about legal concepts. |
|
| No | Full case details, without AI analysis. |
|
| No | Reads any existing AI analysis for a case, read only. |
|
| No | Other documents sharing the same case number, plus a procedural timeline. |
|
| No | Autocomplete over Supreme Court and High Court judge names. |
|
| Yes | Triggers AI analysis of one case, asynchronous. |
|
| Yes, more | AI analysis merged across every document sharing a case number, synchronous and slow. |
|
| No | A time limited, encrypted link to the official judgment PDF. |
|
| No | Kicks off a live fetch of order and hearing history from the court's own systems. |
|
| No | Polls the job started by |
|
| No | Checks CourtMesh API connectivity, no authentication required. |
Full input and output field details are in each tool's own description, visible to any connected MCP client through tools/list.
Configuration examples
Claude Desktop
Edit claude_desktop_config.json (Settings, Developer, Edit Config) and add:
{
"mcpServers": {
"courtmesh": {
"command": "npx",
"args": ["-y", "@courtmesh/mcp-server"],
"env": {
"COURTMESH_API_KEY": "cm-your-key-here"
}
}
}
}Claude Code
CLI one liner:
claude mcp add courtmesh --env COURTMESH_API_KEY=cm-your-key-here -- npx -y @courtmesh/mcp-serverOr add to .mcp.json in your project:
{
"mcpServers": {
"courtmesh": {
"command": "npx",
"args": ["-y", "@courtmesh/mcp-server"],
"env": {
"COURTMESH_API_KEY": "cm-your-key-here"
}
}
}
}Cursor
Edit ~/.cursor/mcp.json:
{
"mcpServers": {
"courtmesh": {
"command": "npx",
"args": ["-y", "@courtmesh/mcp-server"],
"env": {
"COURTMESH_API_KEY": "cm-your-key-here"
}
}
}
}Hosted HTTP mode
Once this server is deployed behind a public URL, point any Streamable HTTP capable MCP client at it directly, no local process required. Pass your key as a query parameter, it overrides COURTMESH_API_KEY for that session:
{
"mcpServers": {
"courtmesh": {
"url": "https://mcp.courtmesh.ai/mcp?token=cm-your-key-here"
}
}
}Error codes
The API's own error text is always surfaced verbatim where available, along with a plain explanation.
Status | Meaning | What to do |
401 | The API key is missing, malformed, invalid, or deactivated. | Set |
403 | Account, plan, or quota gate: organization deactivated, account suspended, billing inactive, account not found, AI credits exhausted, or the daily API call quota reached (the response includes | Check your CourtMesh billing and plan settings, or wait for the quota to reset. |
429 | Rate limited. | Wait the number of seconds given in |
400 | Validation failed. | The tool result lists the specific field errors from the API's |
404 | The case, PDF, or timeline request was not found. | Double check the id or requestId. |
408 / 500 / 502 / 503 | Timeout or upstream failure. | Usually transient, retry later. |
There is one API quirk this server handles for you: POST /search/cases/semantic sends its HTTP 200 status before it finishes work, so a failure inside that endpoint can still arrive as HTTP 200 with a body of {"success": false, "error": "..."}. Every tool call checks for success: false in the response body in addition to the HTTP status, and reports it as a tool error either way.
Development
npm install
npm run build # compiles TypeScript with tsc, then chmods dist/index.js executable
npm run dev # tsc --watch
npm start # runs the built server over stdioSource layout:
src/index.ts: entry point, transport selection (stdio vs Streamable HTTP), Express app for HTTP mode.src/client.ts: shared HTTP client, auth headers, and all error mapping.src/tools.ts: tool schemas (zod) and handlers, one per CourtMesh endpoint.src/context.ts: anAsyncLocalStorageused to carry a per request?token=override through to the client in HTTP mode.
License
MIT, Copyright 2026 Thinkscoop Technologies LLP. See LICENSE.
Available Tools
12 toolsanalyze_caseAnalyze CaseA
Triggers AI analysis of a single case. CONSUMES AI CREDITS. ASYNCHRONOUS: normally returns immediately with status processing while the analysis runs in the background; poll get_case_analysis after roughly 30 to 60 seconds to retrieve the result. If analysis already exists and force is not set, the existing analysis is returned immediately instead with alreadyExists true. Set force true to re-analyze a case that already has analysis, which also consumes credits again. Fails with a clear message if the case has no usable text or PDF content to analyze.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Case identifier: either a 24 character MongoDB ObjectId hex string, or a case number string. Lookup order: the server first tries to parse this as an ObjectId; only if that parse fails does it fall back to looking up by case number. This means a syntactically valid but nonexistent ObjectId returns 404 without ever trying the case number path. | |
| force | No | Re-run analysis even if it already exists, default false. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Even with no annotations, the description fully discloses key behaviors: it consumes AI credits, is asynchronous, returns immediately with processing status, may return existing analysis with alreadyExists=true, force re-analyzes and re-consumes credits, and fails if no usable content exists. This exceeds transparency expectations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact yet comprehensive, with each sentence serving a distinct purpose: primary action, credit consumption, async/polling behavior, existing-analysis behavior, force behavior, and failure condition. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (async, credit consumption, subtle id matching, conditional re-analysis) and the absence of an output schema, the description covers all necessary operational details. It provides a complete mental model for correct invocation and follow-up.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already documents both parameters with 100% coverage, providing a baseline of 3. The description adds meaningful semantics beyond the schema: the id lookup order (ObjectId parse attempt followed by case number fallback), including the 404 edge case, and that force consumes credits again. This enriches parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Triggers AI analysis of a single case.' It distinguishes from siblings, notably 'analyze_consolidated_case' (consolidated cases) and 'get_case_analysis' (retrieval), by focusing on the triggering action and mentioning polling for results.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context: it explains the asynchronous flow, says to poll 'get_case_analysis' after 30-60 seconds, and describes when to set 'force' for re-analysis. It does not explicitly name alternative tools for excluding, but the implicit guidance is strong.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
analyze_consolidated_caseAnalyze Consolidated CaseA
Runs AI analysis across ALL documents that share the given case number, producing one merged view of the whole matter. CONSUMES SIGNIFICANTLY MORE AI CREDITS than analyze_case. SYNCHRONOUS: this call blocks until the analysis completes, which can take several minutes, so a long timeout is used. For a High Court case it analyzes the case document plus up to 5 most recent orders. For a Supreme Court case it analyzes up to 20 documents sharing the case number. Set force true to redo analysis that already exists, at the cost of credits again. Fails if the case has no case number or no text content, or if AI credits are exhausted.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Case identifier: either a 24 character MongoDB ObjectId hex string, or a case number string. Lookup order: the server first tries to parse this as an ObjectId; only if that parse fails does it fall back to looking up by case number. This means a syntactically valid but nonexistent ObjectId returns 404 without ever trying the case number path. | |
| force | No | Re-run consolidated analysis even if it already exists, default false. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden and does so thoroughly: synchronous blocking behavior, long timeout, cost implications, document count limits, force redo behavior, and failure conditions (no case number, no text content, exhausted credits). This is exemplary transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact yet every sentence provides necessary information: purpose, cost warning, sync behavior, scope, force option, and failure modes. No redundancy, well front-loaded with the primary verb and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given complexity, the description covers input semantics, behavior, and failure conditions comprehensively. However, with no output schema, it leaves the return format of the 'merged view' unspecified. It is still mostly complete as the output can be inferred from the purpose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description repeats the force behavior already in the schema and does not add additional meaning for id beyond what the schema provides. No extra semantic value beyond the structured fields.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states a specific verb and resource: 'Runs AI analysis across ALL documents that share the given case number'. It distinguishes from sibling analyze_case by emphasizing consolidated scope and cost. The purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly mentions the alternative analyze_case via cost comparison ('CONSUMES SIGNIFICANTLY MORE AI CREDITS than analyze_case'), implying when not to use this tool. Also gives case-type-specific scope (High Court vs Supreme Court), providing clear context. Lacks an explicit 'use this when' statement but it is inferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
check_api_healthCheck API HealthA
Checks whether the CourtMesh API is reachable and healthy. No authentication required and no AI credits consumed. Useful to verify connectivity, and to confirm that connectivity problems are not caused by API key configuration, since this endpoint works even without a key. Returns success, status, version and timestamp; note this endpoint does not use the standard data envelope used by every other tool here.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, but the description fully discloses behavior: no authentication required, no AI credits consumed, returns specific fields, and uses a different response envelope than other tools.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is concise, front-loaded with the main purpose, and each sentence adds value. It covers usage context, behavior, and response details without waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool (no params, no output schema), the description provides complete context: what it does, when to use it, what it returns, and how it differs from other tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no parameters, so schema coverage is trivial. Description adds context by explaining that no key is needed, implying no input is required. Baseline for zero params is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool checks API health and reachability. It distinguishes itself from sibling tools that deal with case data by focusing on connectivity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use it: to verify connectivity and diagnose API key configuration issues. It also notes that it works without a key, providing clear context for troubleshooting.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_caseGet CaseA
Fetches full details for one case, without AI analysis. No AI credits consumed. Returns id, caseNumber, title, court, caseType, judges, petitioners, respondents, decisionDate, disposalNature, summary, optional metadata.diaryNumber, hasDocuments, documentCount and hasAnalysis. Fields like detailedSummary, headnote, holding and keyFacts are NOT included here, call get_case_analysis for those.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Case identifier: either a 24 character MongoDB ObjectId hex string, or a case number string. Lookup order: the server first tries to parse this as an ObjectId; only if that parse fails does it fall back to looking up by case number. This means a syntactically valid but nonexistent ObjectId returns 404 without ever trying the case number path. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It thoroughly discloses the exact fields returned, the optional nature of metadata.diaryNumber, and explicitly lists fields that are NOT included. The 'without AI analysis' note clarifies the tool's non-AI behavior, which is beneficial for cost and latency expectations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is somewhat long due to the enumerated return fields, but the first sentence is concise and front-loaded. The field list is useful and not redundant; every sentence adds value. It could be slightly more compact but is well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has one parameter, no output schema, and no annotations, the description provides a complete picture: what is returned, what is excluded, the alternative tool, and the credit behavior. This is fully sufficient for an agent to select and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already has 100% coverage for the single parameter id, including detailed lookup-order semantics. The description does not add additional parameter-specific meaning beyond what the schema provides, so the baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb+resource ('Fetches full details for one case') and clearly distinguishes itself from siblings by explicitly noting 'without AI analysis' and directing users to get_case_analysis for excluded fields. This leaves no ambiguity about what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly states 'No AI credits consumed' (a key differentiator) and gives a specific exclusion list with a direct pointer to the alternative tool: 'call get_case_analysis for those.' This is clear when-to-use and when-not-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_case_analysisGet Case AnalysisA
Reads any existing AI analysis for a case. Read only: does NOT trigger new analysis and does NOT consume AI credits. If analysis has not been generated yet, hasAnalysis will be false and you will get a message field instead of an analysis field; in that case call analyze_case to generate it. When hasAnalysis is true, analysis may include summary, detailedSummary, comprehensiveSummary, headnote, holding, keyFacts, issues, courtsReasoning, citedCases (followed, distinguished, overruled, referred), precedentRelationships, arguments (petitioner, respondent), practiceAreas, subCategories, tags, procedureType, precedentValue, legalPrinciples, doctrinesApplied, statutoryInterpretation and constitutionalProvisions. Fields with no value are omitted from the response.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Case identifier: either a 24 character MongoDB ObjectId hex string, or a case number string. Lookup order: the server first tries to parse this as an ObjectId; only if that parse fails does it fall back to looking up by case number. This means a syntactically valid but nonexistent ObjectId returns 404 without ever trying the case number path. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility for behavioral disclosure. It explicitly states that the tool is read-only, does not trigger new analysis, and does not consume AI credits. It also explains the behavior when analysis is absent (hasAnalysis false, message field) and that empty fields are omitted. This is thorough and transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose and then provides essential behavioral context. The long list of possible return fields is justified because there is no output schema, so the agent needs that information to understand potential responses. It is somewhat long, but every section earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema, the description is exceptionally complete. It covers purpose, side effects, the uninitialized state and fallback action, and enumerates the full set of possible returned fields. It leaves no critical gaps for an agent to invoke the tool correctly and interpret the response.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema fully describes the single `id` parameter, including the ObjectId/case number fallback logic. The description adds no parameter-specific meaning, but since schema coverage is 100%, the baseline of 3 is appropriate. The description's focus on return fields is useful but not directly about parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and object: 'Reads any existing AI analysis for a case.' It clearly distinguishes this from sibling tools by emphasizing 'existing' and explicitly contrasting with analyze_case. The read-only nature is also stated upfront.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit guidance on when to use this tool: to retrieve an already-generated analysis. It also specifies when not to use it: if hasAnalysis is false, the agent should call analyze_case instead. This direct alternative naming makes the usage boundaries highly clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_case_pdf_urlGet Case PDF URLA
Returns a time limited link to the official judgment PDF for a case. No AI credits consumed. CRITICAL: the returned pdfUrl is an ENCRYPTED presigned S3 URL, not a directly fetchable link, it must be decrypted with a case specific key before use, and it expires after the returned expiresIn seconds (normally 3600). Do not attempt to fetch pdfUrl directly, treat it as an opaque token to hand back to the user or to a CourtMesh client that knows how to decrypt it. Returns 404 if the case has no stored document.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Case identifier: either a 24 character MongoDB ObjectId hex string, or a case number string. Lookup order: the server first tries to parse this as an ObjectId; only if that parse fails does it fall back to looking up by case number. This means a syntactically valid but nonexistent ObjectId returns 404 without ever trying the case number path. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full weight. It explicitly discloses that the URL is an encrypted presigned S3 URL that must not be fetched directly, expires after the returned expiresIn seconds, and returns 404 if no document exists. Also notes no AI credits are consumed, which is useful operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: it front-loads the core purpose, then presents a critical warning about the encrypted URL and expiration. Each sentence adds necessary value, with no filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers return behavior (pdfUrl and expiresIn), error case (404), encryption/decryption requirement, and expiration semantics. Given the complexity of the tool and lack of output schema, this is sufficiently complete for an agent to handle the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already has 100% coverage with a detailed description of the id parameter, including the ObjectId-or-case-number lookup order. The tool description does not add further parameter detail beyond what the schema provides, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns a time-limited link to an official judgment PDF for a case. This distinguishes it from sibling tools like get_case or analyze_case, which serve different resources. The verb 'returns' and resource 'PDF URL' make the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context for when to use the tool (retrieving a case PDF URL) and includes important usage warnings, but it does not explicitly name alternatives or exclusion criteria. The purpose is obvious enough to infer appropriate usage relative to siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_case_timelineGet Case TimelineA
Polls the status and result of a job started by request_case_timeline. No AI credits consumed. Returns requestId, status, createdAt, updatedAt plus, when available, startedAt, completedAt, error, result, orders, orderCount and totalOrderCount. Returns 404 if the request is not found, which can mean the requestId is wrong or has expired.
| Name | Required | Description | Default |
|---|---|---|---|
| requestId | Yes | The requestId returned by request_case_timeline. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses return fields (including conditional ones), the 404 error case, and states that no AI credits are consumed—providing meaningful behavioral context beyond the tool name.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded with the main purpose. The list of return fields is slightly dense but earns its place by informing the caller of the response shape. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is a simple polling operation with one parameter and no output schema. The description covers purpose, return values, error behavior, and cost implications, which is quite complete. It could mention more about the 'result' field's format, but that is not essential for this polling tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100% for the only parameter (requestId), and it fully explains its origin. The tool description adds no new parameter semantics beyond the schema, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool polls the status and result of a job started by request_case_timeline, using a specific verb and resource. This distinguishes it from siblings like get_case or request_case_timeline.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It clearly implies usage as a follow-up to request_case_timeline by naming that tool, but does not explicitly state when not to use it or mention alternative tools for similar purposes. The context is clear but not fully explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
request_case_timelineRequest Case TimelineA
Kicks off a fetch of the live order and hearing history for a case directly from the court's own systems. Asynchronous job, no AI credits consumed. case_id must be the 24 character MongoDB ObjectId string, the id field from search results, a case number will fail. Supreme Court cases return immediately with status completed and orderCount 0, since SC cases have no separate order history in this system. District Court cases are fetched synchronously and come back completed or failed. High Court cases usually return pending and must be polled with get_case_timeline using the returned requestId.
| Name | Required | Description | Default |
|---|---|---|---|
| case_id | Yes | 24 character MongoDB ObjectId string for the case, from the id field of a search result. A case number will not work here. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully discloses key behaviors: asynchronous nature, no AI credits consumed, case_id format constraints, court-specific result statuses (completed/pending/failed), and the need to poll with requestId. This goes beyond typical descriptions and covers failure modes (case number will fail).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose and then provides dense, non-redundant details in six short sentences. Every sentence earns its place – covering behavioral nuances, parameter constraints, and court-specific outcomes. It is efficiently structured for an async tool with multiple edge cases.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of an async job with different court types and no output schema, the description is remarkably complete. It explains the response statuses, orderCount for Supreme Court, the polling mechanism with get_case_timeline, and the need for requestId. No critical context appears missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description already fully covers the case_id parameter (24-char ObjectId, from search results, case number fails). The tool description repeats this info without adding new meaning, so the baseline of 3 for high schema coverage applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'kicks off a fetch of the live order and hearing history for a case directly from the court's own systems' – a specific verb+resource+scope. It also distinguishes itself from the sibling get_case_timeline by explaining that this request initiates the job, while polling is done with get_case_timeline.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides clear context on when to use this tool: for initiating a live history fetch, with court-specific behavior (Supreme immediate, District sync, High Court pending). It does not explicitly say when not to use it or compare against other sibling tools, but the mention of polling via get_case_timeline and the 'no AI credits' note offer usage guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_indian_court_casesSearch Indian Court CasesA
Keyword and boolean search over the full 310M plus record OpenSearch index of Indian court cases. Fast, exact match, does not consume AI credits. Prefer this over semantic_search_cases for case numbers, party names, citations, judge names and exact phrases. Use semantic_search_cases instead when the request is a natural language question about legal concepts, doctrines or fact patterns rather than exact terms. Note: the caseNumber field is accepted and echoed back but does not actually filter results, put case number text in query instead. Note: sortBy only accepts relevance or date at the validation layer, but the underlying search engine only understands relevance, recent or oldest internally, so date is accepted yet may not reorder results as expected.
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number, default 1. | |
| year | No | Year or list of years, each 1947 to the current year, as an integer or a 4 digit string. | |
| court | No | Court name or list of court names to filter by. | |
| judge | No | Alias for judgeName, see judgeName. | |
| limit | No | Results per page, 1 to 100, default 20. | |
| query | Yes | Search text: keywords, a phrase, a case number, or a party name. | |
| judges | No | Alias for judgeName, see judgeName. | |
| sortBy | No | Sort order, default relevance. Only relevance and date pass validation here; see the tool description for a real behaviour caveat about date. | |
| toDate | No | End date, inclusive, YYYY-MM-DD. | |
| caseType | No | Case type or list of case types to filter by. | |
| fromDate | No | Start date, inclusive, YYYY-MM-DD. | |
| judgeName | No | Judge name or list of judge names to filter by. Aliases judges and judge are also accepted; if more than one of judgeName, judges, judge is supplied only the first set one is used, in that order. Use search_judges first to get the exact spelling. | |
| caseNumber | No | Case number or list of case numbers. Accepted and echoed back in the response meta.filters, but this does not actually filter results in the current API. Put the case number in query instead. | |
| searchAfter | No | Deep pagination cursor. Pass back the JSON encoded pagination.nextCursor array from a previous response. Prefer this over page for paging beyond the first few thousand results. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full disclosure burden and reveals important behaviors: fast, exact match, does not consume AI credits, and two known limitations (caseNumber not filtering, sortBy date not reliably reordering). This goes well beyond a typical tool description, though it stops short of describing return format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is dense but efficient: every sentence contributes either purpose, usage guidance, or a caveat. It is front-loaded with the core function and uses clear 'Note:' markers for gotchas.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's 14 parameters and absence of an output schema, this description is remarkably complete: it covers what data is searched, performance characteristics, when to choose alternatives, and known quirks. The only minor gap is no explicit mention of response structure, but the schema already handles parameter details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already documents all 14 parameters with 100% coverage, so the baseline is 3. The description adds value by explaining the sortBy validation-vs-internal mismatch and reinforcing that caseNumber should be placed in query, giving agents critical operational knowledge.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool as performing keyword and boolean search over a 310M-record index of Indian court cases. It names the specific resource (OpenSearch index) and distinguishes it from semantic_search_cases, making its purpose unmistakable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly instructs when to prefer this tool over semantic_search_cases (for case numbers, party names, citations, judge names, exact phrases) and when to use the alternative (natural language questions about legal concepts). This is textbook usage guidance with named alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_judgesSearch JudgesA
Autocomplete over the combined Supreme Court and High Court judge name list. No AI credits consumed. Use this to get the exact spelling of a judge name before passing it to search_indian_court_cases as judgeName. Matching is case insensitive substring matching. An empty or omitted q returns the first 50 names in the list. Results are always capped at 50.
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Search term to match against judge names, case insensitive substring match. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully discloses matching behavior (case insensitive substring), result cap (50), and default behavior for empty q. It also mentions the resource cost (no AI credits). It does not describe the return format, but for a simple autocomplete tool, this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three efficient sentences, front-loaded with purpose and usage, with no redundant or filler content. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description covers the core behavior, the default case, the cap, and the intended use case. It is complete enough for an agent to use correctly, though it omits the exact response shape (e.g., list of names).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the single 'q' parameter, so the schema already explains the case-insensitive substring match. The description adds value by noting that an empty or omitted q returns the first 50 names, but this is behavioral context rather than parameter semantics. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it is an autocomplete over the combined Supreme Court and High Court judge name list, with a specific verb ('Autocomplete') and resource. It distinguishes itself from sibling tools by explicitly tying it to getting exact spellings before using search_indian_court_cases.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use ('to get the exact spelling of a judge name before passing it to search_indian_court_cases as judgeName'), names the alternative tool, and clarifies that no AI credits are consumed. This gives clear context for when to choose this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
semantic_search_casesSemantic Search CasesA
AI vector search over the roughly 2M case subset that has embeddings, out of the full 310M plus corpus. CONSUMES AI CREDITS. Prefer this over search_indian_court_cases for natural language questions about legal concepts, fact patterns or doctrines, where exact keywords will not match. Slower, a single call can take a minute or more. Real behaviour note: this endpoint's validation layer also accepts top level court, year, caseType, caseNumber, judgeName, judges, judge, fromDate and toDate fields, but the handler silently ignores all of them, only query, page, limit and filters are actually used, so this tool only exposes those. Put any filtering inside the filters object instead. Another quirk: if the cleaned query text ends up shorter than 3 characters after internal processing, the service falls back to a plain keyword search and marks the response with meta.fallbackMode = "opensearch".
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number, default 1. | |
| limit | No | Results per page, 1 to 100, default 20, clamped to 100 server side. | |
| query | Yes | Natural language question or description, minimum 3 characters. | |
| filters | No | Free form filter object passed straight through to the vector store. Keys the handler actually understands downstream: court, caseType, caseYear, judgeName, caseNumber, and decisionDate as an object with $gte and or $lte sub keys for range filtering. Filters supplied here override whatever filters the service would otherwise auto extract from the query text. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and does so thoroughly. It discloses AI credit consumption, performance characteristics, silent ignoring of certain fields, and the fallback behavior to keyword search with a response marker. This is exemplary transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Although lengthy, the description is front-loaded with the core purpose and every sentence contributes unique information: cost, speed, use case, ignored fields, and fallback behavior. No fluff or repetition; the structure guides the reader from main purpose to important caveats.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (no output schema), the description covers essential operational details: the subset size, credit consumption, latency, ignored parameters, and the fallback mode field in the response. This is sufficient for an agent to set expectations and invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds substantial context beyond the schema: it warns that certain top-level fields are 'silently ignored' and directs users to put filtering in the 'filters' object. It also clarifies that filters override auto-extracted ones, adding meaning not present in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool as 'AI vector search' over a specific subset of cases, and explicitly contrasts it with a sibling tool: 'Prefer this over search_indian_court_cases for natural language questions...' This provides a specific verb, resource, and scope, fully distinguishing it from alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit when-to-use guidance: 'Prefer this over search_indian_court_cases for natural language questions about legal concepts, fact patterns or doctrines, where exact keywords will not match.' Also warns about slowness ('a single call can take a minute or more'), setting expectations for appropriate usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
12 tool updates
v0.1.0- First observed
analyze_case - First observed
analyze_consolidated_case - First observed
check_api_health - First observed
find_related_cases - First observed
get_case - First observed
get_case_analysis - First observed
get_case_pdf_url - First observed
get_case_timeline - First observed
request_case_timeline - First observed
search_indian_court_cases - First observed
search_judges - First observed
semantic_search_cases
TDQS
Scored across 12 tools
Each tool has a distinct purpose: get_case vs get_case_analysis clearly separate raw case data from AI analysis; analyze_case vs analyze_consolidated_case distinguish single vs multi-document analysis; search_indian_court_cases vs semantic_search_cases differentiate keyword vs semantic search; request_case_timeline and get_case_timeline form a clear start/poll pair. No two tools are likely to be confused.
Most tools follow a verb_noun pattern with verbs like get, search, analyze, request, check. There is slight inconsistency: 'find_related_cases' could be 'search_related_cases' or 'get_related_cases', and 'request_case_timeline' uses request while its pair uses get. However, the naming is generally predictable and the intent is clear.
12 tools is well within the ideal 3-15 range. Each tool covers a distinct aspect of legal case research (retrieval, analysis, search, timeline, PDF, health), and none feel redundant or unnecessary. The count matches the apparent scope of the server.
The tool surface provides full coverage for the domain: search cases, get case details, read and generate AI analysis (both single and consolidated), find related cases, retrieve PDFs, and fetch timelines. The addition of search_judges and health check round out the workflow. No major gaps are apparent for the stated purpose of accessing Indian court case data and analysis.
Maintenance
Related MCP Connectors
Connect AI to millions of laws and court cases with the Lawstronaut MCP.
Public Indian legal search MCP for Roop judgments, statutes, and corpus grounding.
CourtListener MCP — Free Law Project's CourtListener API (free, no auth required for basic access)
- UnifAPIOAuthcom.unifapi
Hosted MCP server for live public-data APIs and Skills for AI agents.
Related MCP Servers
- FlicenseBqualityFmaintenanceAn MCP server providing standardized access to Swiss court decisions through the entscheidsuche.ch API, allowing LLMs to search, retrieve, and analyze legal documents from Swiss jurisdictions.35-
- AlicenseAqualityBmaintenanceAn MCP server providing AI assistants access to Canadian case law and legislation metadata from CanLII across all jurisdictions, supporting search and citation relationships.76 npm5MIT
- AlicenseAqualityDmaintenanceMCP Server providing AI agents access to over 3 million US court decisions via CourtListener and EU legislation via EUR-Lex, with tools for searching cases, citations, judges, and court information.6MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server providing AI agents access to CourtListener's comprehensive legal database, featuring semantic search, hybrid search, citation verification, and research tools.7MIT