Skip to main content
Glama

find

Locate definitions of functions, classes, and symbols across your codebase by name, without grepping.

Instructions

Locate a DEFINITION by name across a directory — "where is X defined?" without grepping. Finds functions, methods, classes, AND non-callable top-level symbols: const/let/var bindings, type aliases, interfaces, and enums (a codebase's source-of-truth often lives in export const …). For text inside markdown docs use search; for who USES a symbol use references. Returns JSON {query, path, matches[{file, name, kind, line, signature, parent}], filesScanned, totalSupportedFiles, truncated, skipped?}. kind is function|method|arrow|getter|setter|class|const|let|var|type|interface|enum|variable. Matching is case-insensitive substring by default; exact:true for exact-name. Unsearchable files are listed in skipped with the reason. Caps: scans up to 300 files, returns up to 100 matches (truncated:true = more exist). Definitions only, not call sites. Languages: TS/TSX/JS/JSX/Python. lens is a navigation map over code and docs: use it to LOCATE things, then Read the actual source/section before judging or modifying it. A signature is not the body; an outline is not the section.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesSymbol name (function/method/class/const/type/enum/…). Substring match unless exact:true.
pathNoDirectory (or single file) to search. Default "." (whole workspace).
exactNoExact, case-sensitive match instead of case-insensitive substring (default false).
Behavior5/5

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

No annotations are provided, so the description carries full behavioral disclosure burden. It thoroughly details return format (JSON with specific fields), matching behavior (case-insensitive substring, exact option), limits (300 files, 100 matches, truncated flag), that it only finds definitions (not call sites), languages supported, and handling of unsearchable files. This is exceptionally transparent.

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?

The description is lengthy but every sentence is informative. It is front-loaded with the core purpose and then systematically details behavior, parameters, output, and limitations. While slightly verbose, it is efficiently structured for clarity and completeness.

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

Completeness5/5

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

Given the tool's complexity (3 parameters, no output schema), the description is fully complete. It explains the return value structure, field meanings, kind enum, limits, and edge cases (skipped files, truncation). No gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds significant meaning: explains the exact parameter behavior (case-sensitive, exact match), default path, and the output structure including the 'kind' enum. It also clarifies that matching is substring by default. This adds value beyond the schema, justifying a 4.

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?

The description clearly states the tool's purpose: locating definitions by name. It explicitly lists what it finds (functions, methods, classes, non-callable symbols like const/let/var/type/interface/enum) and distinguishes from siblings (search for text in docs, references for usage). This is a specific verb+resource with clear differentiation.

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?

The description provides explicit when-to-use guidance: 'where is X defined?' and 'Locate a DEFINITION by name'. It also gives explicit alternatives: 'For text inside markdown docs use search; for who USES a symbol use references.' This clearly defines context and exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/segentic-lab/lens-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server