Skip to content

complete_code

MCP tools › Code insight and refactoring

Completion proposals at a position of a workspace file from its language server: label, kind, detail and insert text. Narrowed by the identifier left of the position as the editor's list is, and paged (total, items, next_offset); file and project declarations rank first, marked with declared_in. details resolves declaration, parameters and type. Also without a language server: HTML class/id values propose stylesheet classes and ids; Java ${…} placeholders and @ConfigProperty names propose configuration keys with their values (secrets masked); application properties/YAML files propose keys the code reads but the file lacks.

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

Capabilitycode.complete_code
AreaCode insight and refactoring
Accessreads only
Reachesprocess
Rightsnone
Dry runnone

Arguments

ArgumentTypeDescription
pathrequiredstringWorkspace-relative file path.
linerequiredinteger0-based line.minimum 0
characterrequiredinteger0-based character in the line (Unicode scalar values).minimum 0
limitintegerMost items returned on this page (default 50, at most 500).minimum 0
offsetintegerMatching items to skip, for the next page: the next_offset of the previous answer (SPEC-0072 v18 behaviour 55; default 0).minimum 0
detailsbooleanResolve the returned items that came without signature and type, filling them in from the server's detail (SPEC-0072 v8 behaviour 28; TypeScript, Python). Left out, Python files are resolved for up to 500 ms and get the origin of members (SPEC-0072 v10 behaviour 46); true resolves every returned item, false none.

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 complete_code '{"path":"<string>","line":1,"character":1}'
Input schema as JSON
{
"type": "object",
"required": [
"path",
"line",
"character"
],
"properties": {
"path": {
"description": "Workspace-relative file path.",
"type": "string"
},
"line": {
"description": "0-based line.",
"type": "integer",
"minimum": 0
},
"character": {
"description": "0-based character in the line (Unicode scalar values).",
"type": "integer",
"minimum": 0
},
"limit": {
"description": "Most items returned on this page (default 50, at most 500).",
"type": [
"integer",
"null"
],
"minimum": 0
},
"offset": {
"description": "Matching items to skip, for the next page: the `next_offset` of the previous answer\n(`SPEC-0072` v18 behaviour 55; default 0).",
"type": [
"integer",
"null"
],
"minimum": 0
},
"details": {
"description": "Resolve the returned items that came without signature and type, filling them in from\nthe server's detail (`SPEC-0072` v8 behaviour 28; TypeScript, Python). Left out, Python\nfiles are resolved for up to 500 ms and get the `origin` of members (`SPEC-0072` v10\nbehaviour 46); `true` resolves every returned item, `false` none.",
"type": [
"boolean",
"null"
]
}
}
}