mcptest

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package mcptest provides shared test doubles for the mcp package's interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeRegistry

type FakeRegistry struct {
	CallErr    error
	CallResult *mcp.RawToolResult
	ListErr    error
	ReadErr    error
}

FakeRegistry is a minimal mcp.Registry: it advertises one "echo" tool and one "caic://tasks" resource, enough to exercise protocol envelopes. Set CallErr, CallResult, ListErr, or ReadErr to customize a tool or resource response.

func (FakeRegistry) CallTool

CallTool implements mcp.Registry.

func (FakeRegistry) Instructions

func (FakeRegistry) Instructions(context.Context) (string, error)

Instructions implements mcp.Registry.

func (FakeRegistry) ListResources

ListResources implements mcp.Registry.

func (FakeRegistry) ReadResource

func (f FakeRegistry) ReadResource(_ context.Context, uri string) (mcp.ResourcesReadResult, error)

ReadResource implements mcp.Registry.

func (FakeRegistry) Resources

Resources implements mcp.Registry.

func (FakeRegistry) SubscribeResourceUpdates

SubscribeResourceUpdates implements mcp.SubscriptionRegistry.

func (FakeRegistry) Tools

Tools implements mcp.Registry.

Jump to

Keyboard shortcuts

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