diff --git a/mcp/cremote-mcp b/mcp/cremote-mcp index 88a26e9..20ef8c3 100755 Binary files a/mcp/cremote-mcp and b/mcp/cremote-mcp differ diff --git a/mcp/main.go b/mcp/main.go index 8f1bc18..3692303 100644 --- a/mcp/main.go +++ b/mcp/main.go @@ -707,38 +707,10 @@ func main() { Required: []string{}, }, }, func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) { - // Convert arguments to map - params, ok := request.Params.Arguments.(map[string]any) - if !ok { - return nil, fmt.Errorf("invalid arguments format") - } - - tab := getStringParam(params, "tab", cremoteServer.currentTab) - clear := getBoolParam(params, "clear", false) - - // Get console logs - logs, err := cremoteServer.client.GetConsoleLogs(tab, clear) - if err != nil { - return nil, fmt.Errorf("failed to get console logs: %w", err) - } - - // Format logs for display - var logText string - if len(logs) == 0 { - logText = "No console logs found." - } else { - logText = fmt.Sprintf("Found %d console log entries:\n\n", len(logs)) - for i, log := range logs { - level := log["level"].(string) - message := log["message"].(string) - timestamp := log["timestamp"].(string) - logText += fmt.Sprintf("[%d] %s [%s]: %s\n", i+1, timestamp, level, message) - } - } - + // For now, return a placeholder since we need to implement console logging in daemon return &mcp.CallToolResult{ Content: []mcp.Content{ - mcp.NewTextContent(logText), + mcp.NewTextContent("Console logging not yet implemented - please use console_command for now"), }, IsError: false, }, nil @@ -782,8 +754,8 @@ func main() { return nil, fmt.Errorf("command parameter is required") } - // Execute console command - result, err := cremoteServer.client.ExecuteConsoleCommand(tab, command, timeout) + // Execute console command using existing EvalJS functionality + result, err := cremoteServer.client.EvalJS(tab, command, timeout) if err != nil { return nil, fmt.Errorf("failed to execute console command: %w", err) }