Skip to content

mcp: describe_algorithm and list_algorithms still name a CLI algorithms run recipe #1313

Done

Description

@Birfy

What happens

On tip 5264d34b (after #1312), MCP demo / plan / algorithm_spec / diagnose already rewrite host-facing next and recommendations into Path A tool language. MCP describe_algorithm and list_algorithms still return the shared Algorithm.describe() run field untouched, so a host is told to run a CLI recipe it may not have.

After MCP describe_algorithm("gepa") (and on each row of list_algorithms), run is:

agentdescent algorithms run gepa <your-prompt.txt> <your-cases.jsonl> --model <model> [--base-url <url>]

The same leftover-surface class as #1307 / #1309 / #1311, now for the card run recipe a host reads before calling algorithm_spec. The CLI algorithms show / algorithms show --json wording stays correct for an operator who has the CLI.

Repro

Fresh clone of ThinkFlowLab/agentdescent at 5264d34b49909a03d2daf2e16fda41433a0b1dcb. pip install -e ".[mcp]". No provider key is required.

from agentdescent.mcp import Tools
from agentdescent.algorithms import get

# Tools.describe_algorithm currently returns get(name).describe() unchanged
r = Tools(None).describe_algorithm("gepa")
# r["run"] starts with "agentdescent algorithms run gepa "
# Tools(None).list_algorithms()["algorithms"] carry the same CLI recipe
# CLI: agentdescent algorithms show gepa --json still names that recipe, which is intended
assert get("gepa").describe()["run"] == r["run"]

By contrast, MCP demo already says call algorithm_spec with the name, their path and cases, and model and base_url (never guess those), not agentdescent algorithms run.

Expected

  • After MCP describe_algorithm and on each list_algorithms card, run names algorithm_spec with the card's name, the same path placeholder the CLI recipe uses, cases=<your-cases.jsonl>, and model and base_url (never guess those). It must not start with agentdescent algorithms run or name --model / --base-url flags.
  • Other card fields (name, summary, kinds, fidelity, surface, params, research_port, fidelity_note) stay the same.
  • The CLI algorithms show / algorithms show --json run stays on the CLI recipe (agentdescent algorithms run … --model <model> [--base-url <url>]). Algorithm.describe() itself is unchanged.
  • No model name is guessed. The tools still do not start a run or write a spec by themselves.

Suggested fix

  • In agentdescent/mcp.py (Tools.describe_algorithm and Tools.list_algorithms), after describe(), rewrite run into the tool language above. Do not change algorithms.py (those strings are still correct for the CLI).
  • Mention the tool-language run in the describe_algorithm and list_algorithms tool descriptions.
  • Pin this in a focused MCP test (keep the CLI pins in tests/test_algorithms.py).
  • changelog.d/<n>-mcp-describe-run.md.

Acceptance

  • MCP describe_algorithm("gepa") returns run that names algorithm_spec, name=gepa, path=<your-prompt.txt>, and model and base_url, with no agentdescent and no --model / --base-url.
  • MCP describe_algorithm for evoskill / archive_selection keeps the same path placeholders as the CLI (<your-skill-dir> / <path>).
  • MCP list_algorithms rows match describe_algorithm for the same name.
  • CLI algorithms show --json still uses agentdescent algorithms run … --model <model> [--base-url <url>].
  • pytest -q -o addopts='' tests/test_mcp_describe_run.py tests/test_algorithms.py tests/test_mcp.py passes, including the new pins.

Activity

  1. added
    bug
    area:plugins
    area:cli
    on Nov 29, 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