Skip to main content
Glama

Find a declaration (LayerMap)

project_search_map
Read-onlyIdempotent

Find where functions, classes, or types are declared by searching names, paths, or docs, so you can trace callers next.

Instructions

Use this to find where a function, method, class or type is declared, by name or by words in its name, path or documentation, before exploring its callers with project_explore_map. Find declarations and files whose names, paths or source documentation match query terms. ANY (default) matches any term, ALL requires every term, LITERAL matches the exact text. Results are ranked by relevance and grouped by file with the declaration name, kind, 1-based line range and matched fields. Zoom into a result with project_explore_map({path,name}) or read its line range in the file. This is not a full-text search and does not prove absence; search the source text itself for exact text. Continue with offset and unchanged conditions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo.
kindsNo
queryYes
offsetNo
matchModeNoANY matches one or more query terms; ALL requires every term; LITERAL matches the complete text literally.ANY
maxResultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavior: results are relevance-ranked, grouped by file, expose declaration name/kind/1-based line range/matched fields, and continuation is via offset with unchanged conditions. The only gap is that no output schema exists to cross-check the described 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?

Dense and front-loaded: purpose, then matching modes, then result shape, then next-step, then limitation. Mild redundancy in restating the ANY/ALL/LITERAL modes that the schema already defines verbatim, and the run of sentences is long, but every sentence carries usable information.

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?

With six parameters and no output schema, the description does the heavy lifting by describing ranked, file-grouped results with declaration metadata and by warning about the absence-proof limitation. It is largely complete, falling short only on the semantics of 'kinds' and 'maxResults'.

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 only 17% (matchMode alone), so the description must carry the rest. It does explain matchMode semantics and offset-based continuation, and implies the query matches name/path/documentation, but 'kinds', 'maxResults' (default 20, max 200) and the 'path' scope default remain undocumented. Partial compensation, not full.

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 ('find where a function, method, class or type is declared') and the search surface (name, path, documentation). It explicitly contrasts itself with project_explore_map (callers) and with full-text search, so an agent can pick it correctly without opening the 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?

Gives the ordering rule ('before exploring its callers with project_explore_map'), the follow-up step ('Zoom into a result with project_explore_map({path,name})'), and an explicit when-not ('This is not a full-text search and does not prove absence; search the source text itself for exact text'). Alternatives and exclusions are both named.

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