search_symbols
[symbols]
Searches symbol index by name pattern (* and ? wildcards). Full-featured: namespace/accessibility filters, sorting, paging. Use for exploration or filtered/sorted results. Returns stable symbolKeys.
Try it locally in the Glider playground
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search pattern. Supports '*' and '?', or plain text for substring match. |
| kinds | string | No | Optional kinds filter (comma-separated). Type, Class, Interface, Struct, Enum, Delegate, Method, Property, Field, Event, Namespace. Type means any named type; the rest match the kind a result reports. |
| namespaceFilter | string | No | Optional namespace prefix filter (e.g., 'MyApp.Services'). |
| projectName | string | No | Optional project name filter. |
| sourceOnly | boolean | No | Only search symbols with source in solution (excludes external assemblies/packages). Default is true. Default: true |
| accessibility | string | No | Filter by accessibility: 'Public', 'Internal', 'Private', 'Protected', 'ProtectedOrInternal', 'ProtectedAndInternal'. |
| pathStyle | string | No | Path style: 'absolute' (default) or 'relative' (to solution root). Default: "absolute" |
| sortBy | string | No | Optional sort: 'name', 'kind', 'filePath', 'projectName', 'namespace'. |
| sortOrder | string | No | Sort order: 'asc' (default) or 'desc'. Default: "asc" |
| skip | number | No | Pagination offset. Default is 0. Default: 0 |
| take | number | No | Pagination size. Default is 200. Default: 200 |
| 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.
Search for service types
{
"query": "*Service",
"kinds": "Type"
}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_symbols",
"arguments": {
"query": "*Service",
"kinds": "Type"
}
}
}{
"success": true,
"paging": {
"total": 2
},
"matches": [
{
"name": "UserService",
"fullName": "MyApp.Services.UserService",
"kind": "Type",
"namespace": "MyApp.Services",
"filePath": "/path/to/UserService.cs",
"lineNumber": 12,
"symbolKey": "...",
"projectName": "MyApp",
"accessibility": "Public"
}
]
}Search methods containing "Login"
{
"query": "*Login*",
"kinds": "Method"
}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_symbols",
"arguments": {
"query": "*Login*",
"kinds": "Method"
}
}
}Search public types only
{
"query": "*Manager",
"kinds": "Type",
"accessibility": "Public"
}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_symbols",
"arguments": {
"query": "*Manager",
"kinds": "Type",
"accessibility": "Public"
}
}
}Include external assemblies
{
"query": "Task",
"kinds": "Type",
"sourceOnly": false
}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_symbols",
"arguments": {
"query": "Task",
"kinds": "Type",
"sourceOnly": false
}
}
}Response Notes
Returns matching symbols with paging and opaque symbol keys. The server response limit also bounds the page. paging.truncatedForSize reports a page cut short to fit. Continue from paging.nextSkip to retain all results. Zero matches are a valid empty answer, with success=true and paging.total 0. Source-only searches stay source-only, including empty results. Set sourceOnly=false to search referenced assemblies explicitly. Retain the query and applicable filters. The equivalent find_code call uses intent=symbol and scope.includeExternal=true. scope.mode is required: use solution, or project with projectName. Use direct search_symbols to retain namespace and accessibility filters. Empty pages provide guidance without requiring a returned symbolKey. Results use top-level fields with success. Compact is the default; full adds responseDiagnostics. Both modes retain errors, coverage, partial state, and recovery advice.