1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "lint-spec",
12 "spec": {
13 "tools": [
14 {
15 "name": "read_order",
16 "description": "Read an order by id.",
17 "inputSchema": {
18 "type": "object",
19 "properties": {
20 "id": {
21 "type": "string"
22 }
23 },
24 "required": [
25 "id"
26 ],
27 "additionalProperties": false
28 }
29 }
30 ]
31 },
32 "format": "mcp",
33 "policy": {},
34 "idempotency_key": "store-spec-example-0001",
35 "delete_input_after_read": true
36};
37
38
39const run = await client.actor("analytical_gratefulness/specdelta").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49