[Try] Implement exact-revision 2026 tools/call support - #281
Draft
galatanovidiu wants to merge 10 commits into
Draft
[Try] Implement exact-revision 2026 tools/call support#281galatanovidiu wants to merge 10 commits into
galatanovidiu wants to merge 10 commits into
Conversation
This reverts commit fdc5794.
Replace the codec hierarchy with one result encoder and keep the internal outcome limited to completed calls. Centralize revision and method validation in RequestRouter while HTTP only checks header and metadata agreement. Replace private-state assertions with request-level behavior coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
See WordPress/php-mcp-schema#11.
This draft tries to consume the proposed revisioned php-mcp-schema 0.2.0 API and add a deliberately bounded
2026-07-28tools/callpath while preserving the established protocol behavior.Why?
The two protocol revisions have different request metadata, lifecycle, validation, and result shapes. Treating them as broad eras or allowing unknown versions to fall through to an older codec can silently serialize the wrong contract. JSON decoding must also preserve object-versus-list identity so object-shaped fields cannot accept
[].How?
V20251125namespace and adds side-by-side result codecs.2024-11-05,2025-06-18, and2025-11-25explicitly to the2025-11-25schema tree;2026-07-28maps to its own tree.clientCapabilitiesandarguments, accepting real objects and rejecting empty lists, non-empty lists, null, and scalar shapes.ToolsHandler::call_tool()compatible with the2025-11-25DTO contract.2026-07-28support to stateless, completedtools/callrequests. This draft does not implement discover/list/resources/prompts, notifications, sampling, elicitation, roots, streaming, tasks, or multi-round-trip Adapter dispatch.The Composer configuration currently uses the sibling php-mcp-schema checkout as an unreleased 0.2.0 path repository. That is intentional for coordinated local testing and must be replaced by an installable revision or release before this can become production-ready.
Use of AI Tools
AI assistance: Yes
Tool(s): Codex
Model(s): GPT-5
Used for: Coordinated implementation, regression coverage, and verification under maintainer direction; the resulting changes and test evidence were reviewed locally.
Testing Instructions
npm run test:php -- --do-not-cache-result— 1,084 passed, 1 multisite-only skip, 0 failed; 4,118 assertions.npm run wp-env:cli -- vendor/bin/phpcs --no-cache— 69 files, clean.npm run lint:php:stan— 69 files, 0 errors.composer validate --strict— passed.Changelog Entry