Surface
surfaceShow the public API of a package directory: every exported name, signature, export method, and definition location. Diff against another ref to identify API changes between versions.
Instructions
The public surface of a package directory at a ref: every exported name with its signature, how it is exported and where it is defined. Each language applies its own rule: Python's all, lazy tables and re-export chains; Rust's pub and lib.rs re-exports; TypeScript's index exports; Go's exported identifiers; visibility keywords elsewhere; a namespace or module is looked through. --against REF prints the surface diff; the header states the direction (A → B) and names its parts (added, changed, moved, removed) with line counts; --part ID prints one part alone. Answers: the public API of a package or module; exported names and where each is defined; API changes between two versions. In your shell: sct surface <package-dir> or sct surface <package-dir> --against REF (if sct is not on PATH, "/app/.venv/bin/python" -m scantool.cli replaces sct).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"package_dir": "<package_dir>"
},
"name": "surface"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| part | No | ||
| against | No | ||
| package_dir | Yes | ||
| output_format | No | tree |