Skip to main content
Glama

semantic_neighbors

Read-onlyIdempotent

Find semantically related Hong Kong criminal-law provisions nearest to a citation or atlas point for exploratory research, then verify each result before reliance.

Instructions

Return provisions nearest to a point or citation in the semantic atlas.

Similarity is semantic, not authority or treatment. Verify every result with get_section and verify_citation.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "semantic_neighbors"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
citationNo
languageNo
point_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the description's value-add is the semantic-vs-authority caveat, which is genuinely useful for interpreting results. It does not say what happens when neither a point nor a citation is supplied, nor whether the two are mutually exclusive.

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?

Two short sentences, front-loaded with the purpose and followed by the caveat and verification step. Every sentence carries weight; the only inefficiency is that the second sentence packs caveat and verification without explaining either.

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-optional-parameter, read-only lookup with no output schema, the description covers what the tool returns conceptually and how to validate it. It leaves open the zero-argument case and the semantics of the optional filters, which an agent would need in order to call it confidently.

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% — all four parameters carry only titles — so the description must compensate and largely doesn't. It gestures at 'point or citation' but never explains the relationship between point_id and citation, nor what 'limit' or 'language' do.

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?

States a specific verb and resource: 'Return provisions nearest to a point or citation in the semantic atlas.' The 'nearest to a point or citation' framing distinguishes it from a query-driven search like semantic_search, though the distinction is implied rather than spelled out.

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?

Gives clear downstream guidance ('Verify every result with get_section and verify_citation') and a useful caveat that similarity is semantic rather than authoritative. It never says when to pick this over semantic_search or authority_ranking, so the when-to-use story is only implied by the caveat about authority.

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