get_occurrences
Find all references or definitions of a symbol in Xcode projects using its USR identifier to support code navigation and refactoring tasks.
Instructions
Get all occurrences of a symbol by its USR.
Args: usr: The USR (Unified Symbol Resolution) of the symbol roles: The roles to search for (must be "reference" or "definition")
Returns: Dict containing all occurrences of the symbol
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"usr": "<usr>",
"roles": "<roles>"
},
"name": "get_occurrences"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| usr | Yes | ||
| roles | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |