Skip to main content
Two server tools give a model access to knowledge bases in the current workspace:
  • retrieve_knowledge_bases lists available knowledge bases and their keys.
  • query_knowledge_base retrieves document content from one knowledge base.
Knowledge-base server tools are currently supported on the Responses API. Use both tools when the knowledge-base key is not already known.

Quick start

The examples use the client configuration from the Server tools overview.

How retrieval works

  1. retrieve_knowledge_bases returns knowledge-base keys and, when requested by the model, their descriptions.
  2. The model selects a key and calls query_knowledge_base with a search query.
  3. The query tool returns matching document content to the model.
The list tool returns metadata, not document content. A model must call the query tool before it can answer from a knowledge base.

Model-supplied arguments

The tool entries have no configuration fields beyond type. The model supplies these arguments when it calls them: Knowledge-base calls are not included in usage.server_tool_use.