Add guidance on GitHub autolinked reference formatting for AI agents
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 88/100
Direzione di ricerca
Inizia in pkg/github/toolset_instructions.go, in generateContextToolsetInstructions(), e confronta le istruzioni esistenti di github_support_docs_search. Verifica che il contesto di base generato includa un link conciso alla documentazione di GitHub sui riferimenti autolinkati prima di usare gli strumenti per la creazione di contenuti. Il lavoro è completato quando le istruzioni coprono i riferimenti a issue, pull request, comment e discussion senza aggiungere un nuovo strumento né duplicarlo in altri toolset.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the feature or problem you'd like to solve
AI agents using the MCP server create manual markdown links when they could use GitHub's built-in autolinked references instead. GitHub automatically renders patterns like #123, @username, and owner/repo#123 as clickable links across issues, pull requests, comments, and discussions—but agents lack this knowledge in their system instructions.
For complete reference and examples, see:
https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls
Proposed solution
Add guidance to the base context instructions (via generateContextToolsetInstructions()) so all agents learn about autolinked references before using any content-creation tools. This ensures consistent formatting across all GitHub interactions without duplicating guidance in multiple toolsets.
Benefits:
- Universal coverage: Applies to all content-creation tools (issues, PRs, comments, discussions)
- Single source of truth: One place to maintain, not scattered across toolsets
- Early discovery: Agents see this guidance at initialization, before using any specific tool
- No duplication: Leverage official docs instead of repeating content
Implementation:
Add a section to pkg/github/toolset_instructions.go in generateContextToolsetInstructions():
func generateContextToolsetInstructions(_ *inventory.Inventory) string {
return `Always call 'get_me' first to understand current user permissions and context.
### GitHub Autolinked References
When creating issues, pull requests, comments, or discussions, use GitHub's autolinked reference syntax—issue numbers (#123), user mentions (@example-username), and cross-repo references (example-owner/example-repo#123)—so GitHub renders them as links automatically.
See the official docs for complete details: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md`
}
This approach follows the existing pattern of github_support_docs_search, which references official documentation rather than duplicating content.
Additional context
This is a lightweight enhancement that integrates seamlessly into the existing base context instructions. No new tools or infrastructure required—just a brief instruction pointing agents to official GitHub docs.
Future enhancement:
If agents need to proactively request formatting guidance (e.g., "How should I format this reference?"), consider creating a dedicated resource or skill in the MCP server. This would allow agents to ask for formatting help on-demand while still having the baseline guidance available at initialization. This can be explored as a follow-up if needed.
- Lingua principale
- Go
- Stelle
- 33.1k
- Fork
- 5k
- Merge medio
- 2g 1h
- PR unite (30g)
- 25
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/github-mcp-server
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
github/github-mcp-server#3235 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
github/github-mcp-server#3032 · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
github/github-mcp-server#2803 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
github/github-mcp-server#2740 ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
github/github-mcp-server#2661 · 1 commento ·
Tutte le issue di github/github-mcp-server
Issue simili
-
Remove PSPs from Helm chart Apertafeature-request helm
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
gravitational/teleport#69785 ·
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
crossplane/crossplane#7859 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100