Skip to main content
Glama

search_structural

Find name-based candidates for a symbol's callers, callees, imports, defines, inheritors, or inherits in a Git checkout or indexed directory. Provide repo/cwd; verify paths and source.

Instructions

Find name-based related-symbol candidates, not compiler-verified bindings. For Git checkouts, call resolution prefers matches in the caller file, keeping ties; otherwise it keeps checkout-wide matches. Verify paths and source. Supply 'repo' (absolute checkout/directory path) or 'cwd' (a directory inside it); 'repo' takes precedence. Git worktrees resolve through Git and registered families; directory roots through database registration. A first search can register and index a new linked worktree when its family already permits indexing. Subsequent searches use that checkout's last completed index; incomplete Git operations retain it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoDirectory inside the target checkout or registered directory. Used when 'repo' is absent; no configuration marker is needed.
repoNoAbsolute path of the target checkout/worktree or indexed directory. Optional if 'cwd' is provided.
symbolYes
relationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose real behavior: caller-file preference with tie-keeping, checkout-wide fallback, first-search registration/indexing of linked worktrees, reuse of the last completed index, and retention under incomplete Git operations. It omits return shape, result limits, and error behavior, which keeps it below 5.

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 and every sentence carries substantive information about resolution and indexing. The prose is dense and jargon-heavy with several long compound sentences, so readability suffers slightly, but there is little outright padding.

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

Completeness4/5

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

No output schema and no annotations mean the description must cover purpose, path handling, and indexing lifecycle, which it largely does. It leaves unspecified what a returned candidate looks like, ordering guarantees for results, and how to read the 'verify paths and source' warning operationally.

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 coverage is 50%: cwd and repo are documented in the schema, symbol and relation are not. The description adds genuine meaning for the path pair ('repo' absolute, takes precedence; 'cwd' a directory inside it), but contributes nothing about the required 'symbol' or 'relation' parameters beyond the enum being self-describing.

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 states a specific verb+resource: finding name-based related-symbol candidates via a relation (callers/callees/imports/etc.), and explicitly disclaims compiler-verified bindings. It is meaningfully distinguished from the name search siblings (hybrid/fulltext/semantic) even without naming them. It stops short of naming an alternative, so it is not a 5.

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?

Usage is implied by the resolution rules (Git checkouts vs directory roots) and the 'Verify paths and source' caution, but there is no explicit when-to-use-this-vs-search_hybrid/semantic/fulltext guidance. The agent must infer that this tool is for relation traversal rather than fuzzy/text search, and no exclusions are stated.

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