ListContactsTool

class ListContactsTool(context: Context) : McpTool

Lists all contacts (name + phone presence only) via ContentResolver on ContactsContract.Contacts, sorted by display name, with cursor-based pagination. Requires READ_CONTACTS. Output: contacts (list of {id, name, has_phone}), plus count, offset, and limit. limit clamps to 1–100 (default 50); offset is non-negative (default 0).

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