ReadContactTool

class ReadContactTool(context: Context) : McpTool

Reads full details for one contact identified by contact_id (accepts a number or numeric string) via ContactsContract, aggregating name, phones, emails, and postal addresses. Requires READ_CONTACTS; returns an error if the id is missing/non-numeric or no contact matches. Output: id, name, phones (list of {number, type}), emails (list of {address, type}), and addresses (list of formatted-address strings). Phone/email type is mapped to home/mobile/work/other.

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