Skip to content

Commit f45c39c

Browse files
authored
Exa.ai Starter Tools (#547)
* Exa.ai starter tools * merge main * update description
1 parent f0b88e1 commit f45c39c

File tree

93 files changed

+4381
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+4381
-2
lines changed

app/en/mcp-servers/search/exa-api/page.mdx

Lines changed: 1519 additions & 0 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
"homepage": "https://arcade.dev/",
3333
"dependencies": {
34-
"@arcadeai/design-system": "^3.13.0",
34+
"@arcadeai/design-system": "^3.14.0",
3535
"@next/third-parties": "16.0.1",
3636
"@ory/client": "1.22.7",
3737
"@theguild/remark-mermaid": "0.3.0",

pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
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 = "ExaApi.CancelEnrichmentProcess";
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+
"enrichment_id": "enrich_12345",
23+
"webset_id": "webset_67890"
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(JSON.stringify(response.output.value, null, 2));
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "{arcade_user_id}"
7+
TOOL_NAME = "ExaApi.CancelEnrichmentProcess"
8+
9+
auth_response = client.tools.authorize(
10+
tool_name=TOOL_NAME,
11+
user_id=USER_ID,
12+
)
13+
14+
if auth_response.status != "completed":
15+
print(f"Click this link to authorize: {auth_response.url}")
16+
17+
# Wait for the authorization to complete
18+
client.auth.wait_for_completion(auth_response)
19+
20+
tool_input = {
21+
'enrichment_id': 'enrich_12345', 'webset_id': 'webset_67890'
22+
}
23+
24+
response = client.tools.execute(
25+
tool_name=TOOL_NAME,
26+
input=tool_input,
27+
user_id=USER_ID,
28+
)
29+
print(json.dumps(response.output.value, indent=2))
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 = "ExaApi.CancelRunningSearch";
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+
"search_id": "abc123",
23+
"webset_id": "webset456"
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(JSON.stringify(response.output.value, null, 2));
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "{arcade_user_id}"
7+
TOOL_NAME = "ExaApi.CancelRunningSearch"
8+
9+
auth_response = client.tools.authorize(
10+
tool_name=TOOL_NAME,
11+
user_id=USER_ID,
12+
)
13+
14+
if auth_response.status != "completed":
15+
print(f"Click this link to authorize: {auth_response.url}")
16+
17+
# Wait for the authorization to complete
18+
client.auth.wait_for_completion(auth_response)
19+
20+
tool_input = {
21+
'search_id': 'abc123', 'webset_id': 'webset456'
22+
}
23+
24+
response = client.tools.execute(
25+
tool_name=TOOL_NAME,
26+
input=tool_input,
27+
user_id=USER_ID,
28+
)
29+
print(json.dumps(response.output.value, indent=2))
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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 = "ExaApi.CancelWebsetOperations";
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+
"webset_identifier": "webset_12345"
23+
};
24+
25+
const response = await client.tools.execute({
26+
tool_name: TOOL_NAME,
27+
input: toolInput,
28+
user_id: USER_ID,
29+
});
30+
31+
console.log(JSON.stringify(response.output.value, null, 2));
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "{arcade_user_id}"
7+
TOOL_NAME = "ExaApi.CancelWebsetOperations"
8+
9+
auth_response = client.tools.authorize(
10+
tool_name=TOOL_NAME,
11+
user_id=USER_ID,
12+
)
13+
14+
if auth_response.status != "completed":
15+
print(f"Click this link to authorize: {auth_response.url}")
16+
17+
# Wait for the authorization to complete
18+
client.auth.wait_for_completion(auth_response)
19+
20+
tool_input = {
21+
'webset_identifier': 'webset_12345'
22+
}
23+
24+
response = client.tools.execute(
25+
tool_name=TOOL_NAME,
26+
input=tool_input,
27+
user_id=USER_ID,
28+
)
29+
print(json.dumps(response.output.value, indent=2))
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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 = "ExaApi.CreateDataImport";
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+
"data_import_details": {
23+
"enrichment_fields": [
24+
"name",
25+
"email"
26+
],
27+
"searchable_fields": [
28+
"address",
29+
"phone"
30+
],
31+
"exclude_duplicates": true
32+
}
33+
};
34+
35+
const response = await client.tools.execute({
36+
tool_name: TOOL_NAME,
37+
input: toolInput,
38+
user_id: USER_ID,
39+
});
40+
41+
console.log(JSON.stringify(response.output.value, null, 2));

0 commit comments

Comments
 (0)