Skip to main content
Glama

similar_units

Identify code units most like a given unit or free text, returning role and six-channel evidence; optionally widen results with an associative PPMI view. Advisory, not a verdict.

Instructions

The same-role advisor (ce.similar-report schema): the units most like one unit or a text, in the core's order with its role bit and a six-channel evidence row; widen adds the PPMI associative view. Advisory — never a verdict.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atNothe unit holding `file:line` (path relative to the root)
pathNosubpath (default: project root)
textNofree text as name and doc evidence
unitNoa unit by key (`name/arity`)
widenNoadd the associative view, tagged

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does add one valuable behavioral fact: the output is advisory and 'never a verdict', plus that `widen` layers on a 'PPMI associative view'. It also sketches the return shape ('role bit and a six-channel evidence row'). However, it discloses nothing about permissions, performance, or read-only nature.

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

Conciseness3/5

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

It is compact at two sentences and front-loads the purpose, which is good. But the density of unexplained jargon ('ce.similar-report schema', 'role bit') means the brevity comes at the cost of comprehensibility rather than earning every word's place.

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 five-parameter, zero-required, no-output-schema, no-annotation tool, the description should clarify how the mutually exclusive target inputs (at/unit/text) are used and what the 'six-channel evidence row' contains. It gestures at the output format but leaves an agent uncertain how to actually invoke it correctly.

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 100%, so the schema already documents all five parameters, giving a baseline of 3. The description adds marginal value by clarifying that the target can be 'one unit or a text' (implying at/unit/text) and by explaining that `widen` adds an associative view, but it leaves `at`, `path`, and the mutual exclusivity of the target parameters unexplained.

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

Purpose3/5

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

The phrase 'the units most like one unit or a text' does communicate a similarity-lookup action, so the core purpose is inferable. But it is buried in domain jargon ('same-role advisor', 'six-channel evidence row', 'the core's order') that obscures what the tool actually returns. It never explicitly distinguishes itself from close siblings like clone, docdup, or check_duplication.

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

Usage Guidelines2/5

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

The only usage signal is 'Advisory — never a verdict', which hints at how to treat the output but not when to call the tool. There is no guidance on choosing this over clone/docdup/check_duplication, and no stated prerequisites or context for when similarity lookup is appropriate.

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