Documentation
¶
Index ¶
- type A2AClientAdapter
- func (a *A2AClientAdapter) CallTool(ctx context.Context, name string, arguments map[string]any) (*mcp.ToolCallResult, error)
- func (a *A2AClientAdapter) Initialize(ctx context.Context) error
- func (a *A2AClientAdapter) InitializeFromSkills(version string, skills []a2a.Skill)
- func (a *A2AClientAdapter) IsInitialized() bool
- func (a *A2AClientAdapter) Name() string
- func (a *A2AClientAdapter) RefreshTools(ctx context.Context) error
- func (a *A2AClientAdapter) ServerInfo() mcp.ServerInfo
- func (a *A2AClientAdapter) Tools() []mcp.Tool
- func (a *A2AClientAdapter) WaitForReady(ctx context.Context, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type A2AClientAdapter ¶
type A2AClientAdapter struct {
// contains filtered or unexported fields
}
A2AClientAdapter adapts an A2A agent to the mcp.AgentClient interface. This enables agents to be "equipped" as skills by other agents through the unified MCP gateway, treating A2A agents as tool providers.
func NewA2AClientAdapter ¶
func NewA2AClientAdapter(name string, endpoint string) *A2AClientAdapter
NewA2AClientAdapter creates a new adapter wrapping an A2A client.
func (*A2AClientAdapter) CallTool ¶
func (a *A2AClientAdapter) CallTool(ctx context.Context, name string, arguments map[string]any) (*mcp.ToolCallResult, error)
CallTool invokes an A2A skill using the message/send method.
func (*A2AClientAdapter) Initialize ¶
func (a *A2AClientAdapter) Initialize(ctx context.Context) error
Initialize fetches the A2A agent card and converts skills to tools.
func (*A2AClientAdapter) InitializeFromSkills ¶
func (a *A2AClientAdapter) InitializeFromSkills(version string, skills []a2a.Skill)
InitializeFromSkills initializes the adapter directly from skill data. This is used for local A2A agents where we already have the skill info from the topology config and don't need to make an HTTP call.
func (*A2AClientAdapter) IsInitialized ¶
func (a *A2AClientAdapter) IsInitialized() bool
IsInitialized returns whether the adapter has been initialized.
func (*A2AClientAdapter) Name ¶
func (a *A2AClientAdapter) Name() string
Name returns the adapter name used for tool prefixing.
func (*A2AClientAdapter) RefreshTools ¶
func (a *A2AClientAdapter) RefreshTools(ctx context.Context) error
RefreshTools re-fetches the A2A agent card and updates tools.
func (*A2AClientAdapter) ServerInfo ¶
func (a *A2AClientAdapter) ServerInfo() mcp.ServerInfo
ServerInfo returns server info from the A2A agent card.
func (*A2AClientAdapter) Tools ¶
func (a *A2AClientAdapter) Tools() []mcp.Tool
Tools returns MCP tools derived from A2A skills.
func (*A2AClientAdapter) WaitForReady ¶
WaitForReady waits for the A2A agent to become available with retries.