feat: Add output schema support to MCP tools (#153)
This commit is contained in:
parent
4c3e5e61c7
commit
c0938a19bd
12 changed files with 605 additions and 55 deletions
|
|
@ -5,5 +5,18 @@
|
|||
"text": "{\n \"success\": true,\n \"message\": \"Event \\\"Project Deadline\\\" scheduled successfully for \\\"2024-12-15\\\".\",\n \"event_details\": {\n \"title\": \"Project Deadline\",\n \"date\": \"2024-12-15\",\n \"type\": \"reminder\",\n \"time\": \"All day\",\n \"priority\": \"Normal\",\n \"attendees\": [],\n \"invites_will_be_sent\": false\n }\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"success": true,
|
||||
"message": "Event \"Project Deadline\" scheduled successfully for \"2024-12-15\".",
|
||||
"event_details": {
|
||||
"title": "Project Deadline",
|
||||
"date": "2024-12-15",
|
||||
"type": "reminder",
|
||||
"time": "All day",
|
||||
"priority": "Normal",
|
||||
"attendees": [],
|
||||
"invites_will_be_sent": false
|
||||
}
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,20 @@
|
|||
"text": "{\n \"success\": true,\n \"message\": \"Event \\\"Client Call\\\" scheduled successfully for \\\"2024-12-02\\\".\",\n \"event_details\": {\n \"title\": \"Client Call\",\n \"date\": \"2024-12-02\",\n \"type\": \"call\",\n \"time\": \"14:30\",\n \"priority\": \"Normal\",\n \"attendees\": [\n \"client@example.com\"\n ],\n \"invites_will_be_sent\": false\n }\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"success": true,
|
||||
"message": "Event \"Client Call\" scheduled successfully for \"2024-12-02\".",
|
||||
"event_details": {
|
||||
"title": "Client Call",
|
||||
"date": "2024-12-02",
|
||||
"type": "call",
|
||||
"time": "14:30",
|
||||
"priority": "Normal",
|
||||
"attendees": [
|
||||
"client@example.com"
|
||||
],
|
||||
"invites_will_be_sent": false
|
||||
}
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,20 @@
|
|||
"text": "{\n \"success\": true,\n \"message\": \"Event \\\"Office Party\\\" scheduled successfully for \\\"2024-12-20\\\".\",\n \"event_details\": {\n \"title\": \"Office Party\",\n \"date\": \"2024-12-20\",\n \"type\": \"other\",\n \"time\": \"18:00\",\n \"priority\": \"Normal\",\n \"attendees\": [\n \"team@company.com\"\n ],\n \"invites_will_be_sent\": true\n }\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"success": true,
|
||||
"message": "Event \"Office Party\" scheduled successfully for \"2024-12-20\".",
|
||||
"event_details": {
|
||||
"title": "Office Party",
|
||||
"date": "2024-12-20",
|
||||
"type": "other",
|
||||
"time": "18:00",
|
||||
"priority": "Normal",
|
||||
"attendees": [
|
||||
"team@company.com"
|
||||
],
|
||||
"invites_will_be_sent": true
|
||||
}
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,21 @@
|
|||
"text": "{\n \"success\": true,\n \"message\": \"Event \\\"Team Standup\\\" scheduled successfully for \\\"2024-12-01\\\".\",\n \"event_details\": {\n \"title\": \"Team Standup\",\n \"date\": \"2024-12-01\",\n \"type\": \"meeting\",\n \"time\": \"09:00\",\n \"priority\": \"Normal\",\n \"attendees\": [\n \"alice@example.com\",\n \"bob@example.com\"\n ],\n \"invites_will_be_sent\": true\n }\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"success": true,
|
||||
"message": "Event \"Team Standup\" scheduled successfully for \"2024-12-01\".",
|
||||
"event_details": {
|
||||
"title": "Team Standup",
|
||||
"date": "2024-12-01",
|
||||
"type": "meeting",
|
||||
"time": "09:00",
|
||||
"priority": "Normal",
|
||||
"attendees": [
|
||||
"alice@example.com",
|
||||
"bob@example.com"
|
||||
],
|
||||
"invites_will_be_sent": true
|
||||
}
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,9 @@
|
|||
"text": "{\n \"success\": true,\n \"message_sent\": \"Welcome, Alice! Welcome to our platform!\"\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"success": true,
|
||||
"message_sent": "Welcome, Alice! Welcome to our platform!"
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,9 @@
|
|||
"text": "{\n \"success\": true,\n \"message\": \"Test tool without params\"\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"success": true,
|
||||
"message": "Test tool without params"
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,11 @@
|
|||
"text": "{\n \"result\": 50,\n \"operation\": \"10 multiply 5\",\n \"precision\": 2,\n \"within_bounds\": true\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"result": 50,
|
||||
"operation": "10 multiply 5",
|
||||
"precision": 2,
|
||||
"within_bounds": true
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,11 @@
|
|||
"text": "{\n \"original\": \"Hello World Test\",\n \"formatted\": \"HELLO WORLD TEST\",\n \"length\": 16,\n \"format_applied\": \"uppercase\"\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"original": "Hello World Test",
|
||||
"formatted": "HELLO WORLD TEST",
|
||||
"length": 16,
|
||||
"format_applied": "uppercase"
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,30 @@
|
|||
"text": "{\n \"success\": true,\n \"config\": {\n \"app\": {\n \"name\": \"TestApp\",\n \"env\": \"development\",\n \"debug\": true,\n \"url\": \"https://example.com\",\n \"port\": 8080\n },\n \"generated_at\": \"2025-01-01T00:00:00+00:00\",\n \"version\": \"1.0.0\",\n \"features\": {\n \"logging\": true,\n \"caching\": false,\n \"analytics\": false,\n \"rate_limiting\": false\n }\n },\n \"validation\": {\n \"app_name_valid\": true,\n \"url_valid\": true,\n \"port_in_range\": true\n }\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"success": true,
|
||||
"config": {
|
||||
"app": {
|
||||
"name": "TestApp",
|
||||
"env": "development",
|
||||
"debug": true,
|
||||
"url": "https://example.com",
|
||||
"port": 8080
|
||||
},
|
||||
"generated_at": "2025-01-01T00:00:00+00:00",
|
||||
"version": "1.0.0",
|
||||
"features": {
|
||||
"logging": true,
|
||||
"caching": false,
|
||||
"analytics": false,
|
||||
"rate_limiting": false
|
||||
}
|
||||
},
|
||||
"validation": {
|
||||
"app_name_valid": true,
|
||||
"url_valid": true,
|
||||
"port_in_range": true
|
||||
}
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,27 @@
|
|||
"text": "{\n \"original_count\": 4,\n \"processed_count\": 4,\n \"action\": \"sort\",\n \"original\": [\n \"apple\",\n \"banana\",\n \"cherry\",\n \"date\"\n ],\n \"processed\": [\n \"apple\",\n \"banana\",\n \"cherry\",\n \"date\"\n ],\n \"stats\": {\n \"average_length\": 5.25,\n \"shortest\": 4,\n \"longest\": 6\n }\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"original_count": 4,
|
||||
"processed_count": 4,
|
||||
"action": "sort",
|
||||
"original": [
|
||||
"apple",
|
||||
"banana",
|
||||
"cherry",
|
||||
"date"
|
||||
],
|
||||
"processed": [
|
||||
"apple",
|
||||
"banana",
|
||||
"cherry",
|
||||
"date"
|
||||
],
|
||||
"stats": {
|
||||
"average_length": 5.25,
|
||||
"shortest": 4,
|
||||
"longest": 6
|
||||
}
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,27 @@
|
|||
"text": "{\n \"success\": true,\n \"event\": {\n \"id\": \"event_test123456789\",\n \"title\": \"Team Meeting\",\n \"start_time\": \"2025-01-01T00:00:00+00:00\",\n \"end_time\": \"2025-01-01T00:00:00+00:00\",\n \"duration_hours\": 1.5,\n \"priority\": \"high\",\n \"attendees\": [\n \"alice@example.com\",\n \"bob@example.com\"\n ],\n \"created_at\": \"2025-01-01T00:00:00+00:00\"\n },\n \"info\": {\n \"attendee_count\": 2,\n \"is_all_day\": false,\n \"is_future\": false,\n \"timezone_note\": \"Times are in UTC\"\n }\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"success": true,
|
||||
"event": {
|
||||
"id": "event_test123456789",
|
||||
"title": "Team Meeting",
|
||||
"start_time": "2025-01-01T00:00:00+00:00",
|
||||
"end_time": "2025-01-01T00:00:00+00:00",
|
||||
"duration_hours": 1.5,
|
||||
"priority": "high",
|
||||
"attendees": [
|
||||
"alice@example.com",
|
||||
"bob@example.com"
|
||||
],
|
||||
"created_at": "2025-01-01T00:00:00+00:00"
|
||||
},
|
||||
"info": {
|
||||
"attendee_count": 2,
|
||||
"is_all_day": false,
|
||||
"is_future": false,
|
||||
"timezone_note": "Times are in UTC"
|
||||
}
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,17 @@
|
|||
"text": "{\n \"valid\": true,\n \"profile\": {\n \"name\": \"John Doe\",\n \"email\": \"john@example.com\",\n \"age\": 30,\n \"role\": \"user\"\n },\n \"errors\": [],\n \"warnings\": [],\n \"processed_at\": \"2025-01-01 00:00:00\"\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"valid": true,
|
||||
"profile": {
|
||||
"name": "John Doe",
|
||||
"email": "john@example.com",
|
||||
"age": 30,
|
||||
"role": "user"
|
||||
},
|
||||
"errors": [],
|
||||
"warnings": [],
|
||||
"processed_at": "2025-01-01 00:00:00"
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue