From 6dc02d356f2cf26cda96253b718200d5fcca8386 Mon Sep 17 00:00:00 2001 From: jade Date: Sat, 4 Jul 2026 01:21:24 +0900 Subject: [PATCH] fix: Update frontend payload structure to JSON-RPC 2.0 --- src/main/resources/static/index.html | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html index a0ff772..9e39a59 100644 --- a/src/main/resources/static/index.html +++ b/src/main/resources/static/index.html @@ -443,11 +443,18 @@ loadingOverlay.classList.add('active'); const payload = { - traceId: "MCP-REQ-" + Math.floor(Math.random() * 90000 + 10000), - agentId: document.getElementById('agentId').value, - userPrompt: document.getElementById('userPrompt').value || document.getElementById('userPrompt').placeholder, - toolName: document.getElementById('toolName').value, - action: document.getElementById('toolAction').value + jsonrpc: "2.0", + method: "tools/call", + params: { + name: document.getElementById('toolName').value, + arguments: { + action: document.getElementById('toolAction').value, + traceId: "MCP-REQ-" + Math.floor(Math.random() * 90000 + 10000), + agentId: document.getElementById('agentId').value, + userPrompt: document.getElementById('userPrompt').value || document.getElementById('userPrompt').placeholder + } + }, + id: Math.floor(Math.random() * 10000) }; try {