Add MCP server integration instructions and update Copilot guidance#4494
Conversation
- Add .github/instructions/mcp.instructions.md with EIB MCP-RAG Server v3.6.2 documentation - Document 7 tool modules with 35 total tools for AI-assisted workflow analysis - Include tool categories: Workflow Info, Code Analysis, Semantic Search, EE2 Compliance, Operational, GitHub Integration, and SDD Workflow - Update copilot-instructions.md with MCP tool availability guidance - Add RAG knowledge base source documentation (5 tiers)
There was a problem hiding this comment.
Pull request overview
Refactors repository Copilot guidance by moving MCP/RAG server integration details into a dedicated instructions file intended to be excluded from the code-review agent.
Changes:
- Added a new
.github/instructions/mcp.instructions.mddocument describing the MCP/RAG server tools and usage. - Removed the MCP/RAG server integration section from
.github/copilot-instructions.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/instructions/mcp.instructions.md | New MCP/RAG server integration + tool catalog, with front-matter attempting to exclude code-review agents. |
| .github/copilot-instructions.md | Removes the embedded MCP/RAG server integration section from the main Copilot instructions. |
Comments suppressed due to low confidence (1)
.github/copilot-instructions.md:435
- The PR description says MCP tool execution guidance is separated out so PR review agents aren’t exposed to it, but
.github/copilot-instructions.mdstill instructs the agent to check for MCP tool availability and to “Use GitHub MCP tools …” (see lines 3–7). If the intent is to keep MCP/tool-invocation guidance out of the code-review context, consider moving/rewording those remaining MCP references as well.
---
Remember: This is a production weather forecasting system. Changes must be thoroughly tested and should not disrupt operational workflows. Always follow the existing patterns and conventions when extending the system
aerorahul
left a comment
There was a problem hiding this comment.
I am good with separating MCP instructions into its own.
IMO, the copilot-instructions.md is too prescriptive and strongly worded and we can address in a later PR with some discussion.
|
@TerrenceMcGuinness-NOAA Copilot had some suggestions/comments on this PR. Can you please address and/or resolve those? |
Co-authored-by: Copilot <[email protected]>
|
@aerorahul Yes I notice some things are out-of-date in the current instructions file. I should cut a new one next week |
) - copilot-instructions.md: Remove MCP preamble (lines 3-9), add note that MCP guidance loads automatically when server is connected - mcp.instructions.md: Change applyTo -> applyWhen: hasActiveMCPServer() so it only loads when EIB MCP-RAG server is active - mcp.instructions.md: Update 34 tools/7 modules -> 42 tools/9 modules - mcp.instructions.md: Fix SDD tools (remove execute_sdd_workflow / execute_sdd_workflow_supervised, add actual 9 SDD tools) - mcp.instructions.md: Add missing tools (trace_full_execution_chain, extract_code_for_analysis, get_job_details, etc.) - mcp.instructions.md: Update version v3.6.2 -> v7.20.0 SDD Phase 32: Instruction File Architecture Resolves context window waste (~35% reduction for standalone use)
- Added Required Param column to GraphRAG table (code_or_symbol, symbol, from_symbol) - Tool count 42 -> 44 to match live get_server_info output
Add 4 Phase 24H-3 session state tools to GraphRAG section: mark_as_modified, get_session_context, checkpoint_state, restore_checkpoint
Co-authored-by: Copilot <[email protected]>
Separate MCP Instructions from Copilot Instructions
Summary
This PR refactors the GitHub Copilot instructions by separating MCP-specific guidance into its own file with conditional loading. MCP tool execution instructions are only available to development agents — not exposed to PR review agents.
Since the original PR was opened, the MCP server has evolved significantly: tool count grew from 35 → 48, the knowledge base expanded 4×, and a full GraphRAG layer with session state tracking was added. This PR now includes all instruction file updates through v7.21.0.
Resolves #4578
Key Design Decision: Separation of MCP Instructions
MCP-specific instructions live in
.github/instructions/mcp.instructions.mdwith:applyWhen: hasActiveMCPServer("eib-mcp-rag-full")— only loads when the MCP server is connectedexcludeAgent: "code-review"— PR review agents never see MCP tool guidanceThis ensures:
Changes
.github/instructions/mcp.instructions.md— MCP server tool guide (v7.21.0, 48 tools, excluded from code-review agent).github/copilot-instructions.md— Removed MCP details, added guidance to check for MCP tool availabilityWhat's Included
MCP Server Integration (v7.21.0)
Tool Categories
Parameter Naming Conventions
The instruction file documents exact required parameter names for each tool to prevent
"must have required property"errors. Common patterns:symbol(notnode_name,function_name, etc.)query(notsearch_term,keyword, etc.)node_name→symbol)Commit History
8b597625c309c32fapplyWhen+excludeAgent)2c9c806035bec79dBenefits
Testing
generate-tool-docs.js --check: 48/48 tools documented, 0 warnings