Tool reference · Contacts
search_contacts
Find contacts
Users with access to a groupread-only
POST /v1/actions/search_contacts · MCP tool search_contacts
Finds contacts the user sees, across their groups or in one group or directory, by name, field, note or group name, or lists them all. Leave out query to list everyone you see, and group and directory to look everywhere: filter by a group only when the person names one, since a role like a tennis pro may be in any group. query matches by word, in names, the fields and notes you see and group names, best matches first, each with what it matched (matched) where its name doesn’t say and the phone numbers and emails you see (fields), so a number needs no get_contact, and only ever what you see; with a group or directory, outside_filter lists matches as good outside it. Owners also get contacts in no group, with no groups listed: removed from their last group, they wait in their directory’s Missing Group, which only owners see, and ungrouped lists only those; manage_groups add_contacts puts one back in a group. recently_deleted lists the contacts in Recently Deleted (30 days) you could see before they were deleted, with when each is deleted for good, the groups it left and whether you can undo the delete; manage_groups add_contacts undoes one into a group.
Parameters
| Parameter | Type | Required | Limits | What |
|---|---|---|---|---|
query | string | optional | ||
directory | string | optional | ||
group | string | optional | ||
ungrouped | boolean | optional | ||
recently_deleted | boolean | optional | ||
missing | "photo" | "mobile" | "phone" | "email" | "address" | "birthday" | "company" | "title" | "url" | "note"[] | optional | Only contacts with none of these that you see, like ["photo"] for every contact without a photo, or ["mobile", "email"] for those with neither: photo, mobile, phone (any number), email, address, birthday, company, title, url or note. A value hidden from you counts as missing. | |
has | "photo" | "mobile" | "phone" | "email" | "address" | "birthday" | "company" | "title" | "url" | "note"[] | optional | Only contacts with every one of these that you see, in the same words as missing. | |
duplicates | boolean | optional | With directory: lists pairs of contacts there that may be the same person, each with its reasons (same_email, same_phone, same_name), from the values you see, up to 500 pairs a page. merge_contacts merges a pair. | |
limit | integer | optional | 1–500, default 25 | |
cursor | string | optional |
Who can use it
Users get it once they have access to a group, and each call is checked against that access. A person’s tool list only includes it when they can use it, and clients like ChatGPT see the same list.
Annotated read-only, so clients like ChatGPT can call it without asking.
Errors
Errors carry a stable code and a message written for people. See errors and their status codes.
curl https://api.withopenbook.com/v1/actions/search_contacts \
-H "Authorization: Bearer $OPENBOOK_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "coach",
"directory": "0b8e2f4a-6c1d-4e7b-9a3f-5d2c8e1b7f60"
}'{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_contacts",
"arguments": {
"query": "coach",
"directory": "0b8e2f4a-6c1d-4e7b-9a3f-5d2c8e1b7f60"
}
}
}