-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
Description
Summary
Implement support for the optional _meta field in CallToolRequestParams as defined in the MCP
specification (2025-11-25).
Background
The MCP specification defines an optional _meta field in tool call requests that allows clients to
pass arbitrary metadata alongside tool invocations. This metadata can be used for:
- Request tracking and correlation
- Client context information
- Debugging and observability
- Testing metadata propagation in MCP implementations
Current State
Yardstick currently does not support the _meta field in tool call requests, which limits its
usefulness as a testing server for:
- Validating that MCP clients properly send metadata
- Testing that MCP proxies/routers preserve metadata
- Verifying metadata-based behaviors in MCP implementations
Proposed Changes
-
Tool Handler
- Accept
_metafield in tool call requests - Parse and validate the metadata structure
- Echo back metadata in responses (for testing purposes)
- Accept
-
Test Tools
- Add a test tool that specifically validates
_metahandling (e.g.,echo_meta) - Return metadata in tool results to verify round-trip behavior
- Support testing metadata propagation scenarios
- Add a test tool that specifically validates
-
Logging/Output
- Log received
_metafields for debugging - Include metadata in any diagnostic output
- Log received
Acceptance Criteria
-
_metafield is accepted in tool call requests - Server does not reject requests containing
_meta - Test tool(s) can echo back received metadata
- Metadata is logged for debugging purposes
- Unit tests validate metadata handling
- Documentation updated with
_metausage examples
Use Cases for Testing
- Validate that Virtual MCP servers preserve
_metawhen forwarding - Test that proxies don't strip metadata from requests
- Verify metadata-based request correlation in observability systems
- Test custom metadata extensions in MCP implementations
References
Additional Context
As a testing server, Yardstick should support all standard MCP features including optional fields like
_meta to enable comprehensive testing of MCP implementations.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels