model

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package model defines the Tool interface used throughout mcp-toolkit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tool

type Tool interface {
	Definition() *sdkmcp.Tool
}

Tool is the interface every concrete tool must satisfy.

By making each tool a type (rather than a plain function), the tool becomes a first-class object that can:

  • carry its own dependencies (injected at construction time)
  • be polymorphically stored in a Registry
  • be dispatched by name without a separate lookup table

A compile-time guard is recommended in each implementation:

var _ model.Tool = MyTool{}

Jump to

Keyboard shortcuts

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