registry

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTool

func RegisterTool[In, Out any](r *Registry, name, description string, handler ToolHandlerFor[In, Out])

RegisterTool は新しいツールを登録する ツールが無効化されている場合でも登録はするが、呼び出し時にチェックされる

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry はツールの登録と管理を行う

func New

func New(cfg *config.Config) *Registry

New は新しい Registry を作成する

func (*Registry) CheckToolEnabled

func (r *Registry) CheckToolEnabled(toolName string) error

CheckToolEnabled はツールが有効でない場合にエラーを返す

func (*Registry) GetEnabledTools

func (r *Registry) GetEnabledTools() []string

GetEnabledTools は有効なツールの名前リストを返す

func (*Registry) IsRegistered

func (r *Registry) IsRegistered(toolName string) bool

IsRegistered はツールが登録されているかを返す

func (*Registry) IsToolEnabled

func (r *Registry) IsToolEnabled(toolName string) bool

IsToolEnabled はツールが有効かどうかを返す

func (*Registry) Server

func (r *Registry) Server() *mcp.Server

Server は MCP サーバーを返す

type ToolHandlerFor

type ToolHandlerFor[In, Out any] func(ctx context.Context, req *mcp.CallToolRequest, input In) (*mcp.CallToolResult, Out, error)

ToolHandlerFor is a type alias for MCP tool handlers

Jump to

Keyboard shortcuts

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