While working with the Prompt API, I noticed a discrepancy between the official MCP specification and the current PHP SDK implementation.
According to the Model Context Protocol Specification:
The prompt object supports the following optional fields:
title: Optional human-readable name of the prompt for display purposes
arguments: Optional list of arguments for prompt customization
However, these fields do not appear to be supported or exposed in the current PHP SDK.
Expected behavior
The PHP SDK should support:
- Defining a
title for prompts
- Defining and passing
arguments for prompt parameterization
Current behavior
There is no way to:
- Set a human-readable title for a prompt
- Define structured arguments for prompt customization
Why this matters
title improves usability in UIs and tooling
arguments are essential for building reusable and parameterized prompts
- Lack of support leads to incomplete spec compliance and limits interoperability
Suggested solution
-
Extend the Prompt definition in the SDK to include:
title?: string
arguments?: array
-
Ensure serialization/deserialization aligns with the MCP spec
-
Optionally provide helper classes or typing for arguments
While working with the Prompt API, I noticed a discrepancy between the official MCP specification and the current PHP SDK implementation.
According to the Model Context Protocol Specification:
However, these fields do not appear to be supported or exposed in the current PHP SDK.
Expected behavior
The PHP SDK should support:
titlefor promptsargumentsfor prompt parameterizationCurrent behavior
There is no way to:
Why this matters
titleimproves usability in UIs and toolingargumentsare essential for building reusable and parameterized promptsSuggested solution
Extend the Prompt definition in the SDK to include:
title?: stringarguments?: arrayEnsure serialization/deserialization aligns with the MCP spec
Optionally provide helper classes or typing for arguments