search_symbols

[search]

Searches for symbols (types and members) by pattern and returns stable symbol keys for follow-up tool calls.

Try this tool in Playground.

Parameters

NameTypeRequiredDescription
querystringYesSearch pattern. Supports '*' and '?', or plain text for substring match.
kindsstringNoOptional kinds filter (comma-separated): 'Type,Method,Property,Field,Event'.
namespaceFilterstringNoOptional namespace prefix filter (e.g., 'MyApp.Services').
projectNamestringNoOptional project name filter.
pathStylestringNoPath style: 'absolute' (default) or 'relative' (to solution root).
sortBystringNoOptional sort: 'name', 'kind', 'filePath', 'projectName', 'namespace'.
sortOrderstringNoSort order: 'asc' (default) or 'desc'.
skipnumberNoPagination offset. Default is 0.
takenumberNoPagination size. Default is 200.
timeout_msnumberNoTimeout in milliseconds. Use 0 to disable. Default is 30000.

Examples

Search for service types

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_symbols",
    "arguments": {
      "query": "*Service",
      "kinds": "Type"
    }
  }
}
Response
{
  "success": true,
  "data": {
    "query": "*Service",
    "matchCount": 2,
    "paging": {
      "skip": 0,
      "take": 200,
      "returned": 2,
      "total": 2
    },
    "matches": [
      {
        "name": "UserService",
        "fullName": "MyApp.Services.UserService",
        "kind": "Type",
        "containingType": null,
        "namespace": "MyApp.Services",
        "filePath": "/path/to/UserService.cs",
        "lineNumber": 12,
        "symbolKey": "..."
      }
    ]
  },
  "error": null
}

Search methods containing "Login"

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_symbols",
    "arguments": {
      "query": "*Login*",
      "kinds": "Method"
    }
  }
}
Response
{
  "success": true,
  "data": {
    "query": "*Service",
    "matchCount": 2,
    "paging": {
      "skip": 0,
      "take": 200,
      "returned": 2,
      "total": 2
    },
    "matches": [
      {
        "name": "UserService",
        "fullName": "MyApp.Services.UserService",
        "kind": "Type",
        "containingType": null,
        "namespace": "MyApp.Services",
        "filePath": "/path/to/UserService.cs",
        "lineNumber": 12,
        "symbolKey": "..."
      }
    ]
  },
  "error": null
}

Response Notes

Returns matching symbols (with paging) including stable symbol keys