python_outline
Extract a structural outline from Python files—imports, classes, functions, docstrings—to simplify code review, navigation, and documentation.
Instructions
Returns an outline for each Python file: imports, classes, functions, docstrings.
Agent usage guidelines: - Use this tool when you need to understand the structure of Python code files, such as for code review, navigation, or documentation generation. - Use when you need to extract or display the list of imports, classes, functions, and their docstrings from Python files. - Do not use for non-Python files or for reading file contents in detail.
Path requirements: - Paths must not contain URL-encoding (e.g., '%'). - Paths must be absolute. - Paths must exist on disk. Example paths: - Windows: "C:\Users\User\project\main.py" - Linux: "/home/user/project/main.py"
Args: paths (list[str]): List of absolute paths to Python files. output_format (str | None): Output format ('json' or 'markdown'). Defaults to server setting (markdown by default). Returns: dict | str: Outline for each file in the requested format.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | ||
| output_format | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |