Revision constants
PROTOCOL_VERSION is "2026-07-28". LEGACY_PROTOCOL_VERSION is "2025-06-18". SUPPORTED_PROTOCOL_VERSIONS is their readonly tuple, and SupportedProtocolVersion is its element union. The upstream root also exports its original LATEST_PROTOCOL_VERSION constant.
ProtocolResponse is the shared response-envelope union used by transport contracts; LegacyJSONRPCErrorResponse models legacy errors, including null IDs that the older upstream schema cannot express.
Wire definitions
Modern upstream definitions are exported unchanged from the package root, including request/result/notification types, JSON-RPC envelopes, implementation/capability types, tool/content/resource/prompt shapes, and protocol error constants. Types describing methods do not mean Toolgrain’s server implements those methods. Consult the supported feature scope. Legacy definitions are a separate entry point:Provenance
Both schemas are pinned to upstream commit271ecc9accafdd9b83a3c869fa67c22953b2af80. Revision folders retain their checksums, provenance, and upstream license. Corresponding JSON schemas are test-only conformance fixtures, not runtime exports or files copied to dist.
MCP runtime validation remains in @toolgrain/mcp. Import wire types directly from protocol; MCP does not re-export them. See licensing for mixed-content notices and update boundaries.