Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 13, 2026

Summary

Adds optional custom_instructions parameter to assign_copilot_to_issue tool, enabling users to provide additional context beyond the issue body when assigning Copilot agents.

Why

When assigning Copilot to issues, additional context like coding standards, architectural constraints, or testing requirements cannot be captured in the issue body. This parameter preserves that context by passing it directly to the agent.

What changed

  • Added custom_instructions string parameter (optional) to tool schema
  • Updated parameter parsing and AgentAssignmentInput to conditionally include custom instructions
  • Added test case verifying custom instructions pass through GraphQL mutation correctly
  • Updated toolsnaps and auto-generated documentation

MCP impact

  • Tool schema or behavior changed
    • Added optional parameter to existing tool. Backwards compatible.

Prompts tested (tool changes only)

Security / limits

  • No security or limits impact
    • Parameter value is passed directly to GitHub's agent assignment API with no additional processing

Tool renaming

  • I am not renaming tools as part of this PR

Lint & tests

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

Docs

  • Updated (README / docs / examples)
    • Auto-generated via ./script/generate-docs

Example usage

{
  "name": "assign_copilot_to_issue",
  "arguments": {
    "owner": "github",
    "repo": "my-repo",
    "issue_number": 123,
    "custom_instructions": "Follow PEP 8. Use pytest. Maintain Python 3.8+ compatibility."
  }
}
Original prompt

Assign copilot to issue tool should support option custom instructions param to guide agent beyond the issue body, as additional context is lost otherwise.


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

- Added optional custom_instructions parameter to tool schema
- Updated implementation to pass custom instructions to agent assignment
- Added test case to verify custom_instructions works correctly
- Updated toolsnaps and documentation

The custom_instructions parameter allows users to provide additional
context, constraints, or guidance to the Copilot agent beyond what's
in the issue body, addressing the issue where additional context
would otherwise be lost.

Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for custom instructions parameter in issue tool Add custom_instructions parameter to assign_copilot_to_issue tool Jan 13, 2026
Copilot AI requested a review from SamMorrowDrums January 13, 2026 18:44
@SamMorrowDrums SamMorrowDrums marked this pull request as ready for review January 15, 2026 16:44
@SamMorrowDrums SamMorrowDrums requested a review from a team as a code owner January 15, 2026 16:44
Copilot AI review requested due to automatic review settings January 15, 2026 16:44
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 optional custom_instructions parameter to the assign_copilot_to_issue tool, enabling users to provide additional context and guidance to the Copilot agent beyond what's captured in the issue body. The change is backward compatible and follows existing patterns for optional parameters.

Changes:

  • Added custom_instructions optional string parameter to tool schema and implementation
  • Added comprehensive test coverage including new test case with custom instructions
  • Updated toolsnaps and auto-generated documentation

Reviewed changes

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

File Description
pkg/github/issues.go Added custom_instructions parameter to tool schema, params struct, and conditional logic to include it in agent assignment when provided
pkg/github/issues_test.go Added verification that custom_instructions property exists in schema and new test case validating the parameter is correctly passed through GraphQL mutation
pkg/github/toolsnaps/assign_copilot_to_issue.snap Updated tool snapshot with new custom_instructions property definition
README.md Auto-generated documentation updated to include the new parameter

@SamMorrowDrums SamMorrowDrums merged commit d88eb83 into main Jan 15, 2026
16 checks passed
@SamMorrowDrums SamMorrowDrums deleted the copilot/add-custom-instructions-parameter branch January 15, 2026 17:09
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.

3 participants