get_structure

[analysis]

Returns a compact import, export, declaration, and member outline for a JS/TS source file.

Why this tool exists

Agents need enough file and API context to act without dumping entire source files into the prompt.

How it helps the agent

The model can read bounded source windows, outlines, and export surfaces before choosing the next specific tool.

Try it locally in the TGlider playground

Parameters

NameTypeRequiredDescription
filePathstringYesWorkspace-relative or absolute file path.
skipnumberNoNumber of matching results to skip.
takenumberNoMaximum number of matching results to return.

Examples

Inspect file outline before reading source

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_structure",
    "arguments": {
      "filePath": "src/app.ts"
    }
  }
}

Response Notes

Returns imports, exports, declarations, member spans, symbol keys, and diagnostics summary.

↑/↓ NavigateEnter OpenSpace Expand