From 6d56f70f941cad263561ab2c1f2304692c0a63bf Mon Sep 17 00:00:00 2001 From: Christopher Hertel Date: Sun, 17 May 2026 14:46:52 +0200 Subject: [PATCH] Document v0.6.0 changes in CHANGELOG and docs Wrap-up for the v0.6.0 release: capture features/BC breaks merged since v0.5.0 that were missing from documentation. - CHANGELOG: add the `title` field on `Resource`/`ResourceTemplate` (#301), a feature plus three positional-argument BC breaks. - mcp-elements.md: add the missing `title` parameter to the McpTool, McpResource, McpResourceTemplate and McpPrompt attribute reference sections; fix a missing closing paren in an `#[McpPrompt]` example. - server-builder.md: add `title?` to the `addPrompt()` row of the method reference table (stale since v0.5.0). - client.md: bump the protocol-version example to `V2025_11_25` to match the new default. Co-Authored-By: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 4 ++++ docs/client.md | 2 +- docs/mcp-elements.md | 10 +++++++--- docs/server-builder.md | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index febbef45..ff6c2c9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to `mcp/sdk` will be documented in this file. * [BC Break] Bump default protocol version to `2025-11-25` * Allow overriding the default name pattern for Discovery * Add configurable session garbage collection (`gcProbability`/`gcDivisor`) +* Add optional `title` field to `Resource` and `ResourceTemplate` for MCP spec compliance * Add `ChainLoader` to compose multiple `LoaderInterface` implementations via explicit ordering. * Add `RegistryInterface::unregisterTool()`, `unregisterResource()`, `unregisterResourceTemplate()`, `unregisterPrompt()` — idempotent removals. * Add `RegistryInterface::hasTool()`, `hasResource()`, `hasResourceTemplate()`, `hasPrompt()` — by-name existence checks. @@ -19,6 +20,9 @@ All notable changes to `mcp/sdk` will be documented in this file. * Add optional `title` parameter to `Builder::addResource()` and `Builder::addResourceTemplate()` for MCP spec compliance * [BC Break] `Builder::addResource()` signature changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments. * [BC Break] `Builder::addResourceTemplate()` signature changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments. +* [BC Break] `Resource::__construct()` signature changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments. +* [BC Break] `ResourceTemplate::__construct()` signature changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments. +* [BC Break] `McpResource` and `McpResourceTemplate` attribute signatures changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments. 0.5.0 ----- diff --git a/docs/client.md b/docs/client.md index 304fad77..680d8234 100644 --- a/docs/client.md +++ b/docs/client.md @@ -83,7 +83,7 @@ Specify the MCP protocol version (defaults to latest): use Mcp\Schema\Enum\ProtocolVersion; $client = Client::builder() - ->setProtocolVersion(ProtocolVersion::V2025_06_18) + ->setProtocolVersion(ProtocolVersion::V2025_11_25) ->build(); ``` diff --git a/docs/mcp-elements.md b/docs/mcp-elements.md index b1a045f5..1ce32f27 100644 --- a/docs/mcp-elements.md +++ b/docs/mcp-elements.md @@ -71,6 +71,7 @@ class Calculator ### Parameters - **`name`** (optional): Tool identifier. Defaults to method name if not provided. +- **`title`** (optional): Human-readable display title shown in client UI. Distinct from `name`. - **`description`** (optional): Tool description. Defaults to docblock summary if not provided, otherwise uses method name. - **`annotations`** (optional): `ToolAnnotations` object for additional metadata. - **`icons`** (optional): Array of `Icon` objects for visual representation. @@ -216,7 +217,8 @@ class ConfigProvider ### Parameters - **`uri`** (required): Unique resource identifier. Must comply with [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). -- **`name`** (optional): Human-readable name. Defaults to method name if not provided. +- **`name`** (optional): Short resource identifier. Defaults to method name if not provided. +- **`title`** (optional): Human-readable display title shown in client UI. Distinct from `name`. - **`description`** (optional): Resource description. Defaults to docblock summary if not provided. - **`mimeType`** (optional): MIME type of the resource content. - **`size`** (optional): Size in bytes if known. @@ -364,7 +366,8 @@ class UserProvider ### Parameters - **`uriTemplate`** (required): URI template with `{variables}` using RFC 6570 syntax. Must comply with RFC 3986. -- **`name`** (optional): Human-readable name. Defaults to method name if not provided. +- **`name`** (optional): Short resource template identifier. Defaults to method name if not provided. +- **`title`** (optional): Human-readable display title shown in client UI. Distinct from `name`. - **`description`** (optional): Template description. Defaults to docblock summary if not provided. - **`mimeType`** (optional): MIME type of the resource content. - **`annotations`** (optional): Additional metadata. @@ -390,7 +393,7 @@ class PromptGenerator /** * Generates a code review request prompt. */ - #[McpPrompt(name: 'code_review'] + #[McpPrompt(name: 'code_review')] public function reviewCode(string $language, string $code, string $focus = 'general'): array { return [ @@ -404,6 +407,7 @@ class PromptGenerator ### Parameters - **`name`** (optional): Prompt identifier. Defaults to method name if not provided. +- **`title`** (optional): Human-readable display title shown in client UI. Distinct from `name`. - **`description`** (optional): Prompt description. Defaults to docblock summary if not provided. - **`icons`** (optional): Array of `Icon` objects for visual representation. - **`meta`** (optional): Arbitrary key-value pairs for custom metadata. diff --git a/docs/server-builder.md b/docs/server-builder.md index a48e96da..5f93bbce 100644 --- a/docs/server-builder.md +++ b/docs/server-builder.md @@ -618,5 +618,5 @@ $server = Server::builder() | `addTool()` | handler, name?, title?, description?, annotations?, inputSchema?, ... | Register tool | | `addResource()` | handler, uri, name?, description?, mimeType?, size?, annotations? | Register resource | | `addResourceTemplate()` | handler, uriTemplate, name?, description?, mimeType?, annotations? | Register resource template | -| `addPrompt()` | handler, name?, description? | Register prompt | +| `addPrompt()` | handler, name?, title?, description?, icons?, meta? | Register prompt | | `build()` | - | Create the server instance |