Add docs tool to MCP server that returns instructions.md sources#1046
Closed
Add docs tool to MCP server that returns instructions.md sources#1046
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
pelikhan
reviewed
Sep 26, 2025
pkg/cli/mcp_server.go
Outdated
| enable - Enable workflows | ||
| disable - Disable workflows | ||
| status - Show status of natural language action files and workflows | ||
| documentation - Get GitHub Agentic Workflows documentation and instructions |
Contributor
Author
There was a problem hiding this comment.
Renamed "documentation" to "docs" throughout the codebase. Changes include tool name, argument struct, help text, tests, and allowed-tools flag description. (commit 82a6ed4)
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add a "documentation" tool in the MCP server that returns the instructions.md sources.
Add documentation tool to MCP server that returns instructions.md sources
Sep 26, 2025
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
Add documentation tool to MCP server that returns instructions.md sources
Add docs tool to MCP server that returns instructions.md sources
Sep 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new "docs" tool to the GitHub Agentic Workflows MCP server that provides direct access to the embedded instructions.md template content.
Problem
AI assistants and MCP clients working with GitHub Agentic Workflows needed easy access to the complete documentation and instructions. Previously, there was no programmatic way to retrieve the comprehensive workflow documentation through the MCP interface.
Solution
Added a new
docstool to the MCP server that returns the full instructions.md template content (~34KB of documentation covering workflow syntax, tools, examples, and best practices).Implementation Details
New
GetInstructionsTemplate()functionAdded a clean accessor function in
pkg/cli/commands.gothat provides access to the embedded instructions template, following the same pattern asGetVersion().Docs tool in MCP server
The new tool in
pkg/cli/mcp_server.go:Updated help and tooling
gh aw mcp serve --helpoutput--allowed-toolsflag description to include the new toolUsage
The tool returns the complete 969-line instructions template, enabling AI assistants to reference workflow syntax, tool configurations, security considerations, and usage examples directly through the MCP interface.
Testing
GetInstructionsTemplate()functionOriginal prompt
💡 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.