Help us shape the future of Go! Take the 2026 Go Developer Survey

conformance

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package conformance checks MCP results the way a strict client checks them, so a server fails here rather than in someone's editor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckToolResult

func CheckToolResult(outputSchema any, result map[string]any) error

CheckToolResult checks a tools/call result against the output schema its tool declares. result is the result object as it came over the wire.

The specification requires a tool that declares an outputSchema to return structuredContent that conforms to it. The official TypeScript SDK — used by OpenCode, among others — enforces both: it rejects a result without structuredContent with error -32600 and validates one that has it. The Go SDK this tester is built on checks neither on the client side, and neither do Claude Code or crush, so a server can break every such tool without any of them showing it. That happened to codebase-memory: eleven tools, all rejected by OpenCode, all passing here.

A result with isError is not checked; the specification exempts it, and so does the TypeScript SDK.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL