Home / Servers / ElevenLabs API / query_agent_knowledge_base_rag_route

Query Agent Knowledge Base Rag

An MCP tool from the ElevenLabs API server, hosted on mcp.hjlabs.in.

Query Agent Knowledge Base Rag Run the agent's exact RAG retrieval for an ad-hoc query and return the ranked chunks the agent would retrieve. Read-only: no conversation is created. The response reflects current retrieval… [POST /v1/convai/agents/{agent_id}/knowledge-base/rag-query]

Name on the gateway: elevenlabs_api__query_agent_knowledge_base_rag_route · may change things.

Parameters

NameTypeDescription
agent_id requiredstringThe id of an agent. This is returned on agent creation.
branch_idstringThe ID of the branch to use
query requiredstringQuery to run against the agent's knowledge base RAG index.
use_agent_defaultsbooleanWhen true (the default), retrieval uses the agent's own RAG settings…
max_documents_lengthintegerOptional maximum total character length of document chunks returned. Overrides…
max_retrieved_rag_chunks_countintegerOptional maximum number of document chunks retrieved. Overrides the selected…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "elevenlabs_api__query_agent_knowledge_base_rag_route",
  "arguments": {
    "agent_id": "…",
    "query": "…"
  }
}

Or connect the ElevenLabs API server directly, which lists 487 tools including this one:

Run in your terminal
claude mcp add --transport http hj-elevenlabs-api https://mcp.hjlabs.in/mcp/elevenlabs-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the query agent knowledge base rag tool with agent_id set to ….

More from ElevenLabs API