Browse documentation

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

NameTypeRequiredDescription
querystringYesSearch pattern. Supports '*' and '?', or plain text for substring match.
kindsstringNoOptional 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.
namespaceFilterstringNoOptional namespace prefix filter (e.g., 'MyApp.Services').
projectNamestringNoOptional project name filter.
sourceOnlybooleanNoOnly search symbols with source in solution (excludes external assemblies/packages). Default is true. Default: true
accessibilitystringNoFilter by accessibility: 'Public', 'Internal', 'Private', 'Protected', 'ProtectedOrInternal', 'ProtectedAndInternal'.
pathStylestringNoPath style: 'absolute' (default) or 'relative' (to solution root). Default: "absolute"
sortBystringNoOptional sort: 'name', 'kind', 'filePath', 'projectName', 'namespace'.
sortOrderstringNoSort order: 'asc' (default) or 'desc'. Default: "asc"
skipnumberNoPagination offset. Default is 0. Default: 0
takenumberNoPagination size. Default is 200. Default: 200
responseDetailstringNocompact 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

Arguments
{
  "query": "*Service",
  "kinds": "Type"
}
Full MCP request
Full MCP request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_symbols",
    "arguments": {
      "query": "*Service",
      "kinds": "Type"
    }
  }
}
Illustrative response
{
  "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"

Arguments
{
  "query": "*Login*",
  "kinds": "Method"
}
Full MCP request
Full MCP request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_symbols",
    "arguments": {
      "query": "*Login*",
      "kinds": "Method"
    }
  }
}

Search public types only

Arguments
{
  "query": "*Manager",
  "kinds": "Type",
  "accessibility": "Public"
}
Full MCP request
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

Arguments
{
  "query": "Task",
  "kinds": "Type",
  "sourceOnly": false
}
Full MCP request
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.