[GH-ISSUE #40] Feature request: Add list_sources endpoint for tool server discoverability #24

Open
opened 2026-10-18 21:13:34 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @Lyhtande on GitHub (Jun 8, 2026).
Original GitHub issue: https://github.com/open-webui/oikb/issues/40

Feature Request

When oikb is used as a Tool Server in Open WebUI, the LLM has no way to discover which source names are configured. This leads to errors like:

{"triggered": false, "error": "No entry matching 'some-identifier'"}

...because the model guesses the identifier instead of knowing the correct name.

Current Behavior

The model must already know the exact name or kb-id from .oikb.yaml to use POST /sync/{name-or-kb-id}. There is no endpoint to discover available sources programmatically.

The /health endpoint does return source names, but the model does not automatically call it before attempting a sync.

Proposed Solution

Add a GET /sources endpoint that returns the list of configured source names and their kb-ids:

[
  {"name": "my-docs", "kb_id": "..."},
  {"name": "my-wiki", "kb_id": "..."}
]

This would allow the LLM to:

  1. Call GET /sources to discover available sources
  2. Call POST /sync/{name} with the correct identifier

Why This Matters

Without this, users must manually add all source names to every model's system prompt — which is fragile and hard to maintain, especially with multiple Knowledge Bases.

Alternative

If a dedicated endpoint is not preferred, the OpenAPI spec could include the available source names as an enum in the POST /sync/{identifier} path parameter description — so the LLM learns them from the spec itself.

Originally created by @Lyhtande on GitHub (Jun 8, 2026). Original GitHub issue: https://github.com/open-webui/oikb/issues/40 ## Feature Request When oikb is used as a Tool Server in Open WebUI, the LLM has no way to discover which source names are configured. This leads to errors like: ```json {"triggered": false, "error": "No entry matching 'some-identifier'"} ``` ...because the model guesses the identifier instead of knowing the correct name. ## Current Behavior The model must already know the exact `name` or `kb-id` from `.oikb.yaml` to use `POST /sync/{name-or-kb-id}`. There is no endpoint to discover available sources programmatically. The `/health` endpoint does return source names, but the model does not automatically call it before attempting a sync. ## Proposed Solution Add a `GET /sources` endpoint that returns the list of configured source names and their kb-ids: ```json [ {"name": "my-docs", "kb_id": "..."}, {"name": "my-wiki", "kb_id": "..."} ] ``` This would allow the LLM to: 1. Call `GET /sources` to discover available sources 2. Call `POST /sync/{name}` with the correct identifier ## Why This Matters Without this, users must manually add all source names to every model's system prompt — which is fragile and hard to maintain, especially with multiple Knowledge Bases. ## Alternative If a dedicated endpoint is not preferred, the OpenAPI spec could include the available source names as an enum in the `POST /sync/{identifier}` path parameter description — so the LLM learns them from the spec itself.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/oikb#24
No description provided.