Documentation
¶
Index ¶
- Constants
- func InputSchema(name string) (map[string]any, bool)
- func OutputSchema(name string) (map[string]any, bool)
- type CallRequest
- type CapabilityItem
- type InspectRequest
- type ManageRequest
- type Result
- type SearchRequest
- type Service
- func (s *Service) Call(ctx context.Context, request CallRequest) (Result, error)
- func (s *Service) CapabilityItems() []CapabilityItem
- func (s *Service) Close() error
- func (s *Service) DeliverOAuthCallback(result oauthclient.CallbackResult) error
- func (s *Service) Inspect(ctx context.Context, request InspectRequest) (Result, error)
- func (s *Service) Manage(ctx context.Context, request ManageRequest) (Result, error)
- func (s *Service) RemoveOAuthCallback(id string)
- func (s *Service) RemoveOAuthGrant(storageKey string) error
- func (s *Service) RuntimeCount() int
- func (s *Service) Search(ctx context.Context, request SearchRequest) (Result, error)
- func (s *Service) SetOAuthCallback(option oauthclient.CallbackOption) error
- type ToolError
Constants ¶
View Source
const ( ToolManage = "mcp_manage" ToolSearch = "mcp_tool_search" ToolInspect = "mcp_tool_inspect" ToolCall = "mcp_tool_call" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CallRequest ¶ added in v0.8.2
CallRequest.Arguments 是第三方 MCP 工具 schema 决定的动态叶子,必须保持开放对象。
type CapabilityItem ¶ added in v0.8.2
type InspectRequest ¶ added in v0.8.2
type InspectRequest struct {
Name string `json:"name"`
}
type ManageRequest ¶ added in v0.8.2
type ManageRequest struct {
Action string `json:"action"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Transport string `json:"transport,omitempty"`
URL string `json:"url,omitempty"`
Command string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
CWD string `json:"cwd,omitempty"`
HeaderEnv map[string]string `json:"header_env,omitempty"`
EnvFromEnv map[string]string `json:"env_from_env,omitempty"`
Key string `json:"key,omitempty"`
Value *string `json:"value,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
TimeoutMS *int `json:"timeout_ms,omitempty"`
CallbackID string `json:"callback_id,omitempty"`
}
ManageRequest 是 mcp_manage 进入动态 MCP capability 后的稳定输入契约。
type SearchRequest ¶ added in v0.8.2
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CapabilityItems ¶ added in v0.8.2
func (s *Service) CapabilityItems() []CapabilityItem
func (*Service) DeliverOAuthCallback ¶ added in v0.9.1
func (s *Service) DeliverOAuthCallback(result oauthclient.CallbackResult) error
func (*Service) RemoveOAuthCallback ¶ added in v0.9.1
func (*Service) RemoveOAuthGrant ¶ added in v0.9.1
func (*Service) RuntimeCount ¶ added in v1.0.0
func (*Service) SetOAuthCallback ¶ added in v0.9.1
func (s *Service) SetOAuthCallback(option oauthclient.CallbackOption) error
Click to show internal directories.
Click to hide internal directories.