check_grammar
MCP tools › Code insight and refactoring
Check English prose such as a commit message or Markdown: repeated words, a/an, and typos with suggestions, using the dictionaries from Settings (default en_US) or dictionary. With one built-in dictionary, spellings of the other English variant and mixed spellings are reported too. With context commit_message it checks only while commit messages are in the grammar scope (else checked false). Project-ignored texts and the project dictionary are respected. Returns each problem with rule, 0-based byte start and end, text, message, replacement and, for spelling, kind.
Its results carry text from files: the client is told to treat that as data, never as instructions.
| Capability | code.check_grammar |
|---|---|
| Area | Code insight and refactoring |
| Access | reads only |
| Reaches | — |
| Rights | none |
| Dry run | none |
Arguments
| Argument | Type | Description |
|---|---|---|
textrequired | string | Text to check, e.g. a commit message. |
markdown | boolean | Treat the text as Markdown (code and links are left out; default false). |
dictionary | string | Dictionaries to check typos with instead of the ones chosen in Settings: one code or
several separated by commas, e.g. en_GB or en_GB,en_US (SPEC-0159 v4); each built in
or downloaded. |
context | string | What the text is (SPEC-0155 v8 behaviour 14): commit_message follows the switch for
commit messages of the grammar scope; default a plain text, always checked. |
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 check_grammar '{"text":"<string>"}'Input schema as JSON
{ "type": "object", "required": [ "text" ], "properties": { "text": { "description": "Text to check, e.g. a commit message.", "type": "string" }, "markdown": { "description": "Treat the text as Markdown (code and links are left out; default false).", "type": [ "boolean", "null" ] }, "dictionary": { "description": "Dictionaries to check typos with instead of the ones chosen in Settings: one code or\nseveral separated by commas, e.g. `en_GB` or `en_GB,en_US` (SPEC-0159 v4); each built in\nor downloaded.", "type": [ "string", "null" ] }, "context": { "description": "What the text is (SPEC-0155 v8 behaviour 14): `commit_message` follows the switch for\ncommit messages of the grammar scope; default a plain text, always checked.", "type": [ "string", "null" ] } }}