Merge pull request #713 from storybored379/feat/mcp-conventions

MCP: common command tools, strict arguments and session resources
This commit is contained in:
BFlat authored and GitHub committed 2026-10-09 14:56:41 +07:00
commit 24c77e9ddf
10 files changed
+355 -27

No files matched your search

+1 -1
View File
@@ -137,7 +137,7 @@ fn mcp_protocol_over_stdio() {
assert!(r["result"]["completion"]["values"].as_array().is_some_and(|v| v.contains(&json!("svg"))), "{r}");
send(&mut stdin, json!({"jsonrpc":"2.0","id":5,"method":"resources/list","params":{}}));
assert!(recv(&mut lines, &mut notes, 5)["result"]["resources"].as_array().is_some_and(|v| v.len() == 2));
assert!(recv(&mut lines, &mut notes, 5)["result"]["resources"].as_array().is_some_and(|v| v.len() == 3));
send(&mut stdin, json!({"jsonrpc":"2.0","id":6,"method":"resources/templates/list","params":{}}));
assert!(recv(&mut lines, &mut notes, 6)["result"]["resourceTemplates"].as_array().is_some_and(|v| v.len() >= 4));