From 1c54a7737c2b156be26e0c94cf7b269c24396122 Mon Sep 17 00:00:00 2001 From: Zachary German Date: Thu, 5 Jun 2025 17:46:21 +0000 Subject: [PATCH 1/4] Encourage title properties/usage for objects/resources likely to be represented in a UI --- docs/specification/draft/basic/lifecycle.mdx | 2 + docs/specification/draft/server/prompts.mdx | 4 ++ docs/specification/draft/server/resources.mdx | 14 +++- docs/specification/draft/server/tools.mdx | 4 ++ schema/draft/schema.json | 63 ++++++++++++++--- schema/draft/schema.ts | 69 ++++++++----------- 6 files changed, 105 insertions(+), 51 deletions(-) diff --git a/docs/specification/draft/basic/lifecycle.mdx b/docs/specification/draft/basic/lifecycle.mdx index a4afec2eb..bda754da4 100644 --- a/docs/specification/draft/basic/lifecycle.mdx +++ b/docs/specification/draft/basic/lifecycle.mdx @@ -66,6 +66,7 @@ The client **MUST** initiate this phase by sending an `initialize` request conta }, "clientInfo": { "name": "ExampleClient", + "title": "Example Client Display Name", "version": "1.0.0" } } @@ -101,6 +102,7 @@ The server **MUST** respond with its own capabilities and information: }, "serverInfo": { "name": "ExampleServer", + "title": "Example Server Display Name", "version": "1.0.0" }, "instructions": "Optional instructions for the client" diff --git a/docs/specification/draft/server/prompts.mdx b/docs/specification/draft/server/prompts.mdx index 43949b981..da8a9e853 100644 --- a/docs/specification/draft/server/prompts.mdx +++ b/docs/specification/draft/server/prompts.mdx @@ -73,6 +73,7 @@ supports [pagination](/specification/draft/server/utilities/pagination). "prompts": [ { "name": "code_review", + "title": "Request Code Review", "description": "Asks the LLM to analyze code quality and suggest improvements", "arguments": [ { @@ -172,6 +173,7 @@ sequenceDiagram A prompt definition includes: - `name`: Unique identifier for the prompt +- `title`: Optional human-readable name of the prompt for display purposes. - `description`: Optional human-readable description - `arguments`: Optional list of arguments for customization @@ -234,6 +236,8 @@ Embedded resources allow referencing server-side resources directly in messages: "type": "resource", "resource": { "uri": "resource://example", + "name": "example", + "title": "My Example Resource", "mimeType": "text/plain", "text": "Resource content" } diff --git a/docs/specification/draft/server/resources.mdx b/docs/specification/draft/server/resources.mdx index 37abc7204..a7198bb25 100644 --- a/docs/specification/draft/server/resources.mdx +++ b/docs/specification/draft/server/resources.mdx @@ -111,6 +111,7 @@ supports [pagination](/specification/draft/server/utilities/pagination). { "uri": "file:///project/src/main.rs", "name": "main.rs", + "title": "Rust Software Application Main File", "description": "Primary application entry point", "mimeType": "text/x-rust" } @@ -147,6 +148,8 @@ To retrieve resource contents, clients send a `resources/read` request: "contents": [ { "uri": "file:///project/src/main.rs", + "name": "main.rs", + "title": "Rust Software Application Main File", "mimeType": "text/x-rust", "text": "fn main() {\n println!(\"Hello world!\");\n}" } @@ -182,6 +185,7 @@ auto-completed through [the completion API](/specification/draft/server/utilitie { "uriTemplate": "file:///{path}", "name": "Project Files", + "title": "📁 Project Files", "description": "Access files in the project directory", "mimeType": "application/octet-stream" } @@ -227,7 +231,8 @@ to specific resources and receive notifications when they change: "jsonrpc": "2.0", "method": "notifications/resources/updated", "params": { - "uri": "file:///project/src/main.rs" + "uri": "file:///project/src/main.rs", + "title": "Rust Software Application Main File" } } ``` @@ -264,7 +269,8 @@ sequenceDiagram A resource definition includes: - `uri`: Unique identifier for the resource -- `name`: Human-readable name +- `name`: The name of the resource. +- `title`: Optional human-readable name of the resource for display purposes. - `description`: Optional description - `mimeType`: Optional MIME type - `size`: Optional size in bytes @@ -278,6 +284,8 @@ Resources can contain either text or binary data: ```json { "uri": "file:///example.txt", + "name": "example.txt", + "title": "Example Text File", "mimeType": "text/plain", "text": "Resource content" } @@ -288,6 +296,8 @@ Resources can contain either text or binary data: ```json { "uri": "file:///example.png", + "name": "example.png", + "title": "Example Image", "mimeType": "image/png", "blob": "base64-encoded-data" } diff --git a/docs/specification/draft/server/tools.mdx b/docs/specification/draft/server/tools.mdx index d3fea0dc9..c028eee56 100644 --- a/docs/specification/draft/server/tools.mdx +++ b/docs/specification/draft/server/tools.mdx @@ -80,6 +80,7 @@ To discover available tools, clients send a `tools/list` request. This operation "tools": [ { "name": "get_weather", + "title": "Weather Information Provider", "description": "Get current weather information for a location", "inputSchema": { "type": "object", @@ -181,6 +182,7 @@ sequenceDiagram A tool definition includes: - `name`: Unique identifier for the tool +- `title`: Optional human-readable name of the tool for display purposes. - `description`: Human-readable description of functionality - `inputSchema`: JSON Schema defining expected parameters - `outputSchema`: Optional JSON Schema defining expected output structure @@ -238,6 +240,7 @@ or data, behind a URI that can be subscribed to or fetched again by the client l "type": "resource", "resource": { "uri": "resource://example", + "title": "My Plain-text Resource", "mimeType": "text/plain", "text": "Resource content" } @@ -264,6 +267,7 @@ Example tool with output schema: ```json { "name": "get_weather_data", + "title": "Weather Data Retriever", "description": "Get current weather data for a location", "inputSchema": { "type": "object", diff --git a/schema/draft/schema.json b/schema/draft/schema.json index 47f47a208..bc0935a2e 100644 --- a/schema/draft/schema.json +++ b/schema/draft/schema.json @@ -48,6 +48,23 @@ ], "type": "object" }, + "BaseMetadata": { + "description": "Base interface for metadata with name and title (display name) properties.", + "properties": { + "name": { + "description": "Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).", + "type": "string" + }, + "title": { + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, "BlobResourceContents": { "properties": { "blob": { @@ -745,9 +762,14 @@ "type": "object" }, "Implementation": { - "description": "Describes the name and version of an MCP implementation.", + "description": "Describes the name and version of an MCP implementation, with an optional title for UI representation.", "properties": { "name": { + "description": "Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).", + "type": "string" + }, + "title": { + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", "type": "string" }, "version": { @@ -1554,7 +1576,11 @@ "type": "string" }, "name": { - "description": "The name of the prompt or prompt template.", + "description": "Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).", + "type": "string" + }, + "title": { + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", "type": "string" } }, @@ -1571,12 +1597,16 @@ "type": "string" }, "name": { - "description": "The name of the argument.", + "description": "Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).", "type": "string" }, "required": { "description": "Whether this argument must be provided.", "type": "boolean" + }, + "title": { + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", + "type": "string" } }, "required": [ @@ -1758,13 +1788,17 @@ "type": "string" }, "name": { - "description": "A human-readable name for this resource.\n\nThis can be used by clients to populate UI elements.", + "description": "Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).", "type": "string" }, "size": { "description": "The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.\n\nThis can be used by Hosts to display file sizes and estimate context window usage.", "type": "integer" }, + "title": { + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", + "type": "string" + }, "uri": { "description": "The URI of this resource.", "format": "uri", @@ -1835,7 +1869,11 @@ "type": "string" }, "name": { - "description": "A human-readable name for the type of resource this template refers to.\n\nThis can be used by clients to populate UI elements.", + "description": "Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).", + "type": "string" + }, + "title": { + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", "type": "string" }, "uriTemplate": { @@ -1919,7 +1957,11 @@ "description": "Represents a root directory or file that the server can operate on.", "properties": { "name": { - "description": "An optional name for the root. This can be used to provide a human-readable\nidentifier for the root, which may be useful for display purposes or for\nreferencing the root in other parts of the application.", + "description": "Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).", + "type": "string" + }, + "title": { + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", "type": "string" }, "uri": { @@ -1929,6 +1971,7 @@ } }, "required": [ + "name", "uri" ], "type": "object" @@ -2254,7 +2297,7 @@ "properties": { "annotations": { "$ref": "#/definitions/ToolAnnotations", - "description": "Optional additional tool information." + "description": "Optional additional tool information.\n\nDisplay name precedence order is: title, annotations.title, then name." }, "description": { "description": "A human-readable description of the tool.\n\nThis can be used by clients to improve the LLM's understanding of available tools. It can be thought of like a \"hint\" to the model.", @@ -2288,7 +2331,7 @@ "type": "object" }, "name": { - "description": "The name of the tool.", + "description": "Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).", "type": "string" }, "outputSchema": { @@ -2317,6 +2360,10 @@ "type" ], "type": "object" + }, + "title": { + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", + "type": "string" } }, "required": [ diff --git a/schema/draft/schema.ts b/schema/draft/schema.ts index 2fd967bbb..f4866d2fb 100644 --- a/schema/draft/schema.ts +++ b/schema/draft/schema.ts @@ -276,10 +276,28 @@ export interface ServerCapabilities { } /** - * Describes the name and version of an MCP implementation. + * Base interface for metadata with name and title (display name) properties. */ -export interface Implementation { +export interface BaseMetadata { + /** + * Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present). + */ name: string; + + /** + * Intended for UI and end-user contexts — optimized to be human-readable and easily understood, + * even by those unfamiliar with domain-specific terminology. + * + * If not provided, the name should be used for display (except for tools, + * where annotations.title should be given precedence over using the name). + */ + title?: string; +} + +/** + * Describes the name and version of an MCP implementation, with an optional title for UI representation. + */ +export interface Implementation extends BaseMetadata { version: string; } @@ -446,7 +464,7 @@ export interface ResourceUpdatedNotification extends Notification { /** * A known resource that the server is capable of reading. */ -export interface Resource { +export interface Resource extends BaseMetadata { /** * The URI of this resource. * @@ -454,13 +472,6 @@ export interface Resource { */ uri: string; - /** - * A human-readable name for this resource. - * - * This can be used by clients to populate UI elements. - */ - name: string; - /** * A description of what this resource represents. * @@ -489,7 +500,7 @@ export interface Resource { /** * A template description for resources available on the server. */ -export interface ResourceTemplate { +export interface ResourceTemplate extends BaseMetadata { /** * A URI template (according to RFC 6570) that can be used to construct resource URIs. * @@ -497,13 +508,6 @@ export interface ResourceTemplate { */ uriTemplate: string; - /** - * A human-readable name for the type of resource this template refers to. - * - * This can be used by clients to populate UI elements. - */ - name: string; - /** * A description of what this template is for. * @@ -600,11 +604,7 @@ export interface GetPromptResult extends Result { /** * A prompt or prompt template that the server offers. */ -export interface Prompt { - /** - * The name of the prompt or prompt template. - */ - name: string; +export interface Prompt extends BaseMetadata { /** * An optional description of what this prompt provides */ @@ -618,11 +618,7 @@ export interface Prompt { /** * Describes an argument that a prompt can accept. */ -export interface PromptArgument { - /** - * The name of the argument. - */ - name: string; +export interface PromptArgument extends BaseMetadata { /** * A human-readable description of the argument. */ @@ -793,12 +789,7 @@ export interface ToolAnnotations { /** * Definition for a tool the client can call. */ -export interface Tool { - /** - * The name of the tool. - */ - name: string; - +export interface Tool extends BaseMetadata { /** * A human-readable description of the tool. * @@ -827,6 +818,8 @@ export interface Tool { /** * Optional additional tool information. + * + * Display name precedence order is: title, annotations.title, then name. */ annotations?: ToolAnnotations; } @@ -1214,7 +1207,7 @@ export interface ListRootsResult extends Result { /** * Represents a root directory or file that the server can operate on. */ -export interface Root { +export interface Root extends BaseMetadata { /** * The URI identifying the root. This *must* start with file:// for now. * This restriction may be relaxed in future versions of the protocol to allow @@ -1223,12 +1216,6 @@ export interface Root { * @format uri */ uri: string; - /** - * An optional name for the root. This can be used to provide a human-readable - * identifier for the root, which may be useful for display purposes or for - * referencing the root in other parts of the application. - */ - name?: string; } /** From 5bf54576f443846af6a6aeb85d744448f7da88c7 Mon Sep 17 00:00:00 2001 From: Zachary German Date: Wed, 11 Jun 2025 23:22:12 +0000 Subject: [PATCH 2/4] Minor wording change --- schema/draft/schema.json | 22 +++++++++++++--------- schema/draft/schema.ts | 4 ++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/schema/draft/schema.json b/schema/draft/schema.json index 170721d1d..06c581271 100644 --- a/schema/draft/schema.json +++ b/schema/draft/schema.json @@ -60,7 +60,7 @@ "type": "string" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", "type": "string" } }, @@ -785,7 +785,7 @@ "type": "string" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", "type": "string" }, "version": { @@ -1540,7 +1540,7 @@ "type": "string" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", "type": "string" } }, @@ -1565,7 +1565,7 @@ "type": "boolean" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", "type": "string" } }, @@ -1743,7 +1743,7 @@ "type": "integer" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", "type": "string" }, "uri": { @@ -1792,13 +1792,17 @@ "type": "string" }, "name": { - "description": "A human-readable name for this resource.\n\nThis can be used by clients to populate UI elements.", + "description": "Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).", "type": "string" }, "size": { "description": "The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.\n\nThis can be used by Hosts to display file sizes and estimate context window usage.", "type": "integer" }, + "title": { + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", + "type": "string" + }, "type": { "const": "resource_link", "type": "string" @@ -1860,7 +1864,7 @@ "type": "string" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", "type": "string" }, "uriTemplate": { @@ -1948,7 +1952,7 @@ "type": "string" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", "type": "string" }, "uri": { @@ -2349,7 +2353,7 @@ "type": "object" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for tools,\nwhere annotations.title should be given precedence over using the name).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", "type": "string" } }, diff --git a/schema/draft/schema.ts b/schema/draft/schema.ts index ef1613259..494aa6eeb 100644 --- a/schema/draft/schema.ts +++ b/schema/draft/schema.ts @@ -276,8 +276,8 @@ export interface BaseMetadata { * Intended for UI and end-user contexts — optimized to be human-readable and easily understood, * even by those unfamiliar with domain-specific terminology. * - * If not provided, the name should be used for display (except for tools, - * where annotations.title should be given precedence over using the name). + * If not provided, the name should be used for display (except for Tool, + * where `annotations.title` should be given precedence over using `name`). */ title?: string; } From 9a96c2855f4c33772875e8065b0bbe5e6e0f5f66 Mon Sep 17 00:00:00 2001 From: Basil Hosmer Date: Wed, 11 Jun 2025 22:05:58 -0400 Subject: [PATCH 3/4] revert Root --- schema/draft/schema.json | 23 +++++++++-------------- schema/draft/schema.ts | 11 +++++++++-- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/schema/draft/schema.json b/schema/draft/schema.json index 06c581271..e40b69663 100644 --- a/schema/draft/schema.json +++ b/schema/draft/schema.json @@ -60,7 +60,7 @@ "type": "string" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`,\nif present).", "type": "string" } }, @@ -785,7 +785,7 @@ "type": "string" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`,\nif present).", "type": "string" }, "version": { @@ -1540,7 +1540,7 @@ "type": "string" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`,\nif present).", "type": "string" } }, @@ -1565,7 +1565,7 @@ "type": "boolean" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`,\nif present).", "type": "string" } }, @@ -1743,7 +1743,7 @@ "type": "integer" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`,\nif present).", "type": "string" }, "uri": { @@ -1800,7 +1800,7 @@ "type": "integer" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`,\nif present).", "type": "string" }, "type": { @@ -1864,7 +1864,7 @@ "type": "string" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`,\nif present).", "type": "string" }, "uriTemplate": { @@ -1948,11 +1948,7 @@ "description": "Represents a root directory or file that the server can operate on.", "properties": { "name": { - "description": "Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).", - "type": "string" - }, - "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", + "description": "An optional name for the root. This can be used to provide a human-readable\nidentifier for the root, which may be useful for display purposes or for\nreferencing the root in other parts of the application.", "type": "string" }, "uri": { @@ -1962,7 +1958,6 @@ } }, "required": [ - "name", "uri" ], "type": "object" @@ -2353,7 +2348,7 @@ "type": "object" }, "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`).", + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`,\nif present).", "type": "string" } }, diff --git a/schema/draft/schema.ts b/schema/draft/schema.ts index 494aa6eeb..a4cb58674 100644 --- a/schema/draft/schema.ts +++ b/schema/draft/schema.ts @@ -277,7 +277,8 @@ export interface BaseMetadata { * even by those unfamiliar with domain-specific terminology. * * If not provided, the name should be used for display (except for Tool, - * where `annotations.title` should be given precedence over using `name`). + * where `annotations.title` should be given precedence over using `name`, + * if present). */ title?: string; } @@ -1221,7 +1222,7 @@ export interface ListRootsResult extends Result { /** * Represents a root directory or file that the server can operate on. */ -export interface Root extends BaseMetadata { +export interface Root { /** * The URI identifying the root. This *must* start with file:// for now. * This restriction may be relaxed in future versions of the protocol to allow @@ -1230,6 +1231,12 @@ export interface Root extends BaseMetadata { * @format uri */ uri: string; + /** + * An optional name for the root. This can be used to provide a human-readable + * identifier for the root, which may be useful for display purposes or for + * referencing the root in other parts of the application. + */ + name?: string; } /** From 694876eb6a9ddb6d38deb3a92987315a72bf53c0 Mon Sep 17 00:00:00 2001 From: Basil Hosmer Date: Thu, 12 Jun 2025 18:10:20 -0400 Subject: [PATCH 4/4] update PromptReference, add identifier language --- schema/draft/schema.json | 8 ++++++-- schema/draft/schema.ts | 8 ++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/schema/draft/schema.json b/schema/draft/schema.json index e40b69663..1d38d1c87 100644 --- a/schema/draft/schema.json +++ b/schema/draft/schema.json @@ -53,7 +53,7 @@ "type": "object" }, "BaseMetadata": { - "description": "Base interface for metadata with name and title (display name) properties.", + "description": "Base interface for metadata with name (identifier) and title (display name) properties.", "properties": { "name": { "description": "Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).", @@ -1618,7 +1618,11 @@ "description": "Identifies a prompt.", "properties": { "name": { - "description": "The name of the prompt or prompt template", + "description": "Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).", + "type": "string" + }, + "title": { + "description": "Intended for UI and end-user contexts — optimized to be human-readable and easily understood,\neven by those unfamiliar with domain-specific terminology.\n\nIf not provided, the name should be used for display (except for Tool,\nwhere `annotations.title` should be given precedence over using `name`,\nif present).", "type": "string" }, "type": { diff --git a/schema/draft/schema.ts b/schema/draft/schema.ts index a4cb58674..a1ac98372 100644 --- a/schema/draft/schema.ts +++ b/schema/draft/schema.ts @@ -264,7 +264,7 @@ export interface ServerCapabilities { } /** - * Base interface for metadata with name and title (display name) properties. + * Base interface for metadata with name (identifier) and title (display name) properties. */ export interface BaseMetadata { /** @@ -1188,12 +1188,8 @@ export interface ResourceTemplateReference { /** * Identifies a prompt. */ -export interface PromptReference { +export interface PromptReference extends BaseMetadata{ type: "ref/prompt"; - /** - * The name of the prompt or prompt template - */ - name: string; } /* Roots */