SendIntentTool

class SendIntentTool(context: Context) : McpTool

Fires an Android activity intent restricted to an allowlist of safe actions (VIEW, DIAL, SEND, SENDTO, CHOOSER, SEARCH, WEB_SEARCH, EDIT) — non-allowlisted actions are rejected. Picker actions (PICK, GET_CONTENT, OPEN_DOCUMENT, CREATE_DOCUMENT) are deliberately not allowed: they only make sense with startActivityForResult, and this tool never reads a result. Supports data URI, type, package_name, and extras (coerced to string extras), always with FLAG_ACTIVITY_NEW_TASK. No permissions.

A data URI must use a scheme on IntentGuards.ALLOWED_SCHEMES, else uri_scheme_not_allowed. On API 29+ the host must be visible or hold SYSTEM_ALERT_WINDOW, else background_activity_launch_blocked.

Output: success, action, data, package.

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