Skip to content

pull_members_up

MCP tools › Code insight and refactoring

Pull Members Up for the class at (or around) a position of a JavaScript or TypeScript file: moves members to the end of the direct supertype named target (may be left out when there is only one), or adds their signature when it is an interface or abstract is true (an abstract class). dry_run defaults to true and returns the edits per file; dry_run=false writes them. Refuses with the reasons when it cannot.

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

Capabilitycode.pull_members_up
AreaCode insight and refactoring
Accesschanges files
Reachesprocess
Rightswrite
Dry rundry_run, on unless the call turns it off

Arguments

ArgumentTypeDescription
pathrequiredstringWorkspace-relative file path.
linerequiredinteger0-based line.minimum 0
characterrequiredinteger0-based character in the line (Unicode scalar values).minimum 0
targetstringThe direct supertype to pull into; may be left out when there is only one.
membersrequiredarray of stringNames of the chosen members.
abstractbooleanDeclare them abstract in the target and keep the implementations (default false).
dry_runbooleanOnly report the edits (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 pull_members_up '{"path":"<string>","line":1,"character":1,"members":[]}'
Input schema as JSON
{
"type": "object",
"required": [
"path",
"line",
"character",
"members"
],
"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
},
"target": {
"description": "The direct supertype to pull into; may be left out when there is only one.",
"type": [
"string",
"null"
]
},
"members": {
"description": "Names of the chosen members.",
"type": "array",
"items": {
"type": "string"
}
},
"abstract": {
"description": "Declare them abstract in the target and keep the implementations (default false).",
"type": [
"boolean",
"null"
]
},
"dry_run": {
"description": "Only report the edits (default true).",
"type": [
"boolean",
"null"
]
}
}
}