Skip to content

Commit fde80e0

Browse files
committed
[Examples] Send an object carrying data in the complex-tool-schema interop case
1 parent 1c37b0f commit fde80e0

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎tests/Interop/Server/Http/HttpComplexToolSchemaTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public static function provideMethods(): array
8686
'date' => '2024-12-10',
8787
'type' => 'meeting',
8888
'labels' => ['team' => 'platform'],
89-
'metadata' => ['source' => 'crm', 'tags' => [], 'custom' => new \stdClass()],
89+
'metadata' => ['source' => 'crm', 'tags' => [], 'rooms' => (object) ['0' => 'Berlin', '1' => 'Hamburg']],
9090
],
9191
],
9292
'testName' => 'schedule_event_labels_and_metadata',

‎tests/Interop/Server/Http/snapshots/HttpComplexToolSchemaTest-tools_call-schedule_event_labels_and_metadata.json‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"content": [
33
{
44
"type": "text",
5-
"text": "{\n \"success\": true,\n \"message\": \"Event \\\"Release Planning\\\" scheduled successfully for \\\"2024-12-10\\\".\",\n \"event_details\": {\n \"title\": \"Release Planning\",\n \"date\": \"2024-12-10\",\n \"type\": \"meeting\",\n \"time\": \"All day\",\n \"priority\": \"Normal\",\n \"attendees\": [],\n \"invites_will_be_sent\": false,\n \"labels\": {\n \"team\": \"platform\"\n },\n \"metadata\": {\n \"source\": \"crm\",\n \"tags\": [],\n \"custom\": {}\n }\n }\n}"
5+
"text": "{\n \"success\": true,\n \"message\": \"Event \\\"Release Planning\\\" scheduled successfully for \\\"2024-12-10\\\".\",\n \"event_details\": {\n \"title\": \"Release Planning\",\n \"date\": \"2024-12-10\",\n \"type\": \"meeting\",\n \"time\": \"All day\",\n \"priority\": \"Normal\",\n \"attendees\": [],\n \"invites_will_be_sent\": false,\n \"labels\": {\n \"team\": \"platform\"\n },\n \"metadata\": {\n \"source\": \"crm\",\n \"tags\": [],\n \"rooms\": {\n \"0\": \"Berlin\",\n \"1\": \"Hamburg\"\n }\n }\n }\n}"
66
}
77
],
88
"structuredContent": {
@@ -22,7 +22,10 @@
2222
"metadata": {
2323
"source": "crm",
2424
"tags": [],
25-
"custom": {}
25+
"rooms": {
26+
"0": "Berlin",
27+
"1": "Hamburg"
28+
}
2629
}
2730
}
2831
},

0 commit comments

Comments
 (0)