feat(kebab-mcp): ingest_file + ingest_stdin tools (fb-31)

5th + 6th MCP tools — first mutation surface (fb-30 v1 was read-only).
Both wrap the new kebab-app facade fns + use spawn_blocking via the
existing spawn_tool helper. tools/list now returns 6 tools.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
th-kim0823
2026-05-07 18:12:18 +09:00
parent fbc01eda50
commit ecd77290cd
5 changed files with 117 additions and 6 deletions

View File

@@ -1,19 +1,21 @@
//! Integration: `build_tools_vec` returns 4 tools with correct names and
//! Integration: `build_tools_vec` returns 6 tools with correct names and
//! inputSchema. Uses the extracted `pub fn build_tools_vec()` helper — no
//! transport or RequestContext needed.
use kebab_mcp::build_tools_vec;
#[test]
fn tools_list_returns_four_tools() {
fn tools_list_returns_six_tools() {
let tools = build_tools_vec();
assert_eq!(tools.len(), 4, "expected exactly 4 tools, got {}", tools.len());
assert_eq!(tools.len(), 6, "expected exactly 6 tools, got {}", tools.len());
let names: Vec<&str> = tools.iter().map(|t| t.name.as_ref()).collect();
assert!(names.contains(&"schema"), "missing 'schema' tool");
assert!(names.contains(&"doctor"), "missing 'doctor' tool");
assert!(names.contains(&"search"), "missing 'search' tool");
assert!(names.contains(&"ask"), "missing 'ask' tool");
assert!(names.contains(&"ingest_file"), "missing 'ingest_file' tool");
assert!(names.contains(&"ingest_stdin"), "missing 'ingest_stdin' tool");
}
#[test]