Documentation
¶
Index ¶
- func Call[Output any](ctx context.Context, dependency *Dependency, name string, input any) (Output, error)
- func Connect(ctx context.Context, name string) (*mcp.ClientSession, error)
- func Serve(ctx context.Context, server *mcp.Server) error
- type Dependency
- type Principal
- type RequestContext
- type ToolCallError
- type ToolSchema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dependency ¶
type Dependency struct {
Name string
Tools map[string]ToolSchema
}
func (*Dependency) CallTool ¶
func (d *Dependency) CallTool(ctx context.Context, params *mcp.CallToolParams) (*mcp.CallToolResult, error)
type Principal ¶
type Principal struct {
Issuer string `json:"issuer"`
Subject string `json:"subject"`
ClientID string `json:"clientId"`
Scopes []string `json:"scopes"`
Claims map[string]json.RawMessage `json:"claims"`
Actor json.RawMessage `json:"actor,omitempty"`
}
type RequestContext ¶
type RequestContext struct {
Principal *Principal `json:"principal"`
}
func Context ¶
func Context(ctx context.Context) RequestContext
type ToolCallError ¶
type ToolCallError struct {
App string
Tool string
Code string
Result *mcp.CallToolResult
}
func (*ToolCallError) Error ¶
func (e *ToolCallError) Error() string
type ToolSchema ¶
type ToolSchema struct {
Input, Output string
}
Click to show internal directories.
Click to hide internal directories.