Skip to content

Fix PHPDoc type of GetPromptRequest::$arguments#285

Open
vjik wants to merge 1 commit intomodelcontextprotocol:mainfrom
vjik:fix-type
Open

Fix PHPDoc type of GetPromptRequest::$arguments#285
vjik wants to merge 1 commit intomodelcontextprotocol:mainfrom
vjik:fix-type

Conversation

@vjik
Copy link
Copy Markdown

@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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant