KosmoKrator

communication

Google Contacts CLI for AI Agents

Use the Google Contacts CLI from KosmoKrator to call Google Contacts tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 7 read 0 write OAuth browser flow auth

Google Contacts CLI Setup

Google Contacts can be configured headlessly with `kosmokrator integrations:configure google_contacts`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure google_contacts --set access_token="$GOOGLE_CONTACTS_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor google_contacts --json
kosmokrator integrations:status --json

Credentials

Authentication type: OAuth browser flow oauth2_authorization_code. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token GOOGLE_CONTACTS_ACCESS_TOKEN OAuth token oauth yes Google Account

Call Google Contacts Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call google_contacts.google_contacts_create '{
  "name": "example_name",
  "email": "example_email",
  "phone": "example_phone",
  "company": "example_company",
  "title": "example_title",
  "address": "example_address",
  "notes": "example_notes"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:google_contacts google_contacts_create '{
  "name": "example_name",
  "email": "example_email",
  "phone": "example_phone",
  "company": "example_company",
  "title": "example_title",
  "address": "example_address",
  "notes": "example_notes"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs google_contacts --json
kosmo integrations:docs google_contacts.google_contacts_create --json
kosmo integrations:schema google_contacts.google_contacts_create --json
kosmo integrations:search "Google Contacts" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Google Contacts.

google_contacts.google_contacts_create

Read read

Create a new Google Contact with name, email, phone, company, title, address, and notes.

Parameters
name, email, phone, company, title, address, notes

Generic CLI call

kosmo integrations:call google_contacts.google_contacts_create '{"name":"example_name","email":"example_email","phone":"example_phone","company":"example_company","title":"example_title","address":"example_address","notes":"example_notes"}' --json

Provider shortcut

kosmo integrations:google_contacts google_contacts_create '{"name":"example_name","email":"example_email","phone":"example_phone","company":"example_company","title":"example_title","address":"example_address","notes":"example_notes"}' --json

google_contacts.google_contacts_delete

Read read

Permanently delete a Google Contact by resource name.

Parameters
resource_name

Generic CLI call

kosmo integrations:call google_contacts.google_contacts_delete '{"resource_name":"example_resource_name"}' --json

Provider shortcut

kosmo integrations:google_contacts google_contacts_delete '{"resource_name":"example_resource_name"}' --json

google_contacts.google_contacts_get

Read read

Get full details of a single Google Contact including notes, websites, and group memberships.

Parameters
resource_name

Generic CLI call

kosmo integrations:call google_contacts.google_contacts_get '{"resource_name":"example_resource_name"}' --json

Provider shortcut

kosmo integrations:google_contacts google_contacts_get '{"resource_name":"example_resource_name"}' --json

google_contacts.google_contacts_list

Read read

List all Google Contacts sorted by first name with pagination.

Parameters
max_results, page_token

Generic CLI call

kosmo integrations:call google_contacts.google_contacts_list '{"max_results":1,"page_token":"example_page_token"}' --json

Provider shortcut

kosmo integrations:google_contacts google_contacts_list '{"max_results":1,"page_token":"example_page_token"}' --json

google_contacts.google_contacts_list_groups

Read read

List all Google Contact groups/labels (e.g., Friends, Family, custom groups) with member counts.

Parameters
none

Generic CLI call

kosmo integrations:call google_contacts.google_contacts_list_groups '{}' --json

Provider shortcut

kosmo integrations:google_contacts google_contacts_list_groups '{}' --json

google_contacts.google_contacts_search_contacts

Read read

Fuzzy search Google Contacts by name, email, or phone. Matches partial strings (e.g., "john", "acme.com", "555"). Use this to look up contacts before sending emails with gmail_send.

Parameters
query, max_results

Generic CLI call

kosmo integrations:call google_contacts.google_contacts_search_contacts '{"query":"example_query","max_results":1}' --json

Provider shortcut

kosmo integrations:google_contacts google_contacts_search_contacts '{"query":"example_query","max_results":1}' --json

google_contacts.google_contacts_update

Read read

Update an existing Google Contact. Unspecified fields are preserved. Email, phone, and address are added alongside existing values; name, company, title, and notes are replaced.

Parameters
resource_name, name, email, phone, company, title, address, notes

Generic CLI call

kosmo integrations:call google_contacts.google_contacts_update '{"resource_name":"example_resource_name","name":"example_name","email":"example_email","phone":"example_phone","company":"example_company","title":"example_title","address":"example_address","notes":"example_notes"}' --json

Provider shortcut

kosmo integrations:google_contacts google_contacts_update '{"resource_name":"example_resource_name","name":"example_name","email":"example_email","phone":"example_phone","company":"example_company","title":"example_title","address":"example_address","notes":"example_notes"}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

google_contacts.google_contacts_create

Create a new Google Contact with name, email, phone, company, title, address, and notes.

Operation
Read read
Schema command
kosmo integrations:schema google_contacts.google_contacts_create --json
ParameterTypeRequiredDescription
name string yes Full name (e.g., "John Doe").
email string no Email address.
phone string no Phone number (e.g., "+1-555-0123").
company string no Company/organization name.
title string no Job title.
address string no Full address (e.g., "123 Main St, Springfield, IL 62701").
notes string no Notes or biography for the contact.

google_contacts.google_contacts_delete

Permanently delete a Google Contact by resource name.

Operation
Read read
Schema command
kosmo integrations:schema google_contacts.google_contacts_delete --json
ParameterTypeRequiredDescription
resource_name string yes Contact resource name (e.g., "people/c1234567890").

google_contacts.google_contacts_get

Get full details of a single Google Contact including notes, websites, and group memberships.

Operation
Read read
Schema command
kosmo integrations:schema google_contacts.google_contacts_get --json
ParameterTypeRequiredDescription
resource_name string yes Contact resource name (e.g., "people/c1234567890").

google_contacts.google_contacts_list

List all Google Contacts sorted by first name with pagination.

Operation
Read read
Schema command
kosmo integrations:schema google_contacts.google_contacts_list --json
ParameterTypeRequiredDescription
max_results integer no Max results to return (default: 20, max: 100).
page_token string no Pagination token from previous response.

google_contacts.google_contacts_list_groups

List all Google Contact groups/labels (e.g., Friends, Family, custom groups) with member counts.

Operation
Read read
Schema command
kosmo integrations:schema google_contacts.google_contacts_list_groups --json
ParameterTypeRequiredDescription
No parameters.

google_contacts.google_contacts_search_contacts

Fuzzy search Google Contacts by name, email, or phone. Matches partial strings (e.g., "john", "acme.com", "555"). Use this to look up contacts before sending emails with gmail_send.

Operation
Read read
Schema command
kosmo integrations:schema google_contacts.google_contacts_search_contacts --json
ParameterTypeRequiredDescription
query string yes Search query (name, email, or phone).
max_results integer no Max results to return (default: 10, max: 30).

google_contacts.google_contacts_update

Update an existing Google Contact. Unspecified fields are preserved. Email, phone, and address are added alongside existing values; name, company, title, and notes are replaced.

Operation
Read read
Schema command
kosmo integrations:schema google_contacts.google_contacts_update --json
ParameterTypeRequiredDescription
resource_name string yes Contact resource name (e.g., "people/c1234567890").
name string no Full name (e.g., "John Doe"). Replaces existing name.
email string no Email address. Added alongside existing emails.
phone string no Phone number (e.g., "+1-555-0123"). Added alongside existing phones.
company string no Company/organization name.
title string no Job title.
address string no Full address (e.g., "123 Main St, Springfield, IL 62701").
notes string no Notes or biography for the contact.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.