Browse documentation

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

NameTypeRequiredDescription
routestringYesChoose structure, symbols, or resolve.
pathstringNoRequired for structure. Omit for symbols and resolve.
querystringNoRequired for symbols or resolve. Parser symbols use a literal case-sensitive substring. Resolve uses an exact simple or qualified name.
kindstringNoExact declaration kind. Available for symbols and resolve.
filestringNoExact contained file path. Only for symbols.
modulestringNoExact imported module identifier. Available for symbols and resolve.
scopestringNoCompiler scope. Only for resolve.
limitnumberNoInteger from 1 to 500. Keep the value unchanged during pagination. Default: 100
cursorstringNoOpaque 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

Arguments
{
  "route": "structure",
  "path": "src/main/java/example/OrderService.java"
}
Full MCP request
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.