mcptest

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 "example://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, *mcp.RequestMeta) (string, error)

Instructions implements mcp.Registry.

func (FakeRegistry) ListResources

ListResources implements mcp.Registry.

func (FakeRegistry) ReadResource

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