prettier_file
MCP tools › Code insight and refactoring
Format a file with the project's own Prettier (node_modules/.bin/prettier in or above its package, inside the workspace, with the project's configuration; nothing is downloaded). dry_run defaults to true and returns whether it changes and the formatted text; dry_run=false writes it, refusing if the file changed meanwhile.
Its results carry text from files, process: the client is told to treat that as data, never as instructions.
| Capability | code.prettier_file |
|---|---|
| Area | Code insight and refactoring |
| Access | changes files |
| Reaches | process |
| Rights | write, trusted-project |
| Dry run | dry_run, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
pathrequired | string | Workspace-relative .java or .kt file (optimize_imports: also a Python, JavaScript,
TypeScript, Vue or Svelte file). |
dry_run | boolean | Only report the change (default true; optimize_imports only). |
Call it from a shell
ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.
ferris-idea call ~/my-project prettier_file '{"path":"<string>"}'Input schema as JSON
{ "type": "object", "required": [ "path" ], "properties": { "path": { "description": "Workspace-relative `.java` or `.kt` file (`optimize_imports`: also a Python, JavaScript,\nTypeScript, Vue or Svelte file).", "type": "string" }, "dry_run": { "description": "Only report the change (default true; `optimize_imports` only).", "type": [ "boolean", "null" ] } }}