Skip to main content
Glama

semantic_search

Read-onlyIdempotent

Locate Hong Kong criminal-law provisions by keyword search over a citation and heading index; filter by cluster or English/Chinese, then read and verify the result.

Instructions

Search the semantic atlas's citation/heading index for provisions.

This is a metadata/keyword lookup over the generated atlas; use semantic_neighbors for nearest-neighbour discovery. cluster accepts a cluster id or a label fragment; language is en or zh-Hant. Read the provision with get_section and verify it with verify_citation before relying on it.

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": "semantic_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
queryYes
clusterNo
languageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world behavior, so the description's real contribution is the clarification that this is a metadata/keyword lookup over a *generated* atlas rather than embedding search — an important correction to what the name implies. It also flags that results should be verified before reliance, which is behavioral context not present in annotations. It stops short of describing ranking or result shape.

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?

The scoping statement is front-loaded, followed by the sibling contrast, the parameter notes, and the verification workflow — a logical progression with no filler. Slightly dense line-wrapping and a couple of backticked asides keep it from being maximally tight, but every sentence carries information.

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 four-parameter read-only tool with no output schema, the definition covers routing and verification but leaves the result surface and `limit` behavior unspecified, so an agent cannot predict result count or shape. The core how-to-call information is present, but the picture is only partly complete.

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

Parameters3/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 compensate, and it partly does: it explains that `cluster` takes a cluster id or a label fragment (the schema only shows an undescribed anyOf string|integer) and that `language` is `en` or `zh-Hant` (the schema has no enum). `limit` and `query` semantics, including the default of 10 and what limiting means, are left undocumented.

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

Purpose5/5

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

States a specific verb and resource: searching the atlas's citation/heading index for provisions. It also explicitly contrasts itself with `semantic_neighbors`, so an agent can distinguish a keyword/metadata lookup from nearest-neighbour discovery without opening a schema.

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

Usage Guidelines5/5

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

Names the alternative tool and the condition that selects it (`semantic_neighbors` for nearest-neighbour discovery), then prescribes a follow-up workflow: read via `get_section`, verify via `verify_citation`. Both the routing decision and the downstream sequence are explicit.

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