Skip to main content
Glama
carterlasalle

mac-messages-mcp

tool_check_contacts

Retrieve and display contacts from your macOS address book through the Messages app interface.

Instructions

List available contacts in the address book.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for 'tool_check_contacts'. Registered with @mcp.tool() decorator. Lists contacts from AddressBook using get_cached_contacts(), shows count and samples first 10.
    @mcp.tool() def tool_check_contacts(ctx: Context) -> str: """ List available contacts in the address book. """ logger.info("Checking available contacts") try: contacts = get_cached_contacts() if not contacts: return "No contacts found in AddressBook." contact_count = len(contacts) sample_entries = list(contacts.items())[:10] # Show first 10 contacts formatted_samples = [f"{number} -> {name}" for number, name in sample_entries] result = [ f"Found {contact_count} contacts in AddressBook.", "Sample entries (first 10):", *formatted_samples ] return "\n".join(result) except Exception as e: logger.error(f"Error checking contacts: {str(e)}") return f"Error checking contacts: {str(e)}"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/carterlasalle/mac_messages_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server