find_code
[symbols]
Select a file outline, parser search, or exact compiler resolution.
Unreleased read-only preview. Technical reference for agents and client integrators.
Before this call
Use path, limit, and cursor for structure. Use query, optional filters, limit, and cursor for symbols. Use exact query, optional kind, module and scope, limit, and cursor for resolve.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| route | string | Yes | Choose structure, symbols, or resolve. |
| path | string | No | Required for structure. Omit for symbols and resolve. |
| query | string | No | Required for symbols or resolve. Parser symbols use a literal case-sensitive substring. Resolve uses an exact simple or qualified name. |
| kind | string | No | Exact declaration kind. Available for symbols and resolve. |
| file | string | No | Exact contained file path. Only for symbols. |
| module | string | No | Exact imported module identifier. Available for symbols and resolve. |
| scope | string | No | Compiler scope. Only for resolve. |
| limit | number | No | Integer from 1 to 500. Keep the value unchanged during pagination. Default: 100 |
| cursor | string | No | Opaque nextCursor from the same query and generation. Keep all query arguments unchanged. |
Examples
Technical examples for agents and client integrators. Replace paths and opaque keys with returned workspace values.
Illustrative arguments
{
"route": "structure",
"path": "src/main/java/example/OrderService.java"
}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "find_code",
"arguments": {
"route": "structure",
"path": "src/main/java/example/OrderService.java"
}
}
}Response notes
Structure and symbols return parser declarations. Results contain declarations, route, and pagination with nextCursor, truncated, outputLimited, and returned. Follow nextCursor with the same arguments. Keys and cursors belong to one generation. Inspect meta.inventory.complete, inventory.reasons, parserComplete, and pagination before an absence claim. Syntax errors and limits can reduce coverage. The inventory permits 20000 Java files, 1 MiB per file, 128 MiB of source, 64 directory levels, 100000 entries, and 100000 declarations. Local and anonymous declarations are excluded. Resolve returns semantic facts. Inspect meta.inputCoverage, bindingComplete, diagnosticCoverage, and limitations. Parser inventory fields do not describe resolve coverage.