Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[proposal] Add Augmentation capability for context enrichment #142

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
253 changes: 253 additions & 0 deletions schema/draft/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,203 @@
],
"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"
}
]
},
"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"
}
],
"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 +1067,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 +2031,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
Loading