Skip to content

Commit

Permalink
Changes moved to draft schema
Browse files Browse the repository at this point in the history
  • Loading branch information
PederHP committed Jan 18, 2025
1 parent 06c7fdc commit 33722c5
Show file tree
Hide file tree
Showing 4 changed files with 423 additions and 416 deletions.
285 changes: 285 additions & 0 deletions schema/draft/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,209 @@
],
"type": "object"
},
"AugmentRequest": {
"description": "Request to augment context with additional information.",
"properties": {
"method": {
"const": "augmentation/augment",
"type": "string"
},
"params": {
"properties": {
"arguments": {
"additionalProperties": {},
"description": "Additional parameters for the augmentation.\nmaxResult and minRelevance are common parameters for augmentations that return multiple results, but the exact parameters are server-specific.",
"properties": {
"maxResults": {
"type": "integer"
},
"minRelevance": {
"type": "integer"
}
},
"type": "object"
},
"context": {
"description": "The context to augment. This can include text, images, or other resources.",
"items": {
"anyOf": [
{
"$ref": "#/definitions/TextContent"
},
{
"$ref": "#/definitions/ImageContent"
},
{
"$ref": "#/definitions/AudioContent"
},
{
"$ref": "#/definitions/EmbeddedResource"
},
{
"$ref": "#/definitions/VectorContent"
}
]
},
"type": "array"
},
"name": {
"description": "The name of the augmentation to perform.",
"type": "string"
}
},
"required": [
"context",
"name"
],
"type": "object"
}
},
"required": [
"method",
"params"
],
"type": "object"
},
"AugmentResult": {
"description": "Response containing augmented context.",
"properties": {
"_meta": {
"additionalProperties": {},
"description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
"type": "object"
},
"content": {
"description": "The augmented content. Each item in the array represents a single augmented result.\nIt is server-specific how to interpret the content.",
"items": {
"$ref": "#/definitions/AugmentedContent"
},
"type": "array"
},
"hint": {
"description": "Hints for the client on how to interpret the augmented content.",
"type": "string"
},
"metadata": {
"additionalProperties": true,
"description": "Optional metadata for the entire augmented result.",
"properties": {},
"type": "object"
}
},
"required": [
"content"
],
"type": "object"
},
"Augmentation": {
"description": "Describes an augmentation capability offered by the server.",
"properties": {
"description": {
"description": "A human-readable description of the augmentation.",
"type": "string"
},
"inputSchema": {
"description": "A JSON Schema object defining the expected additional parameters for the augmentation.",
"properties": {
"properties": {
"additionalProperties": {
"additionalProperties": true,
"properties": {},
"type": "object"
},
"type": "object"
},
"required": {
"items": {
"type": "string"
},
"type": "array"
},
"type": {
"const": "object",
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"name": {
"description": "The name of the augmentation.",
"type": "string"
}
},
"required": [
"inputSchema",
"name"
],
"type": "object"
},
"AugmentationListChangedNotification": {
"description": "An optional notification from the server to the client, informing that the list\nof augmentations it offers has changed. This may be issued by servers without\nany previous subscription.",
"properties": {
"method": {
"const": "notifications/augmentation/list_changed",
"type": "string"
},
"params": {
"additionalProperties": {},
"properties": {
"_meta": {
"additionalProperties": {},
"description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
"type": "object"
}
},
"type": "object"
}
},
"required": [
"method"
],
"type": "object"
},
"AugmentedContent": {
"description": "A single piece of content returned from augmentation with its properties.",
"properties": {
"content": {
"anyOf": [
{
"$ref": "#/definitions/TextContent"
},
{
"$ref": "#/definitions/ImageContent"
},
{
"$ref": "#/definitions/AudioContent"
},
{
"$ref": "#/definitions/EmbeddedResource"
},
{
"$ref": "#/definitions/VectorContent"
}
],
"description": "The content part of the individual augmented result content."
},
"properties": {
"additionalProperties": {},
"description": "The properties of the individual augmented result content.",
"properties": {
"relevance": {
"description": "Relevance of the content, as often used in RAG systems.",
"type": "integer"
}
},
"type": "object"
}
},
"required": [
"content"
],
"type": "object"
},
"BlobResourceContents": {
"properties": {
"blob": {
Expand Down Expand Up @@ -870,6 +1073,52 @@
],
"type": "object"
},
"ListAugmentationsRequest": {
"description": "Sent from the client to request a list of augmentations the server has.",
"properties": {
"method": {
"const": "augmentation/list",
"type": "string"
},
"params": {
"properties": {
"cursor": {
"description": "An opaque token representing the current pagination position.\nIf provided, the server should return results starting after this cursor.",
"type": "string"
}
},
"type": "object"
}
},
"required": [
"method"
],
"type": "object"
},
"ListAugmentationsResult": {
"description": "The server's response to an augmentation/list request from the client.",
"properties": {
"_meta": {
"additionalProperties": {},
"description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
"type": "object"
},
"augmentations": {
"items": {
"$ref": "#/definitions/Augmentation"
},
"type": "array"
},
"nextCursor": {
"description": "An opaque token representing the pagination position after the last returned result.\nIf present, there may be more results available.",
"type": "string"
}
},
"required": [
"augmentations"
],
"type": "object"
},
"ListPromptsRequest": {
"description": "Sent from the client to request a list of prompts and prompt templates the server has.",
"properties": {
Expand Down Expand Up @@ -1788,6 +2037,16 @@
"ServerCapabilities": {
"description": "Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.",
"properties": {
"augmentation": {
"description": "Present if the server offers any augmentation capabilities.",
"properties": {
"listChanged": {
"description": "Whether this server supports notifications for changes to the augmentation list.",
"type": "boolean"
}
},
"type": "object"
},
"experimental": {
"additionalProperties": {
"additionalProperties": true,
Expand Down Expand Up @@ -2115,6 +2374,32 @@
"params"
],
"type": "object"
},
"VectorContent": {
"description": "Vector representation of content.",
"properties": {
"dimensions": {
"description": "The dimensions of the vector. For future compatibility with sparse vectors, this should be set to the length of the values array.",
"type": "integer"
},
"type": {
"const": "vector",
"type": "string"
},
"values": {
"description": "The vector values.",
"items": {
"type": "integer"
},
"type": "array"
}
},
"required": [
"dimensions",
"type",
"values"
],
"type": "object"
}
}
}
Expand Down
Loading

0 comments on commit 33722c5

Please sign in to comment.