Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 15, 2025

  • Move MCP add command functions to separate mcp_add.go file
  • Move MCP list command functions to separate mcp_list.go file
  • Replace custom getWorkflowPath with existing workflow resolution helpers
  • Add integration test step for 'mcp list dev' command
  • Update tests to use new function names
  • Validate all changes build, test, format and lint successfully

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add commands to manage MCP tools in an agentic workflow, similar to Claude code cli. gh aw mcp add <workflowid> ... gh aw mcp list <workflowid> gh aw mcp inspect <workflowid> ... - aw is already the name of the extension so do not add a comm... Add MCP tools management commands matching Claude CLI syntax Sep 15, 2025
Copilot AI requested a review from pelikhan September 15, 2025 16:30
Copy link
Contributor

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot add a step in the integration workflow that runs mcp list dev


// Helper functions

func getWorkflowPath(workflowID string) (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot there must be already other helpers for resolving a workflow file. Find those helpers and reuse them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced the custom getWorkflowPath function with resolveWorkflowPath that uses the existing readWorkflowFile helper for consistent workflow path resolution throughout the codebase. Commit: a1c55cc

}

// AddMCPToolWithFlags adds an MCP tool using flags from the cobra command
func AddMCPToolWithFlags(workflowID, toolName string, toolConfigArgs []string, cmd *cobra.Command, verbose bool) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot move to mcp_add.go file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved NewMCPAddCommand and AddMCPToolWithFlags functions to the new mcp_add.go file for better code organization. Commit: a1c55cc

}

// NewMCPListCommand creates the mcp list command
func NewMCPListCommand() *cobra.Command {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot mode to mcp_list.go list

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved NewMCPListCommand and ListMCPTools functions to the new mcp_list.go file for better code organization. Commit: a1c55cc

}

// NewMCPAddCommand creates the mcp add command
func NewMCPAddCommand() *cobra.Command {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot move to mcp_add.go file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved AddMCPToolWithFlags function to the new mcp_add.go file for better code organization. Commit: a1c55cc

}

// ListMCPTools lists MCP tools in a workflow
func ListMCPTools(workflowID string, showAllowedTools bool, outputFormat string, verbose bool) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot move to mcp_list.go file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved ListMCPTools function to the new mcp_list.go file for better code organization. Commit: a1c55cc

@pelikhan pelikhan closed this Sep 15, 2025
@pelikhan pelikhan deleted the copilot/fix-142c5a63-cca6-4e0f-9e35-1c0cda79f321 branch September 15, 2025 21:50
Copy link
Contributor Author

Copilot AI commented Sep 15, 2025

@copilot add a step in the integration workflow that runs mcp list dev

Added a "Test MCP list command" step in the integration workflow that runs mcp list dev to test the MCP listing functionality. Commit: a1c55cc

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.contoso.com
    • Triggering command: /tmp/go-build2739650682/b279/cli.test -test.testlogfile=/tmp/go-build2739650682/b279/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)
    • Triggering command: /tmp/go-build3914081739/b279/cli.test -test.testlogfile=/tmp/go-build3914081739/b279/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants