Fix 406 error in MCP tool execution - add Accept header
All checks were successful
OpenWebUI Discord Bot / Build-and-Push (push) Successful in 53s
All checks were successful
OpenWebUI Discord Bot / Build-and-Push (push) Successful in 53s
The /mcp/call_tool endpoint was returning 406 "Not Acceptable" error because the request didn't include an Accept header. Fixed by adding "Accept": "application/json" to the request headers. Error message was: "Not Acceptable: Client must accept application/json" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -88,7 +88,8 @@ async def execute_mcp_tool(tool_name: str, arguments: dict) -> str:
|
||||
base_url = LITELLM_API_BASE.rstrip('/')
|
||||
headers = {
|
||||
"Authorization": f"Bearer {LITELLM_API_KEY}",
|
||||
"Content-Type": "application/json"
|
||||
"Content-Type": "application/json",
|
||||
"Accept": "application/json"
|
||||
}
|
||||
|
||||
debug_log(f"Executing MCP tool: {tool_name} with args: {arguments}")
|
||||
|
||||
Reference in New Issue
Block a user