py_source
Retrieve the source code of an installed Python function, class, or module, truncated to a character limit, so agents can inspect actual implementations instead of guessing.
Instructions
Return the source code of an installed Python function/class/module (truncated to max_chars).
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": {
"target": "<target>"
},
"name": "py_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | ||
| max_chars | No | ||
| project_dir | No | ||
| include_project | No |