Files
membank/aio-mcp/internal/tools/registry.go
张威33321 a8fa159f0f chore: 同步本地更改
- 新增 aio-mcp 项目框架
- 新增 .trae/skills/ OCR/SKU 设计工具
- 更新 auto-check 配置和 stress 包
- 删除 fnhelp 文档目录
- 更新 Docker 压力测试脚本
2026-08-27 20:38:13 +08:00

27 lines
909 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Package tools 集中管理 aio-mcp 的全部 MCP 工具。
//
// # 新增工具的固定步骤
//
// 1. 在本目录新建一个文件(如 weather.go实现
// func registerXXX(s *mcp.Server)
// 2. 在 RegisterAll 中追加一行 registerXXX(s)
//
// 工具通过泛型 mcp.AddTool[In, Out] 注册:输入参数用 struct 定义,
// 加 json 与 jsonschema tag描述、必填SDK 会自动生成 inputSchema
// 并做输入校验,无需手工写 JSON Schema。
//
// 后续工具需要共享状态SQLite 连接、配置、http client 等)时,
// 把 RegisterAll 演进为 RegisterAll(s *mcp.Server, deps *Deps)
// 在 server.New 里构造 deps 传入即可,各工具文件只改签名。
package tools
import (
"github.com/modelcontextprotocol/go-sdk/mcp"
)
// RegisterAll 注册所有工具。
func RegisterAll(s *mcp.Server) {
registerPing(s)
registerEcho(s)
}