Code Formatter
code-formatterFormat source code using Prettier. Supports JS, TS, CSS, HTML, JSON, YAML, Markdown, GraphQL.
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": "code-formatter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Source code to format | |
| semi | No | Add semicolons (JS/TS) | |
| useTabs | No | Use tabs instead of spaces | |
| language | No | Programming language | typescript |
| tabWidth | No | Tab width in spaces | |
| printWidth | No | Line width before wrapping | |
| singleQuote | No | Use single quotes (JS/TS) | |
| trailingComma | No | Trailing comma style | es5 |