GetTextAroundCursorTool

Reads the text surrounding the cursor via InputConnection.getTextBeforeCursor / getTextAfterCursor. Requires the droid-mcp IME to be active with an editor focused, else imeNotActiveError. Password fields (TYPE_TEXT_VARIATION_PASSWORD) and FLAG_SECURE windows are not delivered plaintext by the platform, so those return empty/masked content. Output: before and after strings (empty if the editor has no more text in that direction).

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 parameters: List<ToolParameter>

Functions

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