From 3388fe5ebea1b3023026df3e4cdd01369f315f66 Mon Sep 17 00:00:00 2001 From: Laurent AJDNIK <83899250+LaurentAjdnik@users.noreply.github.com> Date: Fri, 13 Dec 2024 20:29:29 +0100 Subject: [PATCH 1/7] Update schema.ts --- schema/schema.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/schema/schema.ts b/schema/schema.ts index b9fb9b9..4085a6f 100644 --- a/schema/schema.ts +++ b/schema/schema.ts @@ -182,6 +182,11 @@ export interface InitializedNotification extends Notification { method: "notifications/initialized"; } +/** + * A string representing a BCP 47 language tag. + */ +export type LanguageTag = string; + /** * Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities. */ @@ -203,6 +208,15 @@ export interface ClientCapabilities { * Present if the client supports sampling from an LLM. */ sampling?: object; + /** + * Present if the client has a list of preferred languages for translatable fields. + */ + locale?: { + /** + * An array of preferred languages for translatable fields, listed in descending order of priority. + */ + preferredLanguages: LanguageTag[]; + }; } /** @@ -248,6 +262,15 @@ export interface ServerCapabilities { */ listChanged?: boolean; }; + /** + * Present if the server specifies the language it uses for translatable fields. + */ + locale?: { + /** + * The language used by the server for translatable fields. + */ + language: LanguageTag; + }; } /** From d4a39f5755c3693231178e817631cc85091284b7 Mon Sep 17 00:00:00 2001 From: Laurent AJDNIK <83899250+LaurentAjdnik@users.noreply.github.com> Date: Fri, 13 Dec 2024 21:05:08 +0100 Subject: [PATCH 2/7] Update schema.json --- schema/schema.json | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/schema/schema.json b/schema/schema.json index c46e0f0..991542a 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -153,6 +153,22 @@ "description": "Experimental, non-standard capabilities that the client supports.", "type": "object" }, + "locale": { + "description": "Present if the client has a list of preferred languages for translatable fields.", + "properties": { + "preferredLanguages": { + "description": "An array of preferred languages for translatable fields, listed in descending order of priority.", + "items": { + "$ref": "#/definitions/LanguageTag" + }, + "type": "array" + } + }, + "required": [ + "preferredLanguages" + ], + "type": "object" + }, "roots": { "description": "Present if the client supports listing roots.", "properties": { @@ -822,6 +838,10 @@ ], "type": "object" }, + "LanguageTag": { + "description": "A string representing a BCP 47 language tag.", + "type": "string" + }, "ListPromptsRequest": { "description": "Sent from the client to request a list of prompts and prompt templates the server has.", "properties": { @@ -1743,6 +1763,19 @@ "description": "Experimental, non-standard capabilities that the server supports.", "type": "object" }, + "locale": { + "description": "Present if the server specifies the language it uses for translatable fields.", + "properties": { + "language": { + "$ref": "#/definitions/LanguageTag", + "description": "The language used by the server for translatable fields." + } + }, + "required": [ + "language" + ], + "type": "object" + }, "logging": { "additionalProperties": true, "description": "Present if the server supports sending log messages to the client.", From 6090906faa176ae632cd4081ab7f28bec4308e95 Mon Sep 17 00:00:00 2001 From: Laurent AJDNIK <83899250+LaurentAjdnik@users.noreply.github.com> Date: Fri, 13 Dec 2024 21:19:45 +0100 Subject: [PATCH 3/7] Update lifecycle.md --- docs/specification/basic/lifecycle.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/specification/basic/lifecycle.md b/docs/specification/basic/lifecycle.md index 58677b5..1d18f77 100644 --- a/docs/specification/basic/lifecycle.md +++ b/docs/specification/basic/lifecycle.md @@ -64,6 +64,9 @@ The client **MUST** initiate this phase by sending an `initialize` request conta "listChanged": true }, "sampling": {} + "locale": { + "preferredLanguages": ["en-US", "en-GB", "fr-FR"] + } }, "clientInfo": { "name": "ExampleClient", @@ -92,6 +95,9 @@ The server **MUST** respond with its own capabilities and information: }, "tools": { "listChanged": true + }, + "locale": { + "language": "en-US" } }, "serverInfo": { @@ -132,11 +138,13 @@ Key capabilities include: |----------|--------------- |-------------| | Client | `roots` | Ability to provide filesystem [roots]({{< ref "/specification/client/roots" >}}) | | Client | `sampling` | Support for LLM [sampling]({{< ref "/specification/client/sampling" >}}) requests | +| Client | `locale` | Provides [i18n support]({{< ref "/specification/client/i18n" >}}) | | Client | `experimental` | Describes support for non-standard experimental features | | Server | `prompts` | Offers [prompt templates]({{< ref "/specification/server/prompts" >}}) | | Server | `resources` | Provides readable [resources]({{< ref "/specification/server/resources" >}}) | | Server | `tools` | Exposes callable [tools]({{< ref "/specification/server/tools" >}}) | | Server | `logging` | Emits structured [log messages]({{< ref "/specification/server/utilities/logging" >}}) | +| Server | `locale` | | Provides [i18n support]({{< ref "/specification/server/i18n" >}}) | | Server | `experimental` | Describes support for non-standard experimental features | Capability objects can describe sub-capabilities like: From 6c1b7aef036b2c54b450f70b717fff455e362379 Mon Sep 17 00:00:00 2001 From: Laurent AJDNIK <83899250+LaurentAjdnik@users.noreply.github.com> Date: Fri, 13 Dec 2024 21:28:25 +0100 Subject: [PATCH 4/7] Update _index.md --- docs/specification/client/_index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/specification/client/_index.md b/docs/specification/client/_index.md index d09ef5a..341334f 100644 --- a/docs/specification/client/_index.md +++ b/docs/specification/client/_index.md @@ -14,4 +14,5 @@ Clients can implement additional features to enrich connected MCP servers: {{< cards >}} {{< card link="roots" title="Roots" icon="folder" >}} {{< card link="sampling" title="Sampling" icon="annotation" >}} + {{< card link="i18n" title="I18n support" icon="globe-alt" >}} {{< /cards >}} From 32e373bc11ca998593f7e0ab47259e9711807318 Mon Sep 17 00:00:00 2001 From: Laurent AJDNIK <83899250+LaurentAjdnik@users.noreply.github.com> Date: Fri, 13 Dec 2024 21:29:50 +0100 Subject: [PATCH 5/7] Update _index.md --- docs/specification/server/_index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/specification/server/_index.md b/docs/specification/server/_index.md index 096d28f..9110b21 100644 --- a/docs/specification/server/_index.md +++ b/docs/specification/server/_index.md @@ -29,4 +29,5 @@ Explore these key primitives in more detail below: {{< card link="prompts" title="Prompts" icon="chat-alt-2" >}} {{< card link="resources" title="Resources" icon="document" >}} {{< card link="tools" title="Tools" icon="adjustments" >}} + {{< card link="i18n" title="I18n support" icon="globe-alt" >}} {{< /cards >}} From 6fb83cf8274d5e4d5fb03a646933e11dba09dbda Mon Sep 17 00:00:00 2001 From: Laurent AJDNIK <83899250+LaurentAjdnik@users.noreply.github.com> Date: Fri, 13 Dec 2024 21:31:28 +0100 Subject: [PATCH 6/7] Create i18n.md --- docs/specification/client/i18n.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 docs/specification/client/i18n.md diff --git a/docs/specification/client/i18n.md b/docs/specification/client/i18n.md new file mode 100644 index 0000000..e5df021 --- /dev/null +++ b/docs/specification/client/i18n.md @@ -0,0 +1,11 @@ +--- +title: I18n support +type: docs +weight: 40 +--- + +{{< callout type="info" >}} +**Protocol Revision**: {{< param protocolRevision >}} +{{< /callout >}} + +Coming soon. From a04fa506fa8c8277dede6574218c170b05adbf4f Mon Sep 17 00:00:00 2001 From: Laurent AJDNIK <83899250+LaurentAjdnik@users.noreply.github.com> Date: Fri, 13 Dec 2024 21:31:54 +0100 Subject: [PATCH 7/7] Create i18n.md --- docs/specification/server/i18n.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 docs/specification/server/i18n.md diff --git a/docs/specification/server/i18n.md b/docs/specification/server/i18n.md new file mode 100644 index 0000000..e5df021 --- /dev/null +++ b/docs/specification/server/i18n.md @@ -0,0 +1,11 @@ +--- +title: I18n support +type: docs +weight: 40 +--- + +{{< callout type="info" >}} +**Protocol Revision**: {{< param protocolRevision >}} +{{< /callout >}} + +Coming soon.