format_code
Format Python code using Pyright's formatter to ensure consistent style and improve readability. Input Python code as a string for automatic formatting.
Instructions
Format Python code.
Formats the given Python code using pyright's formatter.
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": {
"code": "<code>"
},
"name": "format_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Python code as string. | |
| python_path | No | Optional path to Python interpreter. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||