Browse documentation

get_structure

[symbols]

List parser-backed declarations in one Java file.

Unreleased read-only preview. Technical reference for agents and client integrators.

Before this call

Reads require a loaded workspace. Java 21 syntax provides declaration evidence, not compiler bindings.

Parameters

NameTypeRequiredDescription
pathstringYesContained workspace file path. Use a nonblank string of at most 4096 characters.
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
{
  "path": "src/main/java/example/OrderService.java"
}
Full MCP request
Full MCP request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_structure",
    "arguments": {
      "path": "src/main/java/example/OrderService.java"
    }
  }
}

Response notes

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.