fix: Update frontend payload structure to JSON-RPC 2.0
This commit is contained in:
@@ -443,11 +443,18 @@
|
|||||||
loadingOverlay.classList.add('active');
|
loadingOverlay.classList.add('active');
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
traceId: "MCP-REQ-" + Math.floor(Math.random() * 90000 + 10000),
|
jsonrpc: "2.0",
|
||||||
agentId: document.getElementById('agentId').value,
|
method: "tools/call",
|
||||||
userPrompt: document.getElementById('userPrompt').value || document.getElementById('userPrompt').placeholder,
|
params: {
|
||||||
toolName: document.getElementById('toolName').value,
|
name: document.getElementById('toolName').value,
|
||||||
action: document.getElementById('toolAction').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 {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user