mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-04 10:13:53 +08:00
24 lines
552 B
Go
24 lines
552 B
Go
package mcp
|
|
|
|
import (
|
|
"context"
|
|
"reflect"
|
|
|
|
"github.com/eolinker/go-common/autowire"
|
|
|
|
"github.com/mark3labs/mcp-go/mcp"
|
|
)
|
|
|
|
type IMcpModule interface {
|
|
// Services 获取服务列表
|
|
Services(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error)
|
|
APIs(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error)
|
|
Invoke(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error)
|
|
}
|
|
|
|
func init() {
|
|
autowire.Auto[IMcpModule](func() reflect.Value {
|
|
return reflect.ValueOf(new(imlMcpModule))
|
|
})
|
|
}
|