Repository navigation
Description
What happens
On tip 32a92cd698 (after #1326), MCP show / status / diagnose / apply / cancel / resume already rewrite many shared CLI hints into Path A tools. The leftover a host actually reads is the shared resolve_run_id empty-store refusal, which still names CLI agentdescent demo / agentdescent evolve.
resolve_run_id is shared with the CLI (#892 / #896). When the store is empty and the host passes latest or last, it raises:
no runs under <store> yet, so 'latest' has nothing to point at; start one with `agentdescent demo` or `agentdescent evolve`
MCP paths surface that string unchanged:
status/diagnose/cancelreturn{"error": str(e)}with no rewriteshow/applyrun_mcp_apply_wording, which does not rewrite this phraseresumeruns_mcp_gate_wording, which does not rewrite this phrase either
The CLI wording on the same input is correct for an operator who has the CLI.
Measured with from agentdescent.mcp import Tools on this tip, on a fresh empty store:
# Tools(store).status("latest") / .show("latest") / .diagnose("latest")
# / .cancel("latest") / .resume("latest") / .apply("latest")
# error: "no runs under <store> yet, so 'latest' has nothing to point at;
# start one with `agentdescent demo` or `agentdescent evolve`"
demo and start are already Path A tools. A host following the refusal is told to run CLI verbs it may not have, including evolve, which is not an MCP tool.
tests/test_latest_run_alias.py currently pins the CLI wording on the MCP empty-store path.
Expected
- MCP
status/show/diagnose/apply/cancel/resumeempty-storelatest/lastrefusals name Path A tools (demo,start), not CLIagentdescent demo/agentdescent evolve. - The CLI
show latest/status latestwording is unchanged (agentdescent demo,agentdescent evolve).
Suggested fix
- On the MCP path only: rewrite the shared empty-store phrase into Path A tools (
call \demo` or call `start` with a spec). Routestatus/diagnose/cancelerrors through that rewrite; also apply it from_mcp_apply_wordingand_mcp_gate_wordingsoshow/apply/resumeare covered. Do not changecli.py`. - Update
tests/test_latest_run_alias.pyso the MCP empty-store assertion requires the tool language and keeps the CLI assertion on the CLI path. changelog.d/<n>-mcp-empty-store-latest-wording.md.
Acceptance
- With an empty store, MCP
status/show/diagnose/apply/cancel/resumeonlatest(andlast) containdemoandstart, and do not containagentdescent demooragentdescent evolve. - CLI
show --json lateston an empty store still containsagentdescent demoandagentdescent evolve.
Activity