Skip to main content
Glama

search_cases

Read-onlyIdempotent

Search Hong Kong criminal-law judgments by query, court, and year range; return local-index results by default or live HKLII matches when enabled.

Instructions

Search Hong Kong judgments.

The default follows HK_LAW_LOCAL_ONLY: local-only when set to 1 (the public launcher default), live HKLII search when set to 0. Live search is for query-time coverage and remains subject to HKLII's terms. court accepts a neutral-citation code such as HKCFA/HKCA/HKCFI/HKDC.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_cases"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoen
liveNo
courtNo
limitNo
queryYes
year_toNo
year_fromNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.0
    • addedInput schema / properties / live / anyOf
      Added value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / live / default
      Previous value: -trueNew value: +null
    • removedInput schema / properties / live / type
      Removed value: -"boolean"
  2. First observedv0.2.0

TDQS

B3.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/openWorld/idempotent/non-destructive, so the safety profile is covered. The description adds genuine value beyond that: it discloses the environment-variable-driven default, warns that live mode depends on an external service and carries terms-of-use implications, and explains the court code format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in one line, followed by two short contextual notes. No filler sentences, though the wrapped backtick prose is slightly harder to scan than plain lines.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter search tool with no output schema, the definition covers the mode toggle and court codes but leaves query syntax, date-range semantics, limit behavior, and result shape entirely unspecified. Adequate to invoke, not adequate to invoke well.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the full burden. It clarifies only `court` (with concrete HKCFA/HKCA/HKCFI/HKDC examples) and partially `live` (via the env default). The required `query`, plus `lang`, `limit`, `year_from`, and `year_to`, get no meaning—no syntax, format, or range guidance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource: 'Search Hong Kong judgments,' which is clear and unambiguous. However, it never distinguishes this from siblings like semantic_search, search_doj, or search_legislation, so an agent must infer which search surface to pick from names alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explains the live/local toggle condition (local-only when HK_LAW_LOCAL_ONLY=1, live HKLII when 0) and notes live search is subject to HKLII's terms, which is real usage context. It gives no guidance on when to prefer this over semantic_search or verify_citation, and no exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.