Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ recipe file tools.
`eb_stack_easystack`, `eb_stack_gap`, `eb_stack_provided`,
`eb_stack_buildenv`,
`eb_stack_shadow`, `eb_stack_batch`, `eb_stack_shard`,
`eb_stack_capacity`, `eb_stack_footprints`, `eb_stack_admit`,
`eb_stack_arch`, `eb_stack_files`, `eb_stack_generation`,
`eb_stack_cuda_cc`, `eb_stack_known_failures`, `eb_stack_oom`,
`eb_stack_bot_classify`, `eb_stack_sections`, `eb_stack_from_commit`;
Expand All @@ -434,7 +435,10 @@ recipe file tools.
- `eb_campaign_finding_claim`, `eb_campaign_finding_resolve`;
- `eb_pr_overlap` (`kind` `software-layer` or `easyconfigs`),
`eb_rebuild_set`, `eb_easyblock_reach`;
- `eb_repro_summary`.
- `eb_repro_summary`;
- `eb_ledger_append`, `eb_ledger_head`, `eb_ledger_tiles`, `eb_ledger_find`,
`eb_ledger_show`, `eb_ledger_verify`, `eb_ledger_backfill`,
`eb_ledger_anchor`, `eb_ledger_verify_anchors`, `eb_ledger_project`.

`eb_recipe_edit` replaces an exact string and does not write a repeated match
unless `replace_all` is set. `eb_recipe_check` requires at least one
Expand Down
1 change: 1 addition & 0 deletions changelog.d/+mcp-tool-lists.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The README and the command-line reference list every tool `eb-stack mcp` serves. The README left out `eb_stack_capacity`, `eb_stack_footprints`, `eb_stack_admit` and the ten `eb_ledger_*` tools, and the reference left out `eb_stack_buildenv` and four ledger tools. A test now compares both pages with the `tools/list` catalog.
9 changes: 6 additions & 3 deletions docs/orgmode/reference/cli.org
Original file line number Diff line number Diff line change
Expand Up @@ -2368,8 +2368,9 @@ plus sandboxed recipe and easyblock tools:
(easyblocks; ~eb_build_test~ only with ~EB_STACK_ALLOW_BUILD=1~);
- ~eb_stack_solve~, ~eb_stack_sbom~, ~eb_stack_order~,
~eb_stack_easystack~, ~eb_stack_gap~, ~eb_stack_provided~,
~eb_stack_shadow~, ~eb_stack_batch~, ~eb_stack_shard~, ~eb_stack_capacity~,
~eb_stack_footprints~, ~eb_stack_admit~, ~eb_stack_arch~, ~eb_stack_files~,
~eb_stack_buildenv~, ~eb_stack_shadow~, ~eb_stack_batch~,
~eb_stack_shard~, ~eb_stack_capacity~, ~eb_stack_footprints~,
~eb_stack_admit~, ~eb_stack_arch~, ~eb_stack_files~,
~eb_stack_generation~, ~eb_stack_cuda_cc~, ~eb_stack_known_failures~,
~eb_stack_oom~, ~eb_stack_bot_classify~, ~eb_stack_sections~,
~eb_stack_from_commit~;
Expand All @@ -2381,7 +2382,9 @@ plus sandboxed recipe and easyblock tools:
~eb_rebuild_set~, ~eb_component_reach~, ~eb_easyblock_reach~;
- ~eb_repro_summary~;
- ~eb_ledger_append~, ~eb_ledger_head~, ~eb_ledger_tiles~,
~eb_ledger_find~, ~eb_ledger_show~, ~eb_ledger_verify~.
~eb_ledger_find~, ~eb_ledger_show~, ~eb_ledger_verify~,
~eb_ledger_backfill~, ~eb_ledger_anchor~, ~eb_ledger_verify_anchors~,
~eb_ledger_project~.

~eb_recipe_read~, ~eb_recipe_list~, ~eb_recipe_edit~, ~eb_recipe_write~, and
~eb_recipe_grep~ resolve every path inside that root. A ~..~ component, an
Expand Down
9 changes: 6 additions & 3 deletions llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9079,8 +9079,9 @@ plus sandboxed recipe and easyblock tools:
(easyblocks; `eb_build_test` only with `EB_STACK_ALLOW_BUILD=1`);
- `eb_stack_solve`, `eb_stack_sbom`, `eb_stack_order`,
`eb_stack_easystack`, `eb_stack_gap`, `eb_stack_provided`,
`eb_stack_shadow`, `eb_stack_batch`, `eb_stack_shard`, `eb_stack_capacity`,
`eb_stack_footprints`, `eb_stack_admit`, `eb_stack_arch`, `eb_stack_files`,
`eb_stack_buildenv`, `eb_stack_shadow`, `eb_stack_batch`,
`eb_stack_shard`, `eb_stack_capacity`, `eb_stack_footprints`,
`eb_stack_admit`, `eb_stack_arch`, `eb_stack_files`,
`eb_stack_generation`, `eb_stack_cuda_cc`, `eb_stack_known_failures`,
`eb_stack_oom`, `eb_stack_bot_classify`, `eb_stack_sections`,
`eb_stack_from_commit`;
Expand All @@ -9092,7 +9093,9 @@ plus sandboxed recipe and easyblock tools:
`eb_rebuild_set`, `eb_component_reach`, `eb_easyblock_reach`;
- `eb_repro_summary`;
- `eb_ledger_append`, `eb_ledger_head`, `eb_ledger_tiles`,
`eb_ledger_find`, `eb_ledger_show`, `eb_ledger_verify`.
`eb_ledger_find`, `eb_ledger_show`, `eb_ledger_verify`,
`eb_ledger_backfill`, `eb_ledger_anchor`, `eb_ledger_verify_anchors`,
`eb_ledger_project`.

`eb_recipe_read`, `eb_recipe_list`, `eb_recipe_edit`, `eb_recipe_write`, and
`eb_recipe_grep` resolve every path inside that root. A `..` component, an
Expand Down
59 changes: 59 additions & 0 deletions tests/mcp_v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,65 @@ fn documented_mcp_catalog_matches_the_registry() {
);
}

/// A tool name is named when it is not the front of a longer name.
fn names_tool(text: &str, tool: &str) -> bool {
text.match_indices(tool).any(|(at, _)| {
let before = text[..at]
.chars()
.next_back()
.is_none_or(|c| !c.is_ascii_alphanumeric() && c != '_');
let after = text[at + tool.len()..]
.chars()
.next()
.is_none_or(|c| !c.is_ascii_alphanumeric() && c != '_');
before && after
})
}

#[test]
fn readme_and_cli_reference_name_every_mcp_tool() {
let response = handle_message(&json!({
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}))
.expect("tools/list");
let names = response["result"]["tools"]
.as_array()
.expect("tools")
.iter()
.filter_map(|tool| tool["name"].as_str())
.map(str::to_string)
.collect::<BTreeSet<_>>();
let root = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
for page in ["README.md", "docs/orgmode/reference/cli.org"] {
let text = std::fs::read_to_string(root.join(page)).expect("read page");
let missing = names
.iter()
.filter(|tool| !names_tool(&text, tool))
.collect::<Vec<_>>();
assert!(
missing.is_empty(),
"{page} does not name these MCP tools: {missing:?}"
);
}
let readme = std::fs::read_to_string(root.join("README.md")).expect("README");
for (at, _) in readme.match_indices("`eb_") {
let word = &readme[at + 1..];
let end = word
.find(|c: char| !(c.is_ascii_lowercase() || c == '_'))
.unwrap_or(word.len());
if word[end..].starts_with('`') && &word[..end] != "eb_stack" {
assert!(
names.contains(&word[..end]),
"README names {}, which tools/list does not return",
&word[..end]
);
}
}
}

#[test]
fn mcp_catalog_matches_the_version_one_workflows() {
let response = handle_message(&json!({
Expand Down