Files
OpenWebUI-Discordbot/scripts
Josh Knapp dc95e5ac55
All checks were successful
OpenWebUI Discord Bot / Build-and-Push (push) Successful in 53s
Fix MCP tool execution to use proper JSON-RPC 2.0 format
The /mcp/call_tool endpoint expects JSON-RPC 2.0 format requests.
Updated to send proper RPC structure and parse RPC responses.

Request format:
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "tool_name",
    "arguments": {...}
  },
  "id": 1
}

Response parsing updated to extract result from JSON-RPC envelope:
result.result.content[0].text

This fixes the 400 validation error:
"Field required: JSONRPCRequest.method, jsonrpc, id"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 11:44:48 -08:00
..