pub async fn dispatch_tool(
state: &AppState,
name: &str,
args: Value,
) -> Result<Value>Expand description
Dispatch a tool call by name to its real handler.
Why: Centralises the name → handler mapping; every handler now performs a
real read/write against the live PalaceRegistry instead of returning a
stub.
What: Returns Ok(Value) on success, Err on unknown tool / bad args /
underlying failure.
Test: dispatch_palace_create_persists, dispatch_remember_then_recall,
dispatch_kg_assert_then_query, dispatch_unknown_tool_errors.