find_types

[search]

Finds types by name pattern with wildcard support. Use '*' to match any characters and '?' to match a single character. Returns type names, kinds, file paths, and line numbers.

Parameters

NameTypeRequiredDescription
patternstringYesThe search pattern. Supports wildcards: '*' matches any characters (e.g., '*Manager'), '?' matches a single character (e.g., 'I?Service').
projectNamestringNoOptional project name to limit the search scope.

Examples

Find all service types

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "find_types",
    "arguments": {
      "pattern": "*Service"
    }
  }
}
Response
{
  "success": true,
  "data": {
    "pattern": "*Service",
    "matchCount": 2,
    "matches": [
      {
        "typeName": "UserService",
        "fullName": "MyApp.Services.UserService",
        "kind": "Class",
        "accessibility": "Public",
        "filePath": "/path/to/UserService.cs",
        "lineNumber": 12,
        "projectName": "MyApp"
      }
    ]
  },
  "error": null
}

Find interfaces starting with I

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "find_types",
    "arguments": {
      "pattern": "I*"
    }
  }
}
Response
{
  "success": true,
  "data": {
    "pattern": "*Service",
    "matchCount": 2,
    "matches": [
      {
        "typeName": "UserService",
        "fullName": "MyApp.Services.UserService",
        "kind": "Class",
        "accessibility": "Public",
        "filePath": "/path/to/UserService.cs",
        "lineNumber": 12,
        "projectName": "MyApp"
      }
    ]
  },
  "error": null
}

Find types in specific project

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "find_types",
    "arguments": {
      "pattern": "*Repository",
      "projectName": "DataLayer"
    }
  }
}
Response
{
  "success": true,
  "data": {
    "pattern": "*Service",
    "matchCount": 2,
    "matches": [
      {
        "typeName": "UserService",
        "fullName": "MyApp.Services.UserService",
        "kind": "Class",
        "accessibility": "Public",
        "filePath": "/path/to/UserService.cs",
        "lineNumber": 12,
        "projectName": "MyApp"
      }
    ]
  },
  "error": null
}

Response

Returns list of matching types with names, kinds, paths, and line numbers

Go to Playground to test this tool interactively.