outline tool
Use outline to map what files import and define before reading them in full, as
xpd outline does. It returns each item with its kind, signature, source range
and members, and runs no code.
outline(paths=null, options=null)- Changes no file
- A second call with the same arguments changes nothing more
- Stays inside the project
Tags: structure.
Description
Section titled “Description”The server gives the agent this description of the tool.
Read symbols, signatures, imports, members and source ranges without execution.
Arguments
Section titled “Arguments”Type: list of string or null. Optional, default null.
Files or folders inside the project root. Default: the whole root.
options
Section titled “options”Type: object or null. Optional, default null.
The language and items to read, and an extra outline rule file.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
options.language |
string or null | no | null |
Read only the files of this language, such as python. |
options.items |
"auto", "all", "structure", "imports", "exports" |
no | "auto" |
Which top-level items to list. auto is structure for files and exports for folders. |
options.rules |
string or null | no | null |
Project-relative outline rule file. |
Result
Section titled “Result”| Field | Type | Required | Default | Description |
|---|---|---|---|---|
result |
list of any | yes |
Example
Section titled “Example”{"paths":["samples/graph/steps.py"],"options":{"items":"structure"}}The result is a list with one entry for each file. One item of the file is shown, without its
ranges and members, and each "..." stands for the items around it.
[{"path":"samples/graph/steps.py","language":"Python","items":["...",{"name":"totals","symbolType":"function","signature":"def totals(orders: pd.DataFrame) -> pd.DataFrame","astKind":"function_definition","isExported":true},"..."]}]Errors
Section titled “Errors”A path outside the project root fails before xpd runs. A path that cannot be read comes back as a tool error from the binary.