v1mcp

package
v0.0.63 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AgentService_GetConfigTool        = mcp.Tool{Name: "get_config", Description: "Retrieve the complete devloop configuration for a project to understand\navailable rules, commands, file watch patterns, and project settings.\n\nEssential information provided:\n- Available build/test rules (rules[].name)\n- Commands executed by each rule (rules[].commands)\n- File patterns that trigger each rule (rules[].watch patterns)\n- Project settings like colors, logging, debouncing\n\nUsage Examples:\n- Discover available rules: Parse rules[].name from response\n- Find test commands: Look for rules with \"test\" in name or commands\n- Understand file triggers: Examine rules[].watch.patterns\n\nResponse Format: JSON string containing the complete .devloop.yaml content\nwith resolved settings and rule definitions.\nmcp_tool_name:get_config\n", InputSchema: mcp.ToolInputSchema{Type: "", Properties: map[string]interface{}(nil), Required: []string(nil)}, RawInputSchema: json.RawMessage{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x7b, 0x7d, 0x2c, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x7d}}
	AgentService_GetRuleTool          = mcp.Tool{Name: "get_rule_status", Description: "Get the current execution status and history of a specific rule.\nUse this to monitor build/test progress and check for failures.\n\nStatus Information Provided:\n- Whether the rule is currently running\n- When the current/last execution started\n- Result of the last execution (SUCCESS, FAILED, RUNNING, IDLE)\n- Execution history timestamps\n\nCommon Use Cases:\n- Check if a build is still running after triggering\n- Verify if tests passed or failed\n- Monitor long-running development servers\n- Debug why a rule isn't executing\n\nReturns: Detailed status including timing and execution results\nmcp_tool_name:get_rule_status\n", InputSchema: mcp.ToolInputSchema{Type: "", Properties: map[string]interface{}(nil), Required: []string(nil)}, RawInputSchema: json.RawMessage{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x7d}}
	AgentService_ListWatchedPathsTool = mcp.Tool{Name: "list_watched_paths", Description: "List all file glob patterns being monitored by a project for automatic rule triggering.\nUse this to understand what files cause rebuilds and which rules will execute.\n\nPattern Information:\n- All include/exclude patterns from all rules combined\n- Glob syntax: **/*.go, src/**/*.js, **/test_*.py, etc.\n- Patterns are resolved relative to the project root\n\nCommon Use Cases:\n- Understand what file changes trigger builds\n- Debug why edits aren't triggering rules\n- Plan file organization to optimize build triggers\n- Analyze project structure and dependencies\n\nReturns: Array of glob patterns currently being watched\nmcp_tool_name:list_watched_paths\n", InputSchema: mcp.ToolInputSchema{Type: "", Properties: map[string]interface{}(nil), Required: []string(nil)}, RawInputSchema: json.RawMessage{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x7b, 0x7d, 0x2c, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x7d}}
	AgentService_TriggerRuleTool      = mcp.Tool{Name: "trigger_rule", Description: "Manually execute a specific rule to run builds, tests, or other commands.\nThis bypasses file watching and immediately starts the rule's command sequence.\n\nTrigger Behavior:\n- Terminates any currently running instance of the rule\n- Executes all commands in the rule definition sequentially\n- Updates rule status to RUNNING, then SUCCESS/FAILED based on results\n- Generates log output that can be retrieved via streaming endpoints\n\nCommon Use Cases:\n- Run builds on demand (\"trigger the backend build\")\n- Execute test suites (\"run the test rule\")\n- Restart development servers (\"trigger the dev-server rule\")\n- Force regeneration (\"trigger the protobuf rule\")\n\nReturns: Immediate response indicating if trigger was accepted\nUse GetRule() to monitor actual execution progress\nmcp_tool_name:trigger_rule\n", InputSchema: mcp.ToolInputSchema{Type: "", Properties: map[string]interface{}(nil), Required: []string(nil)}, RawInputSchema: json.RawMessage{0x7b, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x5b, 0x5d, 0x2c, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x7d}}
)

Functions

func ForwardToAgentServiceClient

func ForwardToAgentServiceClient(s *mcpserver.MCPServer, client AgentServiceClient)

ForwardToAgentServiceClient registers a gRPC client, to forward MCP calls to it.

func ForwardToConnectAgentServiceClient

func ForwardToConnectAgentServiceClient(s *mcpserver.MCPServer, client ConnectAgentServiceClient)

ForwardToConnectAgentServiceClient registers a connectrpc client, to forward MCP calls to it.

func RegisterAgentServiceHandler

func RegisterAgentServiceHandler(s *mcpserver.MCPServer, srv AgentServiceServer)

Types

type AgentServiceClient

type AgentServiceClient interface {
	GetConfig(ctx context.Context, req *v1.GetConfigRequest, opts ...grpc.CallOption) (*v1.GetConfigResponse, error)
	GetRule(ctx context.Context, req *v1.GetRuleRequest, opts ...grpc.CallOption) (*v1.GetRuleResponse, error)
	ListWatchedPaths(ctx context.Context, req *v1.ListWatchedPathsRequest, opts ...grpc.CallOption) (*v1.ListWatchedPathsResponse, error)
	TriggerRule(ctx context.Context, req *v1.TriggerRuleRequest, opts ...grpc.CallOption) (*v1.TriggerRuleResponse, error)
}

AgentServiceClient is compatible with the grpc-go client interface.

type AgentServiceServer

type AgentServiceServer interface {
	GetConfig(ctx context.Context, req *v1.GetConfigRequest) (*v1.GetConfigResponse, error)
	GetRule(ctx context.Context, req *v1.GetRuleRequest) (*v1.GetRuleResponse, error)
	ListWatchedPaths(ctx context.Context, req *v1.ListWatchedPathsRequest) (*v1.ListWatchedPathsResponse, error)
	TriggerRule(ctx context.Context, req *v1.TriggerRuleRequest) (*v1.TriggerRuleResponse, error)
}

AgentServiceServer is compatible with the grpc-go server interface.

type ConnectAgentServiceClient

ConnectAgentServiceClient is compatible with the connectrpc-go client interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL