{"service":"eCourts India MCP Server","version":"4.5","status":"ok","mcp_endpoint":"/mcp?token=YOUR_KEY","signup":"https://ecourtsindia.com","tools":["lookup_enum","fetch_live_enums","fetch_reference_file","get_case_details","search_cases","get_order_document","get_order_ai_analysis","get_order_markdown","refresh_case","refresh_and_wait_for_case","bulk_refresh_cases","search_causelist","get_available_causelist_dates","get_case_with_latest_order","search_and_get_first_case","batch_get_case_details","get_case_brief","search_and_brief_top_cases","get_court_docket","monitor_portfolio","get_states","get_districts","get_complexes","get_courts"],"resources":["ecourts://guide","ecourts://agent_workflows","ecourts://common_mistakes","ecourts://search_guide"],"changelog":{"4.5":["NEW: Internal wait-and-poll for get_order_ai_analysis — if aiAnalysis is null, the tool now sleeps and re-fetches up to 4 times (~45s budget) before returning. Callers should NOT need to retry. maxWaitSeconds param (default 50, capped at 55 to stay under the MCP 60s tool timeout). If still null, call again to resume polling.","NEW: Internal wait-and-poll for get_order_markdown — same pattern. maxWaitSeconds default 50, capped 55.","NEW: Mandatory STALE-DATA RULE — summariseCase() now flags `nextHearingDate < today` and missing-next-date on PENDING cases with an explicit recommendation to call refresh_and_wait_for_case(cnr). The rule is also documented in DOMAIN_GUIDE and on get_case_details, get_case_brief, and get_case_with_latest_order tool descriptions, instructing AI agents to refresh BEFORE answering the user.","TUNING: refresh_and_wait_for_case maxWaitSeconds default lowered from 90s to 50s (capped 55s) to fit inside the MCP 60s tool timeout. pollInterval default lowered from 15s to 10s. Call again to continue polling if refresh hasn't landed."],"4.4":["NEW: Automatic retry with exponential backoff (800ms / 1.6s / 3.2s + jitter, up to 3 retries) for ALL API calls on transient failures (HTTP 500/502/503/504 and network errors). Applied transparently via withRetry() wrapper around apiFetch and publicFetch. Non-retryable errors (4xx, binary responses, parse errors) pass through unchanged. Error messages append '[retried Nx]' so callers can tell retries happened.","NEW tool: refresh_and_wait_for_case — one-shot refresh + poll. Snapshots current state, queues refresh_case, then polls get_case_details every pollIntervalSeconds until entityInfo.dateModified changes (meaning the scrape landed) or maxWaitSeconds is exceeded. Returns the fresh summary PLUS a diff of what changed (orderCount, hearingCount, caseStatus, lastHearingDate). Defaults: maxWait=90s, pollInterval=15s.","FIX: Array params (cnrs) on monitor_portfolio, batch_get_case_details, bulk_refresh_cases now accept EITHER a JSON array OR a comma/whitespace-separated string, via a cnrsParam() preprocess helper. Fixes 'expected array, received string' validation errors on MCP transports that serialize arrays to strings.","DOCS: search_cases query param now warns about upstream Solr 500 when combining double-quoted phrases with AND/OR. Recommendation: use unquoted keywords joined with AND/OR until the backend phrase parser is patched."],"4.3.1":["FIX: Zod param coercion — all numeric (pageSize, page, minOrderCount, maxResults, limit, offset, min/maxCaseDurationDays, min/maxOrderCount, min/maxHearingCount) and boolean (hasOrders, hasJudgments, includeCourtroom) params now use z.coerce.* so string-serialized transport values are accepted. Fixes 'expected number, received string' / 'expected boolean, received string' validation errors on search_cases, search_and_brief_top_cases, get_court_docket, search_causelist."],"4.3":["NEW tool: fetch_reference_file — pulls the authoritative public sitemap files (CaseTypeCodes, CaseStatusCodes, HighCourtCodes, NcltNclatCodes, BenchTypes, JudicialSections, CaseCategories, CourtTypes, StateCodes, SolrFieldReference) directly from ecourtsindia.com/sitemaps/","DOMAIN_GUIDE + search_guide resource: added Canonical Reference Files section with all 10 sitemap URLs","NEW resource: ecourts://search_guide — Solr operator cheat-sheet + ready-made scenarios","search_cases: query param now documents full-text coverage of aiSummaryText/orderMarkdownText + Solr operators (phrase, AND/OR/NOT, wildcard, grouping)","HighCourtCodeEnum: fixed HBHC01 → Telangana HC (was wrongly labelled P&H); added HCBM02/03/04 (Bombay Original Side, Aurangabad, Nagpur benches); relabelled HCMA01/HCMD01 as Madras Chennai / Madurai bench","DOMAIN_GUIDE: added Full-Text Search Power section describing Solr operator support"],"4.2":["REMOVED: get_service_price tool (pricing endpoint requires consumer JWT, not partner key)","NEW: historyOfCaseHearings displayed in case summary (last 5 entries) — very useful for NCLT/tribunal cases","FIX: lastHearingDate now prefers courtCaseData over entityInfo (entityInfo can be stale for NCLT)","FIX: IA actionType field now shown in interlocutory applications list (e.g. 'Disposed as Withdrawn')","FIX: search_and_brief_top_cases now accepts hasOrders boolean filter"],"4.1":["CRITICAL BUG FIX: CNR validation regex now accepts NCLT CNRs (NCLTDL0099822025 = 6 letters + 10 digits)","CRITICAL BUG FIX: KEY FACTS now shows latest order hint for interimOrders too (not just judgmentOrders)","SERVER_INSTRUCTIONS completely rewritten with decision tree, NCLT codes, order latency, stale data protocol","search_cases description improved with NCLT note, SILENT FAILURE warning, multiple values syntax","search_and_brief_top_cases: added hasOrders filter","COMMON_MISTAKES: added actsAndSections + combined filter zero-results warning","search_cases: improved tool description for LLM use with actionable hints"],"4.0.1":["Confirmed all 10 partner API endpoints covered (swagger audit)","search_cases: all 46 swagger params wired — confirmed hasOrders/hasJudgments/numeric ranges live-tested","search_causelist: includeCourtroom confirmed returning 677 courtrooms for Delhi","CaseTypeEnum: 100% in sync with live API (137 codes, all IBC/CA/AT codes present)","NCLT court code warning added to lookup_enum + COMMON_MISTAKES + SERVER_INSTRUCTIONS","judges/advocates/litigants filter confirmed working (don't appear in activeFilters — documented)"],"4.0":["CORRECTED: order AI/markdown are on-demand pipeline (10–60s), not pre-computed","New composites: get_case_brief, search_and_brief_top_cases, get_court_docket, monitor_portfolio","New resources: ecourts://agent_workflows, ecourts://common_mistakes","extractKeyFacts() with <structured_facts> JSON block","search_cases: actsAndSections, lastHearingDate range, hasOrders, hasJudgments, numeric range filters","summariseCauseList: benchDescription, courtType, internalCaseNo, split advocate display","Removed all admin/account endpoints — not appropriate for case-access MCP"],"3.0":["Added get_order_markdown, bulk_refresh_cases, fetch_live_enums, batch_get_case_details","Fixed court structure URLs, search_causelist pagination, search_cases filters","Educational error messages, server instructions, HighCourtCodeEnum full bench codes"]}}