Skip to content

Commit f08dd0d

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 d150772 commit f08dd0d

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
@@ -14,6 +14,7 @@ All notable changes to `mcp/sdk` will be documented in this file.
1414
* Add `extensions` to `ServerCapabilities` and `ClientCapabilities` and `Builder::enableExtension()`
1515
* Allow overriding the default name pattern for Discovery
1616
* Add configurable session garbage collection (`gcProbability`/`gcDivisor`)
17+
* Add optional `title` field to `Resource` and `ResourceTemplate` for MCP spec compliance
1718
* Add `ChainLoader` to compose multiple `LoaderInterface` implementations via explicit ordering.
1819
* Add `RegistryInterface::unregisterTool()`, `unregisterResource()`, `unregisterResourceTemplate()`, `unregisterPrompt()` — idempotent removals.
1920
* Add `RegistryInterface::hasTool()`, `hasResource()`, `hasResourceTemplate()`, `hasPrompt()` — by-name existence checks.
@@ -26,7 +27,10 @@ All notable changes to `mcp/sdk` will be documented in this file.
2627
* [BC Break] `Builder::addResource()` signature changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments.
2728
* [BC Break] `Builder::addResourceTemplate()` signature changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments.
2829
* Add `CorsMiddleware`, `DnsRebindingProtectionMiddleware`, and `ProtocolVersionMiddleware` for `StreamableHttpTransport`, composed automatically as the default stack via `StreamableHttpTransport::defaultMiddleware()`
29-
* **[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 `*`).
30+
* [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 `*`).
31+
* [BC Break] `Resource::__construct()` signature changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments.
32+
* [BC Break] `ResourceTemplate::__construct()` signature changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments.
33+
* [BC Break] `McpResource` and `McpResourceTemplate` attribute signatures changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments must switch to named arguments.
3034

3135
0.5.0
3236
-----

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
@@ -74,6 +74,7 @@ class Calculator
7474
### Parameters
7575

7676
- **`name`** (optional): Tool identifier. Defaults to method name if not provided.
77+
- **`title`** (optional): Human-readable display title shown in client UI. Distinct from `name`.
7778
- **`description`** (optional): Tool description. Defaults to docblock summary if not provided, otherwise uses method name.
7879
- **`annotations`** (optional): `ToolAnnotations` object for additional metadata.
7980
- **`icons`** (optional): Array of `Icon` objects for visual representation.
@@ -219,7 +220,8 @@ class ConfigProvider
219220
### Parameters
220221

221222
- **`uri`** (required): Unique resource identifier. Must comply with [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986).
222-
- **`name`** (optional): Human-readable name. Defaults to method name if not provided.
223+
- **`name`** (optional): Short resource identifier. Defaults to method name if not provided.
224+
- **`title`** (optional): Human-readable display title shown in client UI. Distinct from `name`.
223225
- **`description`** (optional): Resource description. Defaults to docblock summary if not provided.
224226
- **`mimeType`** (optional): MIME type of the resource content.
225227
- **`size`** (optional): Size in bytes if known.
@@ -367,7 +369,8 @@ class UserProvider
367369
### Parameters
368370

369371
- **`uriTemplate`** (required): URI template with `{variables}` using RFC 6570 syntax. Must comply with RFC 3986.
370-
- **`name`** (optional): Human-readable name. Defaults to method name if not provided.
372+
- **`name`** (optional): Short resource template identifier. Defaults to method name if not provided.
373+
- **`title`** (optional): Human-readable display title shown in client UI. Distinct from `name`.
371374
- **`description`** (optional): Template description. Defaults to docblock summary if not provided.
372375
- **`mimeType`** (optional): MIME type of the resource content.
373376
- **`annotations`** (optional): Additional metadata.
@@ -393,7 +396,7 @@ class PromptGenerator
393396
/**
394397
* Generates a code review request prompt.
395398
*/
396-
#[McpPrompt(name: 'code_review']
399+
#[McpPrompt(name: 'code_review')]
397400
public function reviewCode(string $language, string $code, string $focus = 'general'): array
398401
{
399402
return [
@@ -407,6 +410,7 @@ class PromptGenerator
407410
### Parameters
408411

409412
- **`name`** (optional): Prompt identifier. Defaults to method name if not provided.
413+
- **`title`** (optional): Human-readable display title shown in client UI. Distinct from `name`.
410414
- **`description`** (optional): Prompt description. Defaults to docblock summary if not provided.
411415
- **`icons`** (optional): Array of `Icon` objects for visual representation.
412416
- **`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
@@ -673,6 +673,6 @@ $server = Server::builder()
673673
| `addTool()` | handler, name?, title?, description?, annotations?, inputSchema?, ... | Register tool |
674674
| `addResource()` | handler, uri, name?, description?, mimeType?, size?, annotations? | Register resource |
675675
| `addResourceTemplate()` | handler, uriTemplate, name?, description?, mimeType?, annotations? | Register resource template |
676-
| `addPrompt()` | handler, name?, description? | Register prompt |
676+
| `addPrompt()` | handler, name?, title?, description?, icons?, meta? | Register prompt |
677677
| `add()` | definition, handler | Register an element from a schema VO + handler pair |
678678
| `build()` | - | Create the server instance |

0 commit comments

Comments
 (0)