-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathai_tool_schemas.json
More file actions
109 lines (109 loc) · 3.32 KB
/
ai_tool_schemas.json
File metadata and controls
109 lines (109 loc) · 3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
[
{
"tool_name": "assignParcel",
"description": "Assigns a parcel to a truck after validating route, capacity, and uniqueness.",
"method": "POST",
"endpoint": "/api/assignParcel",
"input_schema": {
"type": "object",
"properties": {
"parcelID": {
"type": "string",
"description": "The unique identifier of the parcel (e.g., 'P123'). MUST be an existing ID."
},
"truckID": {
"type": "string",
"description": "The unique identifier of the truck (e.g., 'T456'). MUST be an existing ID."
}
},
"required": [
"parcelID",
"truckID"
]
},
"output_schema": {
"success": {
"message": "Assignment successful"
},
"error": {
"error": "Human-readable error message"
}
},
"rules": [
"Both parcelID and truckID are REQUIRED.",
"Do not allow missing or invented fields."
]
},
{
"tool_name": "getAlerts",
"description": "Fetches all system alerts generated from failed assignments.",
"method": "GET",
"endpoint": "/api/alerts",
"input_schema": {},
"output_schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"alertID": {
"type": "string"
},
"severity": {
"type": "string",
"enum": [
"SL-1",
"SL-2",
"SL-3"
]
},
"message": {
"type": "string"
},
"parcelID": {
"type": [
"string",
"null"
]
},
"truckID": {
"type": [
"string",
"null"
]
},
"timestamp": {
"type": "string",
"format": "date-time"
}
}
}
}
},
{
"tool_name": "getSystemStatus",
"description": "Fetches a summary of the current system state (counts of routes, trucks, parcels, and alerts).",
"method": "GET",
"endpoint": "/api/status",
"input_schema": {},
"output_schema": {
"type": "object",
"properties": {
"totalRoutes": {
"type": "number"
},
"totalTrucks": {
"type": "number"
},
"totalParcels": {
"type": "number"
},
"unassignedParcels": {
"type": "number"
},
"activeAlerts": {
"type": "number"
}
}
}
}
]