search_symbol
Find symbol definition locations by name. Supports exact match, prefix, and fuzzy search.
Input schema
{
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "Symbol name to search for."
},
"kind": {
"type": "string",
"enum": ["function", "method", "class", "struct", "enum", "interface", "module", "variable", "any"],
"default": "any"
},
"match": {
"type": "string",
"enum": ["exact", "prefix", "fuzzy"],
"default": "prefix"
},
"language": {
"type": "string",
"enum": ["typescript", "rust", "python", "go", "any"],
"default": "any"
},
"repo": { "type": "string" },
"max_results": { "type": "integer", "default": 20, "maximum": 100 }
}
}
Output schema
{
"type": "object",
"properties": {
"query": { "type": "string" },
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"kind": { "type": "string" },
"path": { "type": "string" },
"line": { "type": "integer" },
"language": { "type": "string" },
"signature":{ "type": "string" },
"repo": { "type": "string" }
}
}
},
"total": { "type": "integer" }
}
}
Example
Request:
{
"name": "PaymentService",
"kind": "class",
"match": "exact"
}
Response:
{
"query": "PaymentService",
"results": [
{
"name": "PaymentService",
"kind": "class",
"path": "src/services/PaymentService.ts",
"line": 12,
"language": "typescript",
"signature": "class PaymentService",
"repo": "/Users/me/my-project"
}
],
"total": 1
}
Fuzzy search:
{ "name": "pymnt", "match": "fuzzy" }
Returns PaymentService, PaymentController, PaymentJob, etc., ranked by fuzzy score.
When to use
- Navigation: jump to the definition of a symbol you know by name.
- Discovery: find all classes named
*Serviceby using prefix match with"name": ""and"kind": "class". - Cross-language: set
"language": "any"to find a symbol name across TypeScript and Rust simultaneously.