get_method_signature
[analysis]
Returns a method signature, parameters, documentation, and location.
Try it locally in the Glider playground
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| methodName | string | No | Method name to analyze. If containingTypeName is omitted, you can pass a fully qualified name like 'Namespace.Type.Method'. Provide this or symbolKey. |
| symbolKey | string | No | A key returned by search_symbols or resolve_symbol. Pass it unchanged. Provide this or methodName. |
| containingTypeName | string | No | Optional containing type name filter. |
| projectName | string | No | Optional project name filter. |
| pathStyle | string | No | Path style: 'absolute' (default) or 'relative' (to solution root). Default: "absolute" |
| responseDetail | string | No | compact returns results and actionable state. full adds diagnostic metadata under responseDiagnostics. Default: "compact" |
Examples
Replace sample paths and symbol keys with values from your workspace.
Get method signature
Arguments
{
"methodName": "GetUserById"
}Full MCP request
Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_method_signature",
"arguments": {
"methodName": "GetUserById"
}
}
}Illustrative response
{
"success": true,
"name": "GetUserById",
"returnType": "User",
"containingType": "UserService",
"filePath": "/path/to/UserService.cs",
"lineNumber": 58,
"parameters": [
{
"name": "userId",
"type": "int",
"defaultValue": null,
"modifiers": []
}
]
}Get signature with fully qualified name
Arguments
{
"methodName": "MyApp.Services.UserService.GetUserById"
}Full MCP request
Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_method_signature",
"arguments": {
"methodName": "MyApp.Services.UserService.GetUserById"
}
}
}Response Notes
Returns a method signature with parameters. Fully qualified method names work when containingTypeName is omitted; a symbolKey selects a specific overload. If a key does not resolve, discover the method again with search_symbols or resolve_symbol. Results use top-level fields with success. Compact is the default; full adds responseDiagnostics. Both modes retain errors, coverage, partial state, and recovery advice.