Skip to content

Commit d1eced6

Browse files
evantahlerEvan Tahler
andauthored
docs for new phone number contacts tools (#606)
* docs for new phone number contacts tools * save --------- Co-authored-by: Evan Tahler <evan@evan-m5.local>
1 parent 11cce8e commit d1eced6

File tree

5 files changed

+68
-0
lines changed

5 files changed

+68
-0
lines changed

app/en/mcp-servers/productivity/google-contacts/page.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ These tools are currently available in the Arcade Google Contacts MCP Sever.
3737
"GoogleContacts.SearchContactsByName",
3838
"Search the user's contacts in Google Contacts by name.",
3939
],
40+
[
41+
"GoogleContacts.SearchContactsByPhoneNumber",
42+
"Search the user's contacts in Google Contacts by phone number.",
43+
],
4044
[
4145
"GoogleContacts.CreateContact",
4246
"Create a new contact record in Google Contacts.",
@@ -134,6 +138,7 @@ Create a new contact record in Google Contacts.
134138
- **`given_name`** _(string, required)_: The given name of the contact.
135139
- **`family_name`** _(string, optional)_: The optional family name of the contact.
136140
- **`email`** _(string, optional)_: The optional email address of the contact.
141+
- **`phone_number`** _(string, optional)_: The optional phone_number address of the contact.
137142

138143
---
139144

public/examples/integrations/mcp-servers/google/contacts/create_contact_example_call_tool.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const toolInput = {
2222
given_name: "John",
2323
family_name: "Doe",
2424
email: "john.doe@example.com",
25+
phone_number: "+1234567890"
2526
};
2627

2728
const response = await client.tools.execute({

public/examples/integrations/mcp-servers/google/contacts/create_contact_example_call_tool.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"given_name": "John",
2121
"family_name": "Doe",
2222
"email": "john.doe@example.com",
23+
"phone_number": "+1234567890"
2324
}
2425

2526
response = client.tools.execute(
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "{arcade_user_id}";
6+
const TOOL_NAME = "GoogleContacts.SearchContactsByPhoneNumber";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({
10+
tool_name: TOOL_NAME,
11+
user_id: USER_ID,
12+
});
13+
14+
if (authResponse.status !== "completed") {
15+
console.log(`Click this link to authorize: ${authResponse.url}`);
16+
}
17+
18+
// Wait for the authorization to complete
19+
await client.auth.waitForCompletion(authResponse);
20+
21+
const toolInput = {
22+
phone_number: "+1234567890",
23+
limit: 30,
24+
};
25+
26+
const response = await client.tools.execute({
27+
tool_name: TOOL_NAME,
28+
input: toolInput,
29+
user_id: USER_ID,
30+
});
31+
32+
console.log(response);
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from arcadepy import Arcade
2+
3+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
USER_ID = "{arcade_user_id}"
6+
TOOL_NAME = "GoogleContacts.SearchContactsByPhoneNumber"
7+
8+
auth_response = client.tools.authorize(
9+
tool_name=TOOL_NAME,
10+
user_id=USER_ID,
11+
)
12+
13+
if auth_response.status != "completed":
14+
print(f"Click this link to authorize: {auth_response.url}")
15+
16+
# Wait for the authorization to complete
17+
client.auth.wait_for_completion(auth_response)
18+
19+
tool_input = {
20+
"phone_number": "+1234567890",
21+
"limit": 30,
22+
}
23+
24+
response = client.tools.execute(
25+
tool_name=TOOL_NAME,
26+
input=tool_input,
27+
user_id=USER_ID,
28+
)
29+
print(response)

0 commit comments

Comments
 (0)