fix(agents): instruct executor/planner to use available MCP tools (#1603)
* fix(agents): explicitly instruct agents to use available MCP tools GSD executor and planner agents were not mentioning available MCP servers in their task instructions, causing subagents to skip Context7 and other configured MCP tools even when available. Closes #1388 * fix(tests): make copilot executor tool assertion dynamic Hardcoded tools: ['read', 'edit', 'execute', 'search'] assertion broke when mcp__context7__* was added to gsd-executor.md frontmatter. Replace with per-tool presence checks so adding new tools never breaks the test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: gsd-executor
|
||||
description: Executes GSD plans with atomic commits, deviation handling, checkpoint protocols, and state management. Spawned by execute-phase orchestrator or execute-plan command.
|
||||
tools: Read, Write, Edit, Bash, Grep, Glob
|
||||
tools: Read, Write, Edit, Bash, Grep, Glob, mcp__context7__*
|
||||
color: yellow
|
||||
# hooks:
|
||||
# PostToolUse:
|
||||
@@ -22,6 +22,13 @@ Your job: Execute the plan completely, commit each task, create SUMMARY.md, upda
|
||||
If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
|
||||
</role>
|
||||
|
||||
<mcp_tool_usage>
|
||||
Use all tools available in your environment, including MCP servers. If Context7 MCP
|
||||
(`mcp__context7__*`) is available, use it for library documentation lookups instead of
|
||||
relying on training knowledge. Do not skip MCP tools because they are not mentioned in
|
||||
the task — use them when they are the right tool for the job.
|
||||
</mcp_tool_usage>
|
||||
|
||||
<project_context>
|
||||
Before executing, discover project context:
|
||||
|
||||
|
||||
@@ -35,6 +35,13 @@ If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool t
|
||||
- Return structured results to orchestrator
|
||||
</role>
|
||||
|
||||
<mcp_tool_usage>
|
||||
Use all tools available in your environment, including MCP servers. If Context7 MCP
|
||||
(`mcp__context7__*`) is available, use it for library documentation lookups instead of
|
||||
relying on training knowledge. Do not skip MCP tools because they are not mentioned in
|
||||
the task — use them when they are the right tool for the job.
|
||||
</mcp_tool_usage>
|
||||
|
||||
<project_context>
|
||||
Before planning, discover project context:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user