fix(app-studio): unlock infra + repo MCP tools for instance/git turns#370
Merged
Conversation
The assistant only fetches the aggregated infrastructure MCP tools when the last user message matches a keyword gate (projectAssistantTurnNeedsInfrastructureMCP). The list covered template/provisioning vocabulary but omitted the instance lifecycle, so prompts like "list instances via mcp" never loaded infrastructure__list_instances and the model truthfully replied it had no instance list available. Add instance/instances, platform, and mcp to the keyword list and a test asserting the gate trips on instance/platform/mcp phrasing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
260107a to
143ee81
Compare
Repo-mutating turns ("push my changes", "open a pull request", "merge
the branch") fell through to the discussion profile, so the commit/repo
MCP bridge was never unlocked for them. Add git, push, pull request,
branch, and merge to the implementation keyword set (skipping a bare
"pr", which is a substring of too many common words).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
After the app-studio / infrastructure split, the assistant could not list instances. Asking "list instances via mcp" returned a reply that it had "no MCP instance list available."
Root cause
The assistant only fetches the aggregated infrastructure MCP tools when the last user message matches a hardcoded keyword gate (
projectAssistantTurnNeedsInfrastructureMCP, added in #350). The keyword list covered template/provisioning vocabulary but omitted the instance lifecycle — so prompts about instances never tripped the gate,infrastructure__list_instanceswas never loaded for the turn, and the model truthfully said it had no instance list.This is not a data-path regression from the runtime-kubeconfig decoupling (#368) — the federated
infrastructure__list_instancestool is intact; it simply wasn't being offered for these turns.Fix
Add
instance,instances,platform, andmcpto the keyword list, plus a test asserting the gate trips on instance/platform/mcp phrasing and still ignores unrelated turns.🤖 Generated with Claude Code