Skip to content

mcp: plan, start, algorithm_spec, and demo kind refusals still name CLI --kind / --algorithm #1323

Done

Description

@Birfy

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_spec text-directory refusals name the Path A field kind (skill_dir, skill_library, or agent_dir), not CLI --kind.
  • MCP algorithm_spec with an invalid kind says kind must be …, not --kind must be ….
  • MCP demo kind and unknown-name refusals name Path A fields (kind, algorithm) and list_algorithms, not --kind / --algorithm / agentdescent algorithms list.
  • The CLI plan / evolve / algorithms run / demo wording is unchanged.

Suggested fix

  • Extend _mcp_gate_wording (and _mcp_demo_error) on the MCP path only. Apply _mcp_gate_wording to plan's SpecError / RunStoreError path, matching start. Do not change evolvespec.py, demo.py, or cli.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_spec on a kind=text directory target: error contains kind as skill_dir / skill_library / agent_dir and does not contain --kind.
  • algorithm_spec(..., kind="nope") contains kind must be and does not contain --kind.
  • demo(kind="nope"), demo(algorithm="gepa", kind="skill_dir"), and demo(algorithm="nope") do not contain --kind, --algorithm, or agentdescent algorithms list; the unknown-name error contains list_algorithms.
  • CLI demo --algorithm nope still contains (see \agentdescent algorithms list`)`.
  • CLI algorithms run gepa <dir> --kind nope --json still contains --kind must be.

Activity

  1. added
    bug
    area:plugins
    area:cli
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliarea:pluginsbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions