Skip to main content
Glama

Find a Symbol by Name

find_symbol
Read-onlyIdempotent

Locate C# symbols by name substring: types, methods, properties, fields, events, enum members, operators. Returns kind, signature, declaring type, namespace, project for usage analysis.

Instructions

Find types, methods, properties, fields, events, enum members and operators whose name contains the query (case-insensitive). Returns each match with kind ('type'/'method'/'property'/'field'/'event'/'enum_member'/'operator'), name, declaring type, namespace, a signature, and 'project' where two hits would read alike. Use this to locate a symbol before calling find_usages / call_graph / get_context - every kind listed here is one find_usages / impact_of_change resolve, an operator by its metadata name with its uses (a == b, a cast, an implicit conversion) as the fan-in. Types are listed first, then methods, then properties (handwritten + source-generated - a generated property carries a '// source-generated' note in its signature), then fields, events and enum members (an enum member's signature is its qualified Enum.Member form, the string the fan-in tools take), then user-defined operators + conversions. A user-defined operator is found by its METADATA name (query 'op_Equality' / 'op_Addition' / 'op_Implicit'; 'op_' lists them all). Not indexed, so an empty answer is expected for them: local variables, parameters, labels, namespaces, and C# generated into obj/ that carries real declarations (protobuf/Grpc.Tools, T4, Refit), and a Blazor component written only in a .razor file - a zero-hit answer says which in 'generatedSourcesNote'. Results are ranked by match quality FIRST - exact name, then case-insensitive exact, then prefix, then substring - and only within one rank by the kind order above; an exact match is therefore never hidden by the cap behind weaker substring hits (a symbol named 'Type' used to sit at position 1026 of 1102). Returns a capped envelope (items/count/totalFound/truncated), max 100 - if truncated, the exact/prefix matches are the ones you got; narrow the query (a longer substring) to see the weaker rest. If the query matches nothing, the response carries a 'nearest' suggestion - the closest declared symbol name (a likely typo/case-mismatch); a matched symbol never carries one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesA substring of the symbol name to search for (type, method, property, field, event, enum member or operator).
sessionIdYesThe session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.46513
    • changedInput schema / properties / sessionId / description
      Previous value: -"The session_id returned by analyze_solution."New value: +"The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use."
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description still adds substantial behavioral context: what is deliberately not indexed (locals, parameters, labels, namespaces, generated obj/ declarations, .razor-only components) surfaced via 'generatedSourcesNote', the ranking algorithm (exact > case-insensitive > prefix > substring, then kind order), the 100-item cap and truncation semantics, and the 'nearest' suggestion on zero hits. These are genuinely beyond what the annotations provide, though the density makes some details hard to parse.

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?

Purpose is front-loaded in sentence one, but the body is a single very dense paragraph that mixes ranking rules, kind ordering, non-indexed cases, truncation and typo handling. Anecdotes like the 'Type at position 1026 of 1102' history and the parenthetical asides inflate length without helping selection or invocation.

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?

No output schema exists, yet the description fully describes the return shape (items/count/totalFound/truncated, max 100), per-item fields (kind, name, declaring type, namespace, signature, project), and edge-case payloads ('generatedSourcesNote', 'nearest'). Nothing an agent needs to interpret or act on the response is missing.

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 the baseline is 3. The description nonetheless adds meaning beyond the schema: case-insensitive substring semantics, the operator metadata-name convention ('op_Equality', 'op_Implicit', 'op_' lists all), and what an enum member signature looks like. That is real added value over the two documented params.

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+resource ('Find types, methods, properties, fields, events, enum members and operators whose name contains the query') and enumerates exactly what the search covers. It is clearly distinguishable from siblings like find_usages, call_graph and get_context, which it explicitly positions itself as a precursor to.

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 an explicit when-to-use rule ('locate a symbol before calling find_usages / call_graph / get_context') and explains the handoff mechanism (every kind listed is one those tools resolve; operators by metadata name). It also tells the agent what to do when results are truncated or empty, which is actionable routing.

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