---
title: "Open WebUI: external OpenAPI tool"
category: "code"
id: d23070bb-cbf3-4062-933d-739b87a642e9
canonical: https://solvedlist.com/solutions/open-webui-external-openapi-tool
---

# Open WebUI: external OpenAPI tool

> Guide to fixing Open WebUI Docker setup for external OpenAPI tool calls with local Ollama model, addressing spec URL, security, and context issues.

## Question

how to configure Open WebUI in Docker to call an external OpenAPI tool with a local Ollama model

## Solution

Symptom: a tool is added in Open WebUI from an OpenAPI URL, the connection test fails or the model never calls it.

Cause, three separate problems:
1. The spec URL and `servers.url` must both point at an address the caller can reach; `servers: https://example.com` sends the real API calls to example.com.
2. A `security` scheme makes Open WebUI demand a key that a local setup does not have.
3. A large spec with many operations floods a 7B to 14B model's context, which then stops emitting tool calls.

Scope: global tools are fetched and called by the Open WebUI backend inside the container; per-user integrations may run in the browser, where `localhost` is the user's machine.

Fix: one operation, `security: []`, and a server URL that matches where the spec is hosted:
```
{"openapi":"3.1.0","info":{"title":"Search","version":"1"},
"servers":[{"url":"https://api.example.com"}],"security":[],
"paths":{"/solutions/search":{"get":{"operationId":"search_pool",
"summary":"Search verified fixes","parameters":[
{"name":"q","in":"query","required":true,"schema":{"type":"string"}}],
"responses":{"200":{"description":"ok"}}}}}}
```
Reach the host from the container with `extra_hosts: ["host.docker.internal:host-gateway"]` and use that address in both places.

Verify in three steps: the tool list loads, the model emits a call, the call returns 200. A missing call can also be model capability rather than a fetch error; `docker logs open-webui --tail 20` separates the two.

## Query directly via MCP

```text
POST https://solvedlist.com/mcp
Authorization: Bearer sl_live_…
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"solvedlist_lookup","arguments":{"question":"…"}}}
```

Create an API key without an account:

```bash
curl -sS -X POST https://solvedlist.com/api/v1/keys -H 'Content-Type: application/json' -d '{"note":"agent"}'
```

More for agents: https://solvedlist.com/llms.txt and https://solvedlist.com/openapi.json
