Skip to content

[Schema] Fix PHPDoc type of GetPromptRequest::$arguments#285

Merged
chr-hertel merged 1 commit intomodelcontextprotocol:mainfrom
vjik:fix-type
Apr 20, 2026
Merged

[Schema] Fix PHPDoc type of GetPromptRequest::$arguments#285
chr-hertel merged 1 commit intomodelcontextprotocol:mainfrom
vjik:fix-type

Conversation

@vjik
Copy link
Copy Markdown
Contributor

@vjik vjik commented Apr 14, 2026

Fix PHPDoc type of GetPromptRequest::$arguments from array<string, mixed> to array<string, string>

Motivation and Context

The MCP specification defines prompt arguments as a map of string keys to string values. The PHPDoc annotation for GetPromptRequest::$arguments incorrectly used array<string, mixed>, which was overly permissive and inconsistent with the spec. This fix aligns the type hint with the actual contract.

How Has This Been Tested?

The change is documentation-only (PHPDoc annotation) and does not affect runtime behavior. Existing tests continue to pass.

Breaking Changes

None. This is a PHPDoc-only change with no impact on runtime behavior or public API signatures.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Affected annotations:

  • @param array<string, string>|null $arguments in the constructor
  • @return array{name: string, arguments?: array<string, string>} in getParams()

Comment thread CHANGELOG.md Outdated
chr-hertel
chr-hertel previously approved these changes Apr 20, 2026
Copy link
Copy Markdown
Member

@chr-hertel chr-hertel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @vjik - good catch!

@chr-hertel chr-hertel changed the title Fix PHPDoc type of GetPromptRequest::$arguments [Schema] Fix PHPDoc type of GetPromptRequest::$arguments Apr 20, 2026
@chr-hertel chr-hertel added bug Something isn't working Schema Issues & PRs related to the Schema component labels Apr 20, 2026
@chr-hertel chr-hertel added this to the 0.5.0 milestone Apr 20, 2026
@chr-hertel chr-hertel merged commit d5b00cd into modelcontextprotocol:main Apr 20, 2026
17 checks passed
@vjik vjik deleted the fix-type branch April 20, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Schema Issues & PRs related to the Schema component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants