Skip to content

Commit f267bca

Browse files
chr-hertelclaude
andcommitted
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) <noreply@anthropic.com>
1 parent 293a588 commit f267bca

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ All notable changes to `mcp/sdk` will be documented in this file.
88
* [BC Break] Bump default protocol version to `2025-11-25`
99
* Allow overriding the default name pattern for Discovery
1010
* Add configurable session garbage collection (`gcProbability`/`gcDivisor`)
11+
* Add optional `title` field to `Resource` and `ResourceTemplate` for MCP spec compliance
1112
* Add `ChainLoader` to compose multiple `LoaderInterface` implementations via explicit ordering.
1213
* Add `RegistryInterface::unregisterTool()`, `unregisterResource()`, `unregisterResourceTemplate()`, `unregisterPrompt()` — idempotent removals.
1314
* Add `RegistryInterface::hasTool()`, `hasResource()`, `hasResourceTemplate()`, `hasPrompt()` — by-name existence checks.
@@ -20,7 +21,10 @@ All notable changes to `mcp/sdk` will be documented in this file.
2021
* [BC Break] `Builder::addResource()` signature changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments.
2122
* [BC Break] `Builder::addResourceTemplate()` signature changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments.
2223
* Add `CorsMiddleware`, `DnsRebindingProtectionMiddleware`, and `ProtocolVersionMiddleware` for `StreamableHttpTransport`, composed automatically as the default stack via `StreamableHttpTransport::defaultMiddleware()`
23-
* **[BC BREAK]** `StreamableHttpTransport` constructor: `$corsHeaders` parameter removed; CORS is now configured via `CorsMiddleware`. The `$middleware` parameter is nullable — `null` (or omitted) installs the default stack; `[]` disables all defaults. Default `Access-Control-Allow-Origin` is no longer set (was `*`).
24+
* [BC BREAK] `StreamableHttpTransport` constructor: `$corsHeaders` parameter removed; CORS is now configured via `CorsMiddleware`. The `$middleware` parameter is nullable — `null` (or omitted) installs the default stack; `[]` disables all defaults. Default `Access-Control-Allow-Origin` is no longer set (was `*`).
25+
* [BC Break] `Resource::__construct()` signature changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments.
26+
* [BC Break] `ResourceTemplate::__construct()` signature changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments.
27+
* [BC Break] `McpResource` and `McpResourceTemplate` attribute signatures changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments.
2428

2529
0.5.0
2630
-----

docs/client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Specify the MCP protocol version (defaults to latest):
8383
use Mcp\Schema\Enum\ProtocolVersion;
8484

8585
$client = Client::builder()
86-
->setProtocolVersion(ProtocolVersion::V2025_06_18)
86+
->setProtocolVersion(ProtocolVersion::V2025_11_25)
8787
->build();
8888
```
8989

docs/mcp-elements.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class Calculator
7171
### Parameters
7272

7373
- **`name`** (optional): Tool identifier. Defaults to method name if not provided.
74+
- **`title`** (optional): Human-readable display title shown in client UI. Distinct from `name`.
7475
- **`description`** (optional): Tool description. Defaults to docblock summary if not provided, otherwise uses method name.
7576
- **`annotations`** (optional): `ToolAnnotations` object for additional metadata.
7677
- **`icons`** (optional): Array of `Icon` objects for visual representation.
@@ -216,7 +217,8 @@ class ConfigProvider
216217
### Parameters
217218

218219
- **`uri`** (required): Unique resource identifier. Must comply with [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986).
219-
- **`name`** (optional): Human-readable name. Defaults to method name if not provided.
220+
- **`name`** (optional): Short resource identifier. Defaults to method name if not provided.
221+
- **`title`** (optional): Human-readable display title shown in client UI. Distinct from `name`.
220222
- **`description`** (optional): Resource description. Defaults to docblock summary if not provided.
221223
- **`mimeType`** (optional): MIME type of the resource content.
222224
- **`size`** (optional): Size in bytes if known.
@@ -364,7 +366,8 @@ class UserProvider
364366
### Parameters
365367

366368
- **`uriTemplate`** (required): URI template with `{variables}` using RFC 6570 syntax. Must comply with RFC 3986.
367-
- **`name`** (optional): Human-readable name. Defaults to method name if not provided.
369+
- **`name`** (optional): Short resource template identifier. Defaults to method name if not provided.
370+
- **`title`** (optional): Human-readable display title shown in client UI. Distinct from `name`.
368371
- **`description`** (optional): Template description. Defaults to docblock summary if not provided.
369372
- **`mimeType`** (optional): MIME type of the resource content.
370373
- **`annotations`** (optional): Additional metadata.
@@ -390,7 +393,7 @@ class PromptGenerator
390393
/**
391394
* Generates a code review request prompt.
392395
*/
393-
#[McpPrompt(name: 'code_review']
396+
#[McpPrompt(name: 'code_review')]
394397
public function reviewCode(string $language, string $code, string $focus = 'general'): array
395398
{
396399
return [
@@ -404,6 +407,7 @@ class PromptGenerator
404407
### Parameters
405408

406409
- **`name`** (optional): Prompt identifier. Defaults to method name if not provided.
410+
- **`title`** (optional): Human-readable display title shown in client UI. Distinct from `name`.
407411
- **`description`** (optional): Prompt description. Defaults to docblock summary if not provided.
408412
- **`icons`** (optional): Array of `Icon` objects for visual representation.
409413
- **`meta`** (optional): Arbitrary key-value pairs for custom metadata.

docs/server-builder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,5 +618,5 @@ $server = Server::builder()
618618
| `addTool()` | handler, name?, title?, description?, annotations?, inputSchema?, ... | Register tool |
619619
| `addResource()` | handler, uri, name?, description?, mimeType?, size?, annotations? | Register resource |
620620
| `addResourceTemplate()` | handler, uriTemplate, name?, description?, mimeType?, annotations? | Register resource template |
621-
| `addPrompt()` | handler, name?, description? | Register prompt |
621+
| `addPrompt()` | handler, name?, title?, description?, icons?, meta? | Register prompt |
622622
| `build()` | - | Create the server instance |

0 commit comments

Comments
 (0)