Skip to main content
Glama

Find a Symbol by Name

find_symbol
Read-onlyIdempotent

Find C# types, methods, properties, fields, events, enum members, and operators by name substring. Returns kind, signature, namespace, and project context for code navigation and semantic 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 (a nested type's outer one; a member of a nested type adds 'outerType'), namespace, a signature, 'project' where two hits would read alike, 'builds' (a row only some builds of a multi-targeted project declare: those builds; a type declared otherwise in a build is its own row), 'parameters' (a method row that reads like another: its qualified parameter types), and 'generated' (its document's label) on a generator's declaration; one written into N projects is one row with 'projects'. Use it to locate a symbol before find_usages / call_graph / get_context; every kind listed resolves in find_usages / impact_of_change. Kind order: types, methods, properties (a source-generated one carries '// source-generated' in its signature), fields, events, enum members (signature: the qualified Enum.Member form the fan-in tools take), then user-defined operators + conversions. An operator is found by its METADATA name ('op_Equality', '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'. Order: every exact match (case-insensitive) first, then the handwritten prefix and substring hits, then the generated ones; within each, prefix before substring, then the kind order above. Returns a capped envelope (items/count/totalFound/truncated), max 100 rows - if truncated, the exact and handwritten prefix hits are the ones you got; narrow the query to see the rest. On zero matches: 'nearest', the closest declared name (a likely typo); with no nearest either, a 'note' says a missing name is not a missing feature.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sessionId": "<sessionId>",
      "query": "<query>"
    },
    "name": "find_symbol"
  }
}

Input 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.7/5.0
Behavior5/5

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

Beyond the read-only/idempotent annotations, the description discloses case-insensitive matching, exact ordering, the 100-row cap and truncation behavior, zero-match nearest/note behavior, generated-source notes, operator metadata-name lookup, and special handling for multi-targeted projects and generated declarations.

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?

The description is front-loaded and information-dense, but it is a very long run-on paragraph with heavily nested parenthetical clauses. Most details are useful, yet the structure makes it harder to scan than necessary.

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?

With no output schema, the description carries the full burden of return-value explanation and does so thoroughly: it describes row fields, ordering, envelope shape, truncation behavior, zero-match behavior, and unindexed categories.

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 schema already documents both parameters. The description still adds useful meaning beyond the schema by specifying case-insensitive substring semantics and that operators are queried by metadata name such as op_Equality or op_Implicit.

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 states a specific verb and resource: find symbols by name substring, enumerating exactly which symbol kinds are searchable. It also distinguishes this tool from siblings by positioning it before find_usages, call_graph, and get_context.

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?

It explicitly says to locate a symbol before using find_usages / call_graph / get_context and notes that every kind listed resolves in find_usages / impact_of_change. It also gives clear when-not guidance by listing symbol categories that are not indexed, such as local variables, parameters, labels, and namespaces.

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