[Server] Feat: Add comprehensive HTTP inspector tests with improved framework (#125)
* feat: add comprehensive HTTP inspector tests and improve test framework * chore: remove debug flag from server configuration
This commit is contained in:
parent
ca18caf29d
commit
757b959bfd
35 changed files with 1877 additions and 189 deletions
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"prompts": []
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"resources": [
|
||||
{
|
||||
"name": "priority_config_discovered",
|
||||
"uri": "config://priority",
|
||||
"description": "A resource discovered via attributes."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"contents": [
|
||||
{
|
||||
"uri": "config://priority",
|
||||
"mimeType": "text/plain",
|
||||
"text": "Discovered Priority Config: Low"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"resourceTemplates": []
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "System status: OK (discovered)"
|
||||
}
|
||||
],
|
||||
"isError": false
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Hello HTTP Test User, from manual registration!"
|
||||
}
|
||||
],
|
||||
"isError": false
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"tools": [
|
||||
{
|
||||
"name": "manualGreeter",
|
||||
"description": "A manually registered tool.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"user": {
|
||||
"type": "string",
|
||||
"description": "the user to greet"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"user"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "discovered_status_check",
|
||||
"description": "A tool discovered via attributes.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"prompts": []
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"resources": []
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"resourceTemplates": []
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"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}"
|
||||
}
|
||||
],
|
||||
"isError": false
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"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}"
|
||||
}
|
||||
],
|
||||
"isError": false
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"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}"
|
||||
}
|
||||
],
|
||||
"isError": false
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"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}"
|
||||
}
|
||||
],
|
||||
"isError": false
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"tools": [
|
||||
{
|
||||
"name": "schedule_event",
|
||||
"description": "Schedules a new event.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"description": "the title of the event"
|
||||
},
|
||||
"date": {
|
||||
"type": "string",
|
||||
"description": "the date of the event (YYYY-MM-DD)"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "the type of event",
|
||||
"enum": [
|
||||
"meeting",
|
||||
"reminder",
|
||||
"call",
|
||||
"other"
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
],
|
||||
"description": "the time of the event (HH:MM), optional",
|
||||
"default": null
|
||||
},
|
||||
"priority": {
|
||||
"type": "integer",
|
||||
"description": "The priority of the event. Defaults to Normal.",
|
||||
"default": 1,
|
||||
"enum": [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
]
|
||||
},
|
||||
"attendees": {
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"description": "an optional list of attendee email addresses",
|
||||
"default": null
|
||||
},
|
||||
"sendInvites": {
|
||||
"type": "boolean",
|
||||
"description": "send calendar invites to attendees? Defaults to true if attendees are provided",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"date",
|
||||
"type"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": {
|
||||
"type": "text",
|
||||
"text": "Write a short, formal biography for Alice (Role: admin, Email: alice@example.com). Highlight their role within the system."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"prompts": [
|
||||
{
|
||||
"name": "generate_bio_prompt",
|
||||
"description": "Generates a prompt to write a bio for a user.",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "userId",
|
||||
"description": "the user ID to generate the bio for",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "tone",
|
||||
"description": "Desired tone (e.g., 'formal', 'casual').",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"resources": [
|
||||
{
|
||||
"name": "system_status",
|
||||
"uri": "system://status",
|
||||
"description": "Current system status and runtime information",
|
||||
"mimeType": "application/json"
|
||||
},
|
||||
{
|
||||
"name": "user_id_list",
|
||||
"uri": "user://list/ids",
|
||||
"description": "Provides a list of all available user IDs.",
|
||||
"mimeType": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"contents": [
|
||||
{
|
||||
"uri": "user://list/ids",
|
||||
"mimeType": "application/json",
|
||||
"text": "[\n 101,\n 102,\n 103\n]"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"contents": [
|
||||
{
|
||||
"uri": "user://101/profile",
|
||||
"mimeType": "application/json",
|
||||
"text": "{\n \"name\": \"Alice\",\n \"email\": \"alice@example.com\",\n \"role\": \"admin\"\n}"
|
||||
}
|
||||
]
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue