Skip to content

fix(mcp): describe and algorithm_spec name/kind refusals name tools, not CLI - #1322

Merged
Birfy merged 1 commit into
mainfrom
fix/1321-mcp-algorithm-error-wording
Nov 30, 2026
Merged

Birfy merged 1 commit into
mainfrom
fix/1321-mcp-algorithm-error-wording

Conversation

@Birfy

@Birfy Birfy commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

Closes #1321

Base: 37d0387
Tip SHA: cff80cd

What changed

On tip 37d03875 (after #1320), MCP describe_algorithm / list_algorithms already rewrite each card's run into algorithm_spec, and placeholder / plan / apply / diagnose refusals already speak Path A tools.

The leftover a host actually reads is the unknown-name and kind-mismatch refusal from describe_algorithm and algorithm_spec. Those messages are shared with the CLI, and MCP was returning them almost unchanged, so a host was sent to agentdescent algorithms list / algorithms run / init / demo --kind.

MCP describe_algorithm and algorithm_spec name/kind refusals now name Path A tools: list_algorithms (with kind when it is known) and, when a one-file text retry applies, algorithm_spec with kind=text, path, cases, and model and base_url (never guess those). list_algorithms note filters with the kind field, not CLI --kind.

The CLI algorithms show / run / init wording is unchanged. The describe_algorithm and algorithm_spec tool descriptions mention this wording.

changelog.d/1321-mcp-algorithm-error-wording.md.

Verification

Tip SHA: cff80cd

Ran:

  • pytest -q -o addopts='' tests/test_mcp_algorithm_error_wording.py tests/test_mcp_describe_run.py tests/test_mcp_algorithm_spec_placeholder_wording.py tests/test_mcp_plan_start_wording.py tests/test_mcp_algorithm_spec.py tests/test_mcp.py tests/test_missing_cli_kind_remedy.py tests/test_resume_quota_exhausted.py → 86 passed
  • python -m tools.changelog_fragments check → 66 changelog fragment(s) OK
  • python -m tools.gen_api_docs --check → docs/api.md is up to date
    Not run:
  • Full offline suite locally — the CI test matrix is the line

…not CLI (#1321)

Closes #1321

Unknown-name and kind-mismatch errors from describe_algorithm and
algorithm_spec now name list_algorithms (and algorithm_spec with
kind=text when a one-file retry applies), not CLI algorithms list /
run / init / demo --kind. list_algorithms note filters with kind.
CLI wording is unchanged.
@Birfy

Birfy commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review (Birfy)

Tip SHA: cff80cd
Ran:

  • pytest -q -o addopts='' tests/test_mcp_algorithm_error_wording.py tests/test_mcp_describe_run.py tests/test_mcp_algorithm_spec_placeholder_wording.py tests/test_mcp_plan_start_wording.py tests/test_mcp_algorithm_spec.py tests/test_mcp.py tests/test_missing_cli_kind_remedy.py tests/test_resume_quota_exhausted.py → pass (86 passed)
  • python -m tools.changelog_fragments check → pass (66 changelog fragment(s) OK)
  • python -m tools.gen_api_docs --check → pass (docs/api.md is up to date)
    Not run:
  • Full offline suite locally — the CI test matrix is the line
    Findings:
  • none
    Verdict: PASS

@Birfy
Birfy enabled auto-merge (squash) November 30, 2026 16:26
@github-actions github-actions Bot added the risk:T3 Risk tier T3 (core loop, release, process; needs Danyang's click), set by the controller label Nov 30, 2026
@Birfy
Birfy merged commit 8d47530 into main Nov 30, 2026
12 checks passed
@Birfy
Birfy deleted the fix/1321-mcp-algorithm-error-wording branch November 30, 2026 16:52
Birfy added a commit that referenced this pull request Nov 30, 2026
Closes #1323

Base: 8d47530
Tip SHA: de577dc

## What changed

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`.

The leftover a host actually reads is a kind refusal that still named
CLI flags: `plan` / `start` / `algorithm_spec` on a `kind=text`
directory said `use --kind skill_dir / …`; `algorithm_spec(...,
kind="nope")` said `--kind must be`; and `demo` kind / unknown-card
refusals still said `demo --kind` / `demo --algorithm` / `see
\`agentdescent algorithms list\``. `plan` also returned a raw
`SpecError`, so the text-directory message never went through the
rewriter.

MCP `plan` / `start` / `algorithm_spec` / `demo` kind and
unknown-demo-card refusals now name Path A fields (`kind`, `algorithm`)
and `list_algorithms`. The CLI `plan` / `algorithms run` / `demo`
wording is unchanged.

`changelog.d/1323-mcp-kind-flag-wording.md`.

## Verification

Tip SHA: de577dc

Ran:
- `pytest -q -o addopts='' tests/test_mcp_kind_flag_wording.py
tests/test_mcp_plan_start_wording.py
tests/test_mcp_algorithm_error_wording.py tests/test_mcp.py
tests/test_mcp_algorithm_spec.py
tests/test_mcp_algorithm_spec_placeholder_wording.py
tests/test_mcp_describe_run.py tests/test_missing_cli_kind_remedy.py
tests/test_resume_quota_exhausted.py tests/test_demo.py` → 131 passed
- `python -m tools.changelog_fragments check` → 67 changelog fragment(s)
OK
- `python -m tools.gen_api_docs --check` → docs/api.md is up to date
Not run:
- Full offline suite locally — the CI test matrix is the line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T3 Risk tier T3 (core loop, release, process; needs Danyang's click), set by the controller

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcp: describe_algorithm and algorithm_spec name/kind refusals still name CLI algorithms list / run

1 participant