Skip to main content
Glama

search_code

Find classes by behavior to trace requirements to code; returns class names, packages, and purposes for identifying relevant implementation components.

Instructions

Find classes by what they do. Returns class names, packages and purposes.

Input Schema

NameRequiredDescriptionDefault
queryYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations at all, the description carries the full behavioral burden and does little: it never says whether matching is keyword or semantic, whether results are ranked or capped, or what happens with zero matches. It only discloses the shape of each result (names, packages, purposes), which the output schema already covers.

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

Conciseness5/5

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

Two short sentences with zero filler, and the capability statement is front-loaded ahead of the return-value note. Nothing here could be cut without losing 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?

The output schema means return values needn't be re-explained, which the description correctly avoids over-elaborating. However, for a search tool with one entirely undocumented parameter and several overlapping siblings, the description leaves search semantics and sibling selection under-specified.

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% for the single required `query` parameter, so the description must compensate. The phrase "by what they do" usefully implies the query is a natural-language description of behavior rather than a class name, but it gives no guidance on phrasing, expected length, or matching strictness.

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?

"Find classes by what they do" states a specific verb (find) and resource (classes) and adds a scoping qualifier — behavior-based rather than name-based lookup. It never names the obvious alternative, read_class, so an agent must infer the split from the sibling list rather than from the description.

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?

There is no explicit when-to-use statement and no alternative is named. A reader can infer that this tool is for discovery when the class name is unknown, but that inference is not stated, and nothing says when to prefer read_class or related_classes instead.

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