Skip to content

create_test

MCP tools › Code insight and refactoring

Test… of Generate for a Java or Kotlin class: its test class, the project's own (found by name as goto_test does) or a new one in the test root (src/test/<lang> beside src/main/<lang>, test/ beside src/, else beside the class) with the class's package. Returns path, exists, class, text (of a new class) and created. dry_run defaults to true; dry_run=false writes a new class, never over a file.

Its results carry text from files: the client is told to treat that as data, never as instructions.

Capabilitycode.create_test
AreaCode insight and refactoring
Accesschanges files
Reaches—
Rightswrite
Dry rundry_run, on unless the call turns it off

Arguments

ArgumentTypeDescription
pathrequiredstringWorkspace-relative path of the Java or Kotlin class.
dry_runbooleanOnly report where the test is and what a new one holds (default true).

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.

Terminal window
ferris-idea call ~/my-project create_test '{"path":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Workspace-relative path of the Java or Kotlin class.",
"type": "string"
},
"dry_run": {
"description": "Only report where the test is and what a new one holds (default true).",
"type": [
"boolean",
"null"
]
}
}
}