Documentation
¶
Overview ¶
Package tools defines the MCP tools for agentcomms.
Index ¶
- func RegisterChatTools(rt *mcpkit.Runtime, manager *chat.Manager)
- func RegisterInboundTools(rt *mcpkit.Runtime, manager *InboundManager)
- func RegisterTools(rt *mcpkit.Runtime, voiceManager *voice.Manager, chatManager *chat.Manager)
- func RegisterVoiceTools(rt *mcpkit.Runtime, manager *voice.Manager)
- type AgentSummary
- type CheckMessagesInput
- type CheckMessagesOutput
- type ContinueCallInput
- type ContinueCallOutput
- type DaemonStatusInput
- type DaemonStatusOutput
- type EndCallInput
- type EndCallOutput
- type GetAgentEventsInput
- type GetAgentEventsOutput
- type GetMessagesInput
- type GetMessagesOutput
- type InboundConfig
- type InboundManager
- type InboundMessage
- type InitiateCallInput
- type InitiateCallOutput
- type ListAgentsInput
- type ListAgentsOutput
- type ListChannelsInput
- type ListChannelsOutput
- type SendAgentMessageInput
- type SendAgentMessageOutput
- type SendMessageInput
- type SendMessageOutput
- type SpeakToUserInput
- type SpeakToUserOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterChatTools ¶
RegisterChatTools registers chat-related MCP tools with the runtime.
func RegisterInboundTools ¶ added in v0.3.0
func RegisterInboundTools(rt *mcpkit.Runtime, manager *InboundManager)
RegisterInboundTools registers inbound message MCP tools with the runtime.
func RegisterTools ¶
RegisterTools registers all MCP tools (voice + chat + inbound) with the runtime. This is a convenience function that calls RegisterVoiceTools, RegisterChatTools, and RegisterInboundTools.
Types ¶
type AgentSummary ¶ added in v0.3.0
type AgentSummary struct {
ID string `json:"id"`
Type string `json:"type"`
Status string `json:"status"`
Target string `json:"target,omitempty"`
}
AgentSummary contains summary information about an agent.
type CheckMessagesInput ¶ added in v0.3.0
type CheckMessagesInput struct {
AgentID string `json:"agent_id,omitempty"`
Limit int `json:"limit,omitempty"`
}
CheckMessagesInput is the input for the check_messages tool.
type CheckMessagesOutput ¶ added in v0.3.0
type CheckMessagesOutput struct {
Messages []InboundMessage `json:"messages"`
AgentID string `json:"agent_id"`
HasMore bool `json:"has_more"`
LastSeenID string `json:"last_seen_id,omitempty"`
}
CheckMessagesOutput is the output of the check_messages tool.
type ContinueCallInput ¶
ContinueCallInput is the input for the continue_call tool.
type ContinueCallOutput ¶
type ContinueCallOutput struct {
Response string `json:"response"`
}
ContinueCallOutput is the output of the continue_call tool.
type DaemonStatusInput ¶ added in v0.3.0
type DaemonStatusInput struct{}
DaemonStatusInput is the input for the daemon_status tool.
type DaemonStatusOutput ¶ added in v0.3.0
type DaemonStatusOutput struct {
Running bool `json:"running"`
StartedAt time.Time `json:"started_at,omitempty"`
Agents int `json:"agents,omitempty"`
Providers []string `json:"providers,omitempty"`
}
DaemonStatusOutput is the output of the daemon_status tool.
type EndCallInput ¶
type EndCallInput struct {
CallID string `json:"call_id"`
Message string `json:"message,omitempty"`
}
EndCallInput is the input for the end_call tool.
type EndCallOutput ¶
type EndCallOutput struct {
DurationSeconds float64 `json:"duration_seconds"`
}
EndCallOutput is the output of the end_call tool.
type GetAgentEventsInput ¶ added in v0.3.0
type GetAgentEventsInput struct {
AgentID string `json:"agent_id,omitempty"`
SinceID string `json:"since_id,omitempty"`
Limit int `json:"limit,omitempty"`
}
GetAgentEventsInput is the input for the get_agent_events tool.
type GetAgentEventsOutput ¶ added in v0.3.0
type GetAgentEventsOutput struct {
Events []daemon.EventInfo `json:"events"`
AgentID string `json:"agent_id"`
}
GetAgentEventsOutput is the output of the get_agent_events tool.
type GetMessagesInput ¶
type GetMessagesInput struct {
Provider string `json:"provider"`
ChatID string `json:"chat_id"`
Limit int `json:"limit,omitempty"`
}
GetMessagesInput is the input for the get_messages tool.
type GetMessagesOutput ¶
type GetMessagesOutput struct {
Messages []chat.MessageInfo `json:"messages"`
}
GetMessagesOutput is the output of the get_messages tool.
type InboundConfig ¶ added in v0.3.0
type InboundConfig struct {
// AgentID is the agent identifier for this session.
// If empty, uses AGENTCOMMS_AGENT_ID env var or "default".
AgentID string
// SocketPath is the daemon socket path.
// If empty, uses the default path.
SocketPath string
}
InboundConfig holds configuration for inbound message tools.
type InboundManager ¶ added in v0.3.0
type InboundManager struct {
// contains filtered or unexported fields
}
InboundManager manages inbound message polling from the daemon.
func NewInboundManager ¶ added in v0.3.0
func NewInboundManager(cfg InboundConfig) *InboundManager
NewInboundManager creates a new inbound message manager.
func (*InboundManager) AgentID ¶ added in v0.3.0
func (m *InboundManager) AgentID() string
AgentID returns the configured agent ID.
func (*InboundManager) Close ¶ added in v0.3.0
func (m *InboundManager) Close() error
Close closes the daemon connection.
func (*InboundManager) Connect ¶ added in v0.3.0
func (m *InboundManager) Connect() error
Connect establishes connection to the daemon.
func (*InboundManager) IsConnected ¶ added in v0.3.0
func (m *InboundManager) IsConnected() bool
IsConnected returns true if connected to daemon.
type InboundMessage ¶ added in v0.3.0
type InboundMessage struct {
ID string `json:"id"`
ChannelID string `json:"channel_id"`
Provider string `json:"provider"`
Text string `json:"text"`
Timestamp time.Time `json:"timestamp"`
Type string `json:"type"`
}
InboundMessage represents a message from a human.
type InitiateCallInput ¶
type InitiateCallInput struct {
Message string `json:"message"`
}
InitiateCallInput is the input for the initiate_call tool.
type InitiateCallOutput ¶
InitiateCallOutput is the output of the initiate_call tool.
type ListAgentsInput ¶ added in v0.3.0
type ListAgentsInput struct {
IncludeOffline bool `json:"include_offline,omitempty"`
}
ListAgentsInput is the input for the list_agents tool.
type ListAgentsOutput ¶ added in v0.3.0
type ListAgentsOutput struct {
Agents []AgentSummary `json:"agents"`
}
ListAgentsOutput is the output of the list_agents tool.
type ListChannelsInput ¶
type ListChannelsInput struct{}
ListChannelsInput is the input for the list_channels tool.
type ListChannelsOutput ¶
type ListChannelsOutput struct {
Channels []chat.ChannelInfo `json:"channels"`
}
ListChannelsOutput is the output of the list_channels tool.
type SendAgentMessageInput ¶ added in v0.3.0
type SendAgentMessageInput struct {
ToAgentID string `json:"to_agent_id"`
Message string `json:"message"`
}
SendAgentMessageInput is the input for the send_agent_message tool.
type SendAgentMessageOutput ¶ added in v0.3.0
type SendAgentMessageOutput struct {
EventID string `json:"event_id"`
Delivered bool `json:"delivered"`
ToAgentID string `json:"to_agent_id"`
}
SendAgentMessageOutput is the output of the send_agent_message tool.
type SendMessageInput ¶
type SendMessageInput struct {
Provider string `json:"provider"`
ChatID string `json:"chat_id"`
Message string `json:"message"`
ReplyTo string `json:"reply_to,omitempty"`
}
SendMessageInput is the input for the send_message tool.
type SendMessageOutput ¶
type SendMessageOutput struct {
Success bool `json:"success"`
}
SendMessageOutput is the output of the send_message tool.
type SpeakToUserInput ¶
SpeakToUserInput is the input for the speak_to_user tool.
type SpeakToUserOutput ¶
type SpeakToUserOutput struct {
Success bool `json:"success"`
}
SpeakToUserOutput is the output of the speak_to_user tool.