Skip to content

add create automation tag tool - #3563

Open
notapopsicle wants to merge 3 commits into
notapopsicle/get-automation-tagfrom
notapopsicle/create-automation-tag
Open

notapopsicle wants to merge 3 commits into
notapopsicle/get-automation-tagfrom
notapopsicle/create-automation-tag

Conversation

@notapopsicle

@notapopsicle notapopsicle commented Oct 23, 2026 •

Copy link
Copy Markdown

Summary

Add create_automation_tag to create a repository automation tag through public REST.

Why

Agents need to create tags to organize automations. Creating a tag doesn't execute an automation. The tool stays opt-in and is excluded from read-only mode; live REST availability and permission behavior still need integration testing.

What changed

  • Register the create tool with its schema, docs and production-path tests.
  • Generate a fresh idempotency key for each call and document that retrying can create another tag.

MCP impact

  • New tool added: create_automation_tag in copilot_automations, with required owner, repo and name and an optional description.

Prompts tested (tool changes only)

No natural-language prompts or live API calls were tested. Automated tests exercise MCP discovery and CallTool with mocked REST responses in both supported protocol modes.

Security / limits

  • Auth / permissions considered: uses the existing authenticated client and repo scope filter, and excludes the tool from read-only discovery.
  • Data exposure, filtering, or token/size limits considered: returns known public fields, sanitizes tag names and descriptions, preserves REST errors and rejects exact-dot repository paths before HTTP. Calls don't deduplicate by tag name.

Tool renaming

  • I am not renaming tools as part of this PR. Existing tool names are unchanged.

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Passed env -u UPDATE_TOOLSNAPS go test ./pkg/github -run '^Test_CreateAutomationTag$' -count=1 -json (package: 1.040s). The named test ran, including snapshot, discovery, HTTP payload, unique-key and exact-dot regression assertions. Full lint and the full suite were left for CI.

Docs

  • Updated (README / docs / examples): generated tool and parameter documentation is included.

Related

Stacked on github/github-mcp-server#3562. Reuses the tag model and toolset from github/github-mcp-server#3561.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The new write endpoint’s live REST contract and permission behavior still need human verification beyond mocked tests.

No open issues 🎉

What changed in this PR

Adds create_automation_tag to the opt-in copilot_automations toolset, extending existing tag listing and retrieval with tag creation without executing automations.

Changes:

  • Registers the write tool with required repository and name inputs, repo scope requirements, and exclusion from read-only mode.
  • Generates a fresh idempotency key per call and documents that retries can create additional tags.
  • Adds documentation, a schema snapshot, and mocked discovery and call tests across both protocol modes.
File Description
README.md Documents the new tool and its parameters.
pkg/​github/​tools.go Registers CreateAutomationTag in the tool inventory.
pkg/​github/​automation_tags.go Implements the schema, validation, REST request, and response handling.
pkg/​github/​automation_tags_test.go Tests discovery, payloads, unique keys, errors, and protocol output.
pkg/​github/​__toolsnaps__/​create_automation_tag.snap Records the tool’s schema and annotations.

Review effort: Max

@notapopsicle
notapopsicle added this pull request to stack #3570 October 23, 2026 19:44
@notapopsicle
notapopsicle removed this pull request from stack #3570 October 23, 2026 20:04
Calls through ServerTool.Handler skip input schema validation, so check
owner and repo before sending the request.
Apply the same filters as list and get results to the created tag.
@notapopsicle
notapopsicle force-pushed the notapopsicle/create-automation-tag branch from 33089d8 to 8b003ae Compare October 23, 2026 20:52
Comment thread pkg/github/automation_tags.go
@notapopsicle
notapopsicle added this pull request to stack #3571 October 23, 2026 21:26
Comment thread pkg/github/automation_tags.go
@notapopsicle
notapopsicle marked this pull request as ready for review October 23, 2026 23:03
@notapopsicle
notapopsicle requested a review from a team as a code owner October 23, 2026 23:03
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.

4 participants