format_file
Auto-format Fortran files in-place to enforce modern indentation and spacing using fprettify.
Instructions
Auto-formats a local Fortran file in-place using fprettify to enforce modern indentation and spacing.
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": "format_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the Fortran file. | |
| indent | No | Relative indentation width (default: 3). | |
| line_length | No | Column after which a line should end (default: 132). | |
| whitespace | No | Preset (0-4) for the amount of whitespace (default: 2). | |
| strict_indent | No | Strictly impose indentation even for nested loops (default: False). | |
| enable_decl | No | Enable whitespace formatting of declarations (default: False). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |