clang_format
Format C/C++ files using clang-format. Select a style (file, LLVM, Google, etc.) and use dry-run to preview changes without modifying.
Instructions
Format a C/C++ file using clang-format.
Args: file_path: Path to the C/C++ source file. style: Formatting style (file, llvm, google, chromium, mozilla, webkit). dry_run: If True, show diff without modifying file. If False, format in place.
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": {
"file_path": "<file_path>"
},
"name": "clang_format"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | file | |
| dry_run | No | ||
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |