Repository navigation
Description
What happens
On tip 8d47530e (after #1322), MCP describe_algorithm / algorithm_spec unknown-name and kind-mismatch refusals already name Path A tools, and _mcp_gate_wording already rewrites pass --kind and see \agentdescent doctor``. The leftover a host actually reads is a kind refusal that still names CLI flags.
Measured with from agentdescent.mcp import Tools on this tip:
# kind=text pointed at a directory (plan, start, and algorithm_spec):
# ... or use --kind skill_dir / skill_library / agent_dir for the directory
# algorithm_spec(..., kind="nope"):
# --kind must be one of ['text', 'skill_dir', ...], got 'nope'
# demo(kind="nope"):
# demo --kind must be one of ['skill_dir', 'text', 'skill_library'], got 'nope'
# (offline kinds: ...)
# demo(algorithm="gepa", kind="skill_dir"):
# demo --kind skill_dir does not run the text-only card 'gepa';
# omit --kind ... or pass --kind text
# demo(algorithm="nope"):
# demo --algorithm: unknown algorithm 'nope'; available: […]
# (see `agentdescent algorithms list`)
plan returns a raw SpecError (the text-dir message never goes through _mcp_gate_wording). start and algorithm_spec do run _mcp_gate_wording, but that helper does not catch use --kind skill_dir / … or --kind must be. _mcp_demo_error only rewrites the live-model algorithms run sentence (#1307) and leaves other SpecError messages alone, so demo kind/name refusals still name --kind / --algorithm / agentdescent algorithms list.
plan with an invalid kind already says kind must be … (no flag). The CLI wording on the same inputs stays correct for an operator who has the CLI.
Expected
- MCP
plan/start/algorithm_spectext-directory refusals name the Path A fieldkind(skill_dir, skill_library, or agent_dir), not CLI--kind. - MCP
algorithm_specwith an invalidkindsayskind must be …, not--kind must be …. - MCP
demokind and unknown-name refusals name Path A fields (kind,algorithm) andlist_algorithms, not--kind/--algorithm/agentdescent algorithms list. - The CLI
plan/evolve/algorithms run/demowording is unchanged.
Suggested fix
- Extend
_mcp_gate_wording(and_mcp_demo_error) on the MCP path only. Apply_mcp_gate_wordingtoplan'sSpecError/RunStoreErrorpath, matchingstart. Do not changeevolvespec.py,demo.py, orcli.py. - Pin this in a focused MCP test beside
tests/test_mcp_plan_start_wording.py. changelog.d/<n>-mcp-kind-flag-wording.md.
Acceptance
plan/start/algorithm_specon akind=textdirectory target:errorcontainskindas skill_dir / skill_library / agent_dir and does not contain--kind.algorithm_spec(..., kind="nope")containskind must beand does not contain--kind.demo(kind="nope"),demo(algorithm="gepa", kind="skill_dir"), anddemo(algorithm="nope")do not contain--kind,--algorithm, oragentdescent algorithms list; the unknown-name error containslist_algorithms.- CLI
demo --algorithm nopestill contains(see \agentdescent algorithms list`)`. - CLI
algorithms run gepa <dir> --kind nope --jsonstill contains--kind must be.
Activity