You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MCP 2025-11-25 specification defines an optional `title` property on
Prompt for human-readable display in UI contexts, distinct from the
programmatic `name` identifier. This was missing from the SDK.
BC Break: Builder::addPrompt() signature changed — $title parameter added
between $name and $description. Callers using positional arguments for
$description must switch to named arguments.
Closes#276
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add optional `title` field to `Prompt` and `McpPrompt` for MCP spec compliance
13
+
***BC Break**: `Builder::addPrompt()` signature changed — `$title` parameter added between `$name` and `$description`. Callers using positional arguments for `$description` must switch to named arguments.
Copy file name to clipboardExpand all lines: tests/Conformance/server.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -58,10 +58,10 @@
58
58
->addResourceTemplate([Elements::class, 'resourceTemplate'], 'test://template/{id}/data', 'template', 'A resource template with parameter substitution', 'application/json')
59
59
->addResource(staticfn () => 'Watched resource content', 'test://watched-resource', 'watched-resource', 'A resource that can be watched')
60
60
// Prompts
61
-
->addPrompt(staticfn () => [['role' => 'user', 'content' => 'This is a simple prompt for testing.']], 'test_simple_prompt', 'A simple prompt without arguments')
62
-
->addPrompt([Elements::class, 'promptWithArguments'], 'test_prompt_with_arguments', 'A prompt with required arguments')
63
-
->addPrompt([Elements::class, 'promptWithEmbeddedResource'], 'test_prompt_with_embedded_resource', 'A prompt that includes an embedded resource')
64
-
->addPrompt([Elements::class, 'promptWithImage'], 'test_prompt_with_image', 'A prompt that includes image content')
61
+
->addPrompt(staticfn () => [['role' => 'user', 'content' => 'This is a simple prompt for testing.']], name: 'test_simple_prompt', description:'A simple prompt without arguments')
62
+
->addPrompt([Elements::class, 'promptWithArguments'], name: 'test_prompt_with_arguments', description:'A prompt with required arguments')
63
+
->addPrompt([Elements::class, 'promptWithEmbeddedResource'], name: 'test_prompt_with_embedded_resource', description:'A prompt that includes an embedded resource')
64
+
->addPrompt([Elements::class, 'promptWithImage'], name: 'test_prompt_with_image', description:'A prompt that includes image content')
0 commit comments