Format code for automation platforms
format_codeFormat and lint JavaScript, Python, or HubL code for Zapier, n8n, Pipedream, Make, or HubSpot. Wraps the source in each platform's runtime shell before formatting so top-level await, bare return, and injected globals don't break the formatter. Returns formatted code plus lint diagnostics.
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>",
"platform": "<platform>"
},
"name": "format_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Source code to format (≤50KB). | |
| language | No | Defaults to javascript. typescript parses TypeScript on pipedream and reads as javascript elsewhere. zapier, n8n, pipedream, make, and hubspot support python; hubl does not. | |
| platform | Yes | Target automation platform. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | Yes | Why the format failed, or null on success. | |
| diagnostics | Yes | Lint findings with line and column. | |
| formatted_code | No | The formatted source. Absent when the input was refused. | |
| lint_unavailable | No | Present only when the linter could not run, so an empty diagnostics list is unknown, not clean. | |
| diagnostics_frame | No | Whether diagnostic positions refer to the submitted code or the formatted code. |