feat: Add output schema support to MCP tools (#153)
This commit is contained in:
parent
4c3e5e61c7
commit
c0938a19bd
8 changed files with 605 additions and 55 deletions
|
|
@ -5,5 +5,12 @@
|
|||
"text": "{\n \"id\": 4,\n \"userId\": \"alice\",\n \"description\": \"Complete the project documentation\",\n \"completed\": false,\n \"createdAt\": \"2025-01-01T00:00:00+00:00\"\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"id": 4,
|
||||
"userId": "alice",
|
||||
"description": "Complete the project documentation",
|
||||
"completed": false,
|
||||
"createdAt": "2025-01-01T00:00:00+00:00"
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
}
|
||||
|
|
@ -5,5 +5,9 @@
|
|||
"text": "{\n \"success\": true,\n \"message\": \"Task 1 completed.\"\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"success": true,
|
||||
"message": "Task 1 completed."
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,9 @@
|
|||
"text": "{\n \"success\": true,\n \"message\": \"Precision updated to 3.\"\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
"success": true,
|
||||
"message": "Precision updated to 3."
|
||||
},
|
||||
"isError": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,8 @@
|
|||
"text": "19.8"
|
||||
}
|
||||
],
|
||||
"isError": false
|
||||
"isError": false,
|
||||
"structuredContent": {
|
||||
"result": 19.8
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,10 @@
|
|||
"text": "{\n \"mode\": \"debug\",\n \"processed_input\": \"DEBUG TEST\",\n \"message\": \"Processed in DEBUG mode.\"\n}"
|
||||
}
|
||||
],
|
||||
"isError": false
|
||||
"isError": false,
|
||||
"structuredContent": {
|
||||
"mode": "debug",
|
||||
"processed_input": "DEBUG TEST",
|
||||
"message": "Processed in DEBUG mode."
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,10 @@
|
|||
"text": "{\n \"mode\": \"default\",\n \"original_input\": \"test data\",\n \"message\": \"Processed in default mode (APP_MODE not recognized or not set).\"\n}"
|
||||
}
|
||||
],
|
||||
"isError": false
|
||||
"isError": false,
|
||||
"structuredContent": {
|
||||
"mode": "default",
|
||||
"original_input": "test data",
|
||||
"message": "Processed in default mode (APP_MODE not recognized or not set)."
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,10 @@
|
|||
"text": "{\n \"mode\": \"production\",\n \"processed_input_length\": 15,\n \"message\": \"Processed in PRODUCTION mode (summary only).\"\n}"
|
||||
}
|
||||
],
|
||||
"isError": false
|
||||
"isError": false,
|
||||
"structuredContent": {
|
||||
"mode": "production",
|
||||
"processed_input_length": 15,
|
||||
"message": "Processed in PRODUCTION mode (summary only)."
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,31 @@
|
|||
"required": [
|
||||
"input"
|
||||
]
|
||||
},
|
||||
"outputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"mode": {
|
||||
"type": "string",
|
||||
"description": "The processing mode used"
|
||||
},
|
||||
"processed_input": {
|
||||
"type": "string",
|
||||
"description": "The processed input data"
|
||||
},
|
||||
"original_input": {
|
||||
"type": "string",
|
||||
"description": "The original input data (only in default mode)"
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"description": "A descriptive message about the processing"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"mode",
|
||||
"message"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue