From 50025968ffcb005c98a6b1397f5a70428b5d5352 Mon Sep 17 00:00:00 2001 From: Devid HW Date: Sun, 17 May 2026 05:44:31 +0700 Subject: [PATCH] feat: add update tool definitions --- src/tools/definitions/update.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/tools/definitions/update.rs diff --git a/src/tools/definitions/update.rs b/src/tools/definitions/update.rs new file mode 100644 index 0000000..cc556d3 --- /dev/null +++ b/src/tools/definitions/update.rs @@ -0,0 +1,21 @@ +use serde_json::{json, Value}; + +pub fn tool_check_update() -> Value { + json!({ + "name": "check_update", + "description": "Check if a newer version of mt5-quant is available on GitHub. A background check runs automatically on the first tool call of each session; this tool returns that cached result instantly or fetches it on demand.", + "inputSchema": { + "type": "object" + } + }) +} + +pub fn tool_update() -> Value { + json!({ + "name": "update", + "description": "Download and install the latest mt5-quant binary from GitHub Releases, then replace the current executable in place. Restart the MCP connection after updating to load the new version.", + "inputSchema": { + "type": "object" + } + }) +}