format_code
Reformat C source code by re-indenting based on brace depth, removing trailing whitespace, and collapsing blank lines. Returns consistently formatted code.
Instructions
Reformat C source: re-indent by brace depth, tidy trailing whitespace, and collapse blank-line runs. Dependency-free; returns the formatted code.
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 | C source code. | |
| indent | No | Spaces per level (default 4). |