Skip to main content
Glama

Get Symbol Signature

symbol_signature
Read-onlyIdempotent

Returns a C# symbol's declaration signature, XML summary, declaring file and start line without its body, so you can understand or navigate an API without reading whole source files.

Instructions

Return a symbol's signature(s) WITHOUT the body: the type declaration, the method/operator signature or a member's declaration (property, field, event, enum member - the last as its qualified Enum.Member form), plus its XML doc and its declaring file + start line - for understanding an API without reading the whole file/body, and for navigating straight to it. 'file' is the fragment's OWN file (for a partial type a method points at the file the METHOD lives in, not at the first type fragment); it is omitted only when the snapshot carries no path. 'line' is where the declaration starts, a leading attribute included; it is null for an enum member and a source-generated property (no line fact is modeled for them). Exact (case-sensitive) name match; multiple results for overloads or name collisions; one declaration compiled in two projects is two results, each with its 'project'. A member also takes 'Type.Member' (that type's only), a type a qualified name ('Ns.Type', 'Outer.Inner') and a constructor 'Type.Type' (kind 'constructor', each declared overload; a primary constructor's line is null, a record's is not listed). A user-defined operator matches by its METADATA name ('op_Equality' / 'op_Implicit' / …). Leaner than get_context (which returns the full source). Returns a capped envelope (items/count/totalFound/truncated), max 50. Matching is EXACT, so a typo or case-mismatch returns an empty list rather than an error - when nothing matched, the response therefore carries a 'nearest' suggestion (the closest declared name), which distinguishes 'you spelled it differently' from 'this symbol genuinely has no signature' - and, where the run skipped generated C# under obj/, a 'generatedSourcesNote' naming the third possibility: the declaration exists in code this index never read.

Input Schema

NameRequiredDescriptionDefault
symbolYesThe exact (case-sensitive) type, method, property, field, event, enum-member or operator name (e.g. 'op_Equality'), bare or qualified ('Type.Member', 'Ns.Type'), or 'Type.Type' for a type's constructors.
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.46517
    • changedInput schema / properties / symbol / description
      Previous value: -"The exact (case-sensitive) type, method, property, field, event, enum-member or operator name (e.g. 'op_Equality'), bare or qualified ('Type.Member', 'Ns.Type')."New value: +"The exact (case-sensitive) type, method, property, field, event, enum-member or operator name (e.g. 'op_Equality'), bare or qualified ('Type.Member', 'Ns.Type'), or 'Type.Type' for a type's constructors."
  2. Changed2 schema fields 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."
    • changedInput schema / properties / symbol / description
      Previous value: -"The exact (case-sensitive) type, method, property, field, event, enum-member or operator name (e.g. 'op_Equality')."New value: +"The exact (case-sensitive) type, method, property, field, event, enum-member or operator name (e.g. 'op_Equality'), bare or qualified ('Type.Member', 'Ns.Type')."
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds substantial behavior beyond them: a capped envelope of max 50, exact case-sensitive matching that returns an empty list rather than an error, a 'nearest' suggestion on no-match, and a 'generatedSourcesNote' when generated code was skipped. It also discloses subtle semantics like 'file' pointing at the fragment's own file for partial types and 'line' being null for enum members and source-generated properties.

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 purpose is front-loaded in the first clause, which is good, but the remainder is an unusually long, unstructured run of edge cases crammed into a single dense block. For a 2-parameter tool the volume is high and hard to scan, though most sentences do carry distinct information.

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?

There is no output schema, so the description carries the full burden of explaining returns — and it does: the items/count/totalFound/truncated envelope, the 50 cap, multiple results for overloads/collisions, per-project duplication, and the nearest/generatedSourcesNote fields. An agent has everything needed to call this correctly and interpret results.

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 both parameters are already documented, giving a baseline of 3. The description goes beyond that by specifying operator matching via metadata names ('op_Equality', 'op_Implicit'), constructor form 'Type.Type', qualified names ('Ns.Type', 'Outer.Inner'), and the exactness/case-sensitivity of matching — real added meaning over the schema text.

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 first clause names a specific verb+resource ('Return a symbol's signature(s) WITHOUT the body') and immediately enumerates exactly what forms are returned (type declaration, method/operator signature, member declaration, enum member) plus the attached XML summary and file/line. An agent can distinguish this from get_context and find_symbol without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the intended use case ('for understanding an API without reading the whole file/body, and for navigating straight to it') and explicitly routes away from get_context ('Leaner than get_context (which returns the full source)'). It lacks an explicit when-not-to-use clause (e.g. when you actually need the body, use get_context), so it falls short of a 5.

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