Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 16, 2025

Exposes the gh aw update command through the MCP protocol with essential update flags.

Changes

  • pkg/cli/mcp_server.go: Added update tool with handler that wraps the CLI command

    • Supports core update flags: workflows, major, force
    • Follows existing tool patterns (status, compile, logs, audit, mcp-inspect, add)
    • Updated help text to list update tool
  • pkg/cli/mcp_server_test.go: Updated test expectations

    • Modified TestMCPServer_ListTools to expect 7 tools (was 6)
    • Added TestMCPServer_UpdateToolSchema to validate tool schema and description

MCP Tool Arguments

{
  "name": "update",
  "arguments": {
    "workflows": ["workflow-id"],
    "major": true,
    "force": true
  }
}
Original prompt

Add an "update" tool to the MCP-server mcp server in .go.

This tool wraps the "update" command.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 16, 2025 01:08
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Comment on lines 538 to 542
Engine string `json:"engine,omitempty" jsonschema:"Override AI engine (claude, codex, copilot, custom)"`
PR bool `json:"pr,omitempty" jsonschema:"Create a pull request with the workflow changes"`
Dir string `json:"dir,omitempty" jsonschema:"Relative directory containing workflows (default: .github/workflows)"`
NoStopAfter bool `json:"no_stop_after,omitempty" jsonschema:"Remove any stop-after field from the updated workflow"`
StopAfter string `json:"stop_after,omitempty" jsonschema:"Override stop-after value in the updated workflow (e.g., '+48h', '2025-12-31 23:59:59')"`
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot remove support for those flags

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed support for engine, pr, dir, no_stop_after, and stop_after flags. The update tool now only supports workflows, major, and force parameters. (4a014fd)

Copilot AI changed the title [WIP] Add update tool to MCP server in Go Add update tool to MCP server Nov 16, 2025
Copilot AI requested a review from pelikhan November 16, 2025 01:20
Copilot finished work on behalf of pelikhan November 16, 2025 01:20
…te tool

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot finished work on behalf of pelikhan November 16, 2025 01:27
@github-actions
Copy link
Contributor

Agentic Changeset Generator triggered by this pull request.

@pelikhan pelikhan marked this pull request as ready for review November 16, 2025 01:37
Copilot AI review requested due to automatic review settings November 16, 2025 01:37
Copilot finished reviewing on behalf of pelikhan November 16, 2025 01:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds an "update" tool to the MCP server that exposes the gh aw update command through the Model Context Protocol. The tool enables AI agents to update workflows from their source repositories and check for gh-aw extension updates.

Key Changes:

  • Added update tool to MCP server with essential flags (workflows, major, force)
  • Updated MCP server help text to document the new tool
  • Added comprehensive test coverage for the new tool's schema and functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
pkg/cli/mcp_server.go Implements the update tool with handler that wraps the CLI command, following existing tool patterns (status, compile, logs, audit, mcp-inspect, add)
pkg/cli/mcp_server_test.go Updates test expectations to include 7 tools (was 6) and adds schema validation test for the update tool
.changeset/patch-add-update-tool-mcp.md Documents the change for release notes as a patch-level update
.github/workflows/docs-noob-tester.lock.yml Pins Playwright MCP version from @latest to @1.56.1 (unrelated workflow recompilation)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pelikhan pelikhan merged commit b6f06c2 into main Nov 16, 2025
10 checks passed
@pelikhan pelikhan deleted the copilot/add-update-tool-mcp-server branch November 16, 2025 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants