Skip to content

Commit d83de56

Browse files
committed
fix(#761): mcp server_not_found and skill_not_found envelopes now include hint field
1 parent 7fa81b5 commit d83de56

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

ROADMAP.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7687,3 +7687,5 @@ Original filing (2026-04-18): the session emitted `SessionStart hook (completed)
76877687
759. **`--model badmodel --output-format json` returned `error_kind:"invalid_model_syntax"` but `hint: null`** — dogfooded 2026-05-26 on `b8b3af6f`. `validate_model_syntax()` had hint text embedded after a period in the error string (no `\n`), so `split_error_hint()` could not extract it. Affected paths: (a) generic invalid format `"invalid model syntax: '{}'. Expected ..."` — joined with `.` not `\n`; (b) spaces-in-model `"contains spaces. Use ..."` — same issue; (c) empty model string — no hint at all. Fix: added `\n` before hint text in all three format strings in `validate_model_syntax`. Source: Jobdori dogfood sweep on `b8b3af6f`, 2026-05-26.
76887688

76897689
760. **`agent_not_found` and `plugin_not_found` error envelopes lacked `hint` field** — dogfooded 2026-05-26 on `ef31328a`. `claw agents show nonexistent-agent --output-format json` returned `error_kind:"agent_not_found"` with `hint: null`; same for `claw plugins show`. Both structured JSON envelopes in `commands/src/lib.rs` and `main.rs` omitted `hint`. Fix: added `"hint": "Run \`claw agents list\` to see available agents."` to the `agent_not_found` envelope; `"hint": "Run \`claw plugins list\` to see available plugins."` to the `plugin_not_found` envelope. Source: Jobdori dogfood sweep on `ef31328a`, 2026-05-26.
7690+
7691+
761. **`mcp show <nonexistent>` and `skills show <nonexistent>` returned `hint: null`** — dogfooded 2026-05-27 on `7fa81b5d`. `server_not_found` envelope in `render_mcp_show_json` and `skill_not_found` envelope in `print_skills` JSON path both lacked `hint` fields, unlike `agent_not_found`/`plugin_not_found` fixed in #760. Fix: added `"hint": "Run \`claw mcp list\` to see configured servers."` to `server_not_found` and `"hint": "Run \`claw skills list\` to see available skills."` to `skill_not_found`. All four `*_not_found` envelopes now have hints. Source: Jobdori dogfood sweep on `7fa81b5d`, 2026-05-27.

rust/crates/commands/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2621,6 +2621,8 @@ pub fn handle_skills_slash_command_json(args: Option<&str>, cwd: &Path) -> std::
26212621
"error_kind": "skill_not_found",
26222622
"message": format!("skill '{}' not found", name),
26232623
"requested": name,
2624+
// #761: hint so callers know how to enumerate available skills
2625+
"hint": "Run `claw skills list` to see available skills.",
26242626
}));
26252627
}
26262628
Ok(render_skills_report_json_with_action(&matched, "show"))
@@ -4056,6 +4058,8 @@ fn render_mcp_server_report_json(
40564058
"found": false,
40574059
"server_name": server_name,
40584060
"message": format!("server `{server_name}` is not configured"),
4061+
// #761: hint so callers know how to enumerate configured MCP servers
4062+
"hint": "Run `claw mcp list` to see configured servers.",
40594063
}),
40604064
}
40614065
}

0 commit comments

Comments
 (0)