SetNodeTextTool

class SetNodeTextTool(context: Context) : McpTool

set_node_text — replace the text of an editable node via ACTION_SET_TEXT. Works for most native EditText fields; some apps disable accessibility text-set, in which case the IME tools are the fallback.

Params: required text (the replacement string — never used as a selector here) plus the shared selector, whose substring text matcher is named match_text for this tool instead of text (view_id, class_name, package_name, index are unchanged). At least one of match_text, view_id, class_name, package_name is required. The matched node must report isEditable or the call fails with the short-form node_not_editable. See perform; on success returns success, action = "set_text", and the matched view_id.

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard
open override val annotations: ToolAnnotations
Link copied to clipboard
open override val description: String
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val outputSchema: Map<String, Any>
Link copied to clipboard
open override val parameters: List<ToolParameter>

Functions

Link copied to clipboard
open suspend override fun execute(params: Map<String, Any>): ToolResult