productivity
Google Contacts CLI for Coding Agents
Use the Google Contacts CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write OAuth browser flow auth
Google Contacts CLI for Coding Agents
Let coding agents discover schemas and execute integration functions through CLI commands or MCP.
Use this pattern when another coding agent needs exact commands and schema discovery. The Google Contacts CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Google Contacts CLI for Coding Agents
kosmokrator integrations:configure google_contacts --set access_token="$GOOGLE_CONTACTS_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call google_contacts.google_contacts_list_connections '{"pageSize":1,"pageToken":"example_pageToken","sortOrder":"example_sortOrder","syncToken":"example_syncToken"}' --json Discovery Before Execution
Agents and scripts can inspect Google Contacts docs and schemas before choosing a function.
kosmo integrations:docs google_contacts --json
kosmo integrations:docs google_contacts.google_contacts_list_connections --json
kosmo integrations:schema google_contacts.google_contacts_list_connections --json
kosmo integrations:search "Google Contacts" --json
kosmo integrations:list --json Useful Google Contacts CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
google_contacts.google_contacts_list_connections | Read | pageSize, pageToken, sortOrder, syncToken | List contacts (connections) from the authenticated user's Google Contacts. Returns names, emails, phone numbers, biographies, organizations, and photos. Supports pagination and incremental sync. |
google_contacts.google_contacts_get_connection | Read | resourceName, personFields | Get detailed information about a specific contact by resource name (e.g., "people/c123456789"). Returns names, emails, phone numbers, biographies, organizations, and photos. |
google_contacts.google_contacts_create_contact | Write | givenName, familyName, emailAddresses, phoneNumbers, biography | Create a new contact in Google Contacts. Provide at least a name. You can also add email addresses, phone numbers, and a biography (notes). |
google_contacts.google_contacts_list_contact_groups | Read | pageSize, pageToken, syncToken | List all contact groups in the user's Google Contacts. Includes system groups (e.g., "My Contacts", "Starred") and user-created groups. Returns group name, type, and member count. |
google_contacts.google_contacts_get_contact_group | Read | resourceName | Get details of a specific contact group by resource name (e.g., "contactGroups/myContacts"). Returns the group name, type, member count, and member resource names. |
google_contacts.google_contacts_list_other_contacts | Read | pageSize, pageToken, syncToken | List "Other Contacts" — people the user has interacted with (e.g., via email) but hasn't added to their contacts. Returns names, email addresses, and phone numbers. |
google_contacts.google_contacts_get_current_user | Read | none | Get the authenticated user's own Google profile information — display name, email addresses, and profile photo. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.