EKOSdocs
Docs / Plugins Build

Query Plugins

Add MCP tools that read the ledger.

Implement EkosExtension::mcp_tools to return extra tool definitions (appended to tools/list) and call_mcp_tool to handle them:

fn mcp_tools(&self, config: &EkosConfig) -> Vec<Value>;
fn call_mcp_tool(&self, name: &str, args: &Value, ledger: &dyn KnowledgeStore)
    -> Option<anyhow::Result<Value>>;

call_mcp_tool returns Some only for tools the extension owns. Tools are read-only: the ledger is the same cached store every built-in read tool uses. Declare every argument in the input schema — undeclared arguments should be rejected, not ignored.