Find a Symbol by Name
find_symbolLocate 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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | A substring of the symbol name to search for (type, method, property, field, event, enum member or operator). | |
| sessionId | Yes | The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use. |