mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #15911] issue: Tools : JSON malformed #56379
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chdid on GitHub (Jul 21, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/15911
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.6.18
Ollama Version (if applicable)
No response
Operating System
docker
Browser (if applicable)
Firefox Chrome
Confirmation
README.md.Expected Behavior
Obtain graphic with tool.
Have JSON like
{
"data": [
{"category": "Visiting Website", "value": 50000},
{"category": "Entering Product Page", "value": 35000},
{"category": "Adding to Cart", "value": 25000},
{"category": "Checking Out", "value": 15000},
{"category": "Purchasing", "value": 8000}
]
}
Actual Behavior
JSON is
{'data': "[{ category: 'Visiting Website', value: 50000 }, { category: 'Entering Product Page', value: 35000 }, { category: 'Adding to Cart', value: 25000 }, { category: 'Checking Out', value: 15000 }, { category: 'Purchasing', value: 8000 }]", 'title': 'Funnel Example', 'width': '600', 'height': '400'}}
Steps to Reproduce
{
"mcpServers": {
"chart": {
"type": "sse",
"url": "http://xxxxxxxx:8006/sse"
}
}
}
I installed the sse version.
Logs & Screenshots
2025-07-21 06:58:19.812 | DEBUG | open_webui.utils.middleware:chat_completion_tools_handler:176 - content='{\n "tool_calls": [\n {\n "name": "tool_generate_funnel_chart_post",\n "parameters": {\n "data": "[{ category: 'Visiting Website', value: 50000 }, { category: 'Entering Product Page', value: 35000 }, { category: 'Adding to Cart', value: 25000 }, { category: 'Checking Out', value: 15000 }, { category: 'Purchasing', value: 8000 }]",\n "title": "Funnel Example",\n "width": "600",\n "height": "400"\n }\n }\n ]\n}' - {}
2025-07-21 06:58:19.812 | DEBUG | open_webui.utils.middleware:tool_call_handler:191 - tool_call={'name': 'tool_generate_funnel_chart_post', 'parameters': {'data': "[{ category: 'Visiting Website', value: 50000 }, { category: 'Entering Product Page', value: 35000 }, { category: 'Adding to Cart', value: 25000 }, { category: 'Checking Out', value: 15000 }, { category: 'Purchasing', value: 8000 }]", 'title': 'Funnel Example', 'width': '600', 'height': '400'}} - {}
2025-07-21 06:58:19.827 | ERROR | open_webui.utils.tools:execute_tool_server:644 - API Request Error: HTTP error 422: {"detail":[{"type":"list_type","loc":["body","data"],"msg":"Input should be a valid list","input":"[{ category: 'Visiting Website', value: 50000 }, { category: 'Entering Product Page', value: 35000 }, { category: 'Adding to Cart', value: 25000 }, { category: 'Checking Out', value: 15000 }, { category: 'Purchasing', value: 8000 }]"}]} - {}
[...]
File "/app/backend/open_webui/main.py", line 1404, in chat_completion
File "/app/backend/open_webui/utils/middleware.py", line 942, in process_chat_payload
File "/app/backend/open_webui/utils/middleware.py", line 285, in chat_completion_tools_handler
File "/app/backend/open_webui/utils/middleware.py", line 227, in tool_call_handler
File "/app/backend/open_webui/utils/tools.py", line 104, in tool_function
Exception: HTTP error 422: {"detail":[{"type":"list_type","loc":["body","data"],"msg":"Input should be a valid list","input":"[{ category: 'Visiting Website', value: 50000 }, { category: 'Entering Product Page', value: 35000 }, { category: 'Adding to Cart', value: 25000 }, { category: 'Checking Out', value: 15000 }, { category: 'Purchasing', value: 8000 }]"}]}
Additional Information
No response
@rgaricano commented on GitHub (Jul 23, 2025):
There are something odd in this mcp-server, the request seem that doesn't complain mpc protocol specification,
Make sure you have it updated: https://github.com/antvis/mcp-server-chart
&| report the issue in his repo.