Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoCurrentNovel = errors.New("当前没有打开的小说")
ErrNoCurrentNovel 表示 Goink 界面当前没有打开的小说。
Functions ¶
This section is empty.
Types ¶
type CurrentNovel ¶
CurrentNovel 是每次 MCP 调用看到的当前小说快照。
type CurrentNovelFunc ¶
type CurrentNovelFunc func(context.Context) (CurrentNovel, error)
CurrentNovelFunc 在请求开始时读取当前小说,不使用上次打开的历史设置。
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server 将明确选中的 Goink 工具提供为本地 MCP 协议端点。
func New ¶
func New(registry *mcp_tools.Registry, db *gorm.DB, current CurrentNovelFunc, logger *slog.Logger, allowed []string) *Server
New 构建默认不监听的服务。allowed 只包含明确允许对外调用的工具名。
Click to show internal directories.
Click to hide internal directories.