Skip to main content
Glama

Get Symbol Signature

symbol_signature
Read-onlyIdempotent

Retrieve a C# symbol's declaration signature, XML summary, declaring file and start line without its body to understand an API and navigate to it; supports exact names, overloads and partial types.

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 - to understand an API without reading the body, and to navigate to it. 'file' is the fragment's OWN file (a partial type's method: the METHOD's, not the first fragment's), solution-relative as in find_usages; it is omitted only when the snapshot carries no path. A declaration a source generator wrote adds 'generated', its generated document's label; its 'file' is that label's path, not on disk. '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, or one type a generator wrote into each, is two results, each with its 'project'. A member also takes 'Type.Member' (that type's only, else a 'note' names its owners), 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; on a type that declares none the list is empty and a 'note' says which constructor the type has implicitly, with no 'nearest'). A user-defined operator matches by its METADATA name ('op_Equality', 'op_Implicit'). Returns a capped envelope (items/count/totalFound/truncated), max 50. Matching is EXACT: a typo or case-mismatch returns an empty list (not an error) that carries 'nearest' (the closest declared name: you spelled it differently) and, where the run skipped generated C# under obj/, a 'generatedSourcesNote' (the declaration exists in code this index never read).

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>",
      "symbol": "<symbol>"
    },
    "name": "symbol_signature"
  }
}

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

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

Annotations already declare readOnly/idempotent/closed-world, and the description adds substantial behavior beyond them: exact case-sensitive matching that returns an empty list rather than an error, a 'nearest' hint, a 'generatedSourcesNote' when obj/ output was skipped, a capped envelope (max 50, truncated flag), and per-result 'project' duplication across projects. Null-line cases for enum members, source-generated properties and primary constructors are spelled out explicitly.

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 key statement is front-loaded, but the remainder is one very long semicolon-chained paragraph mixing return shape, matching rules, generator caveats and edge cases. Content earns its place, yet structure (bullets or separate sentences) would materially improve scannability.

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?

Despite having no output schema, the description fully specifies the envelope (items/count/totalFound/truncated, max 50), multi-result behavior for overloads and cross-project duplication, and the null-field edge cases. An agent has everything needed to call it and interpret the response.

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, but the description adds real meaning about how 'symbol' resolves: bare vs 'Type.Member' vs 'Ns.Type' vs 'Outer.Inner' vs 'Type.Type' for constructors, and the metadata-name rule for operators ('op_Equality'). It also clarifies that 'file' is the fragment's own file and solution-relative.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource plus an explicit scope boundary: 'Return a symbol's signature(s) WITHOUT the body', then enumerates what is returned (type declaration, method/operator signature, member declaration, XML summary, file + start line). This effectively distinguishes it from body-reading or explanation tools, though it never names a sibling such as explain_symbol outright.

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?

Gives clear use contexts: 'to understand an API without reading the body, and to navigate to it'. It also references find_usages for the path convention, implying the relationship between the two. No explicit when-not-to-use or named alternative for the deeper explanation case, so it stops 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.