Replace mcp_core::content types with rmcp::model types (#3500)

This commit is contained in:
Jack Amadeo 2025-07-18 17:23:25 -04:00 committed by GitHub
parent a2309d9436
commit d5291461ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 867 additions and 856 deletions

View file

@ -934,18 +934,14 @@
"type": "array",
"items": {
"$ref": "#/components/schemas/Role"
},
"nullable": true
}
},
"priority": {
"type": "number",
"format": "float",
"nullable": true
"type": "number"
},
"timestamp": {
"type": "string",
"format": "date-time",
"example": "2023-01-01T00:00:00Z"
"format": "date-time"
}
}
},
@ -1002,72 +998,81 @@
"Content": {
"oneOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/TextContent"
"type": "object",
"required": [
"text",
"type"
],
"properties": {
"text": {
"type": "string"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
}
}
"type": {
"type": "string"
}
]
}
},
{
"allOf": [
{
"$ref": "#/components/schemas/ImageContent"
"type": "object",
"required": [
"data",
"mimeType",
"type"
],
"properties": {
"data": {
"type": "string"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"image"
]
}
}
"mimeType": {
"type": "string"
},
"type": {
"type": "string"
}
]
}
},
{
"allOf": [
{
"$ref": "#/components/schemas/EmbeddedResource"
"type": "object",
"required": [
"resource",
"type"
],
"properties": {
"resource": {
"$ref": "#/components/schemas/ResourceContents"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"resource"
]
}
}
"type": {
"type": "string"
}
]
}
},
{
"type": "object",
"required": [
"data",
"mimeType",
"type"
],
"properties": {
"annotations": {
"allOf": [
{
"$ref": "#/components/schemas/Annotations"
}
]
},
"data": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
],
"discriminator": {
"propertyName": "type"
}
]
},
"ContextLengthExceeded": {
"type": "object",
@ -1160,8 +1165,7 @@
{
"$ref": "#/components/schemas/Annotations"
}
],
"nullable": true
]
},
"resource": {
"$ref": "#/components/schemas/ResourceContents"
@ -1491,8 +1495,7 @@
{
"$ref": "#/components/schemas/Annotations"
}
],
"nullable": true
]
},
"data": {
"type": "string"
@ -1997,11 +2000,13 @@
]
},
"Role": {
"type": "string",
"description": "A wrapper around rmcp::model::Role that implements ToSchema for utoipa",
"enum": [
"user",
"assistant"
"oneOf": [
{
"type": "string"
},
{
"type": "string"
}
]
},
"RunNowResponse": {
@ -2285,8 +2290,7 @@
{
"$ref": "#/components/schemas/Annotations"
}
],
"nullable": true
]
},
"text": {
"type": "string"