mcp

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorResult

func ErrorResult(msg string) any

func New

func New(name string, version string) *mcp.Server

func Required

func Required(schema any, names []string) any

func Schema

func Schema(props []SchemaProperty) map[string]any

func Serve

func Serve(server *mcp.Server) error

func TextResult

func TextResult(text string) any

func Tool

func Tool(server *mcp.Server, name string, description string, schema any, handler ToolHandler)

Types

type SchemaProperty

type SchemaProperty struct {
	Name        string
	Type        string
	Description string
}

func Prop

func Prop(name string, typ string, description string) SchemaProperty

type ToolHandler

type ToolHandler func(map[string]any) (any, error)

Jump to

Keyboard shortcuts

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