knowledge-base-retrieve
Retrieve raw KB documents by tags. The results can be reasoned over directly (by you, the calling agent) to build a process_flow_manifest and call create-process-flow — or fed into a separate classification-style flow first, if the reasoning itself warrants its own dedicated flow. Don't build operational flows straight from unreasoned retrieve output — read it and think first, whichever way you do that.
What it is called on each surface
The wire name is knowledge-base-retrieve everywhere: it is what the Wexa MCP server advertises, the REST path is
POST /v1/knowledge-base-retrieve, and each SDK exposes it under its own language's naming convention.
| Surface | Name |
|---|---|
| Wexa MCP server | knowledge-base-retrieve |
| REST API | POST /v1/knowledge-base-retrieve |
| TypeScript SDK | fabric.knowledgeBaseRetrieve() |
| Python SDK | fabric.knowledge_base_retrieve() |
Arguments
1 of the 5 arguments is required. Omitting a required one is refused before the tool runs, at the validation stage, so it costs nothing and changes nothing.
| Argument | Type | Required | Notes |
|---|---|---|---|
goal | string | Optional | Optional natural-language query for semantic re-ranking. |
include_image_data | boolean | Optional | Include base64 image payloads (default false). |
limit | integer | Optional | Max results (default 10). |
offset_point_id | string | Optional | Pagination cursor from a prior response. |
tags | array | Required | Knowledge base tags to filter on. |
project_id, projectID, organization_id and executed_by are not arguments you pass: the
platform binds all four from the credential you authenticated with, and both SDKs refuse them
before the request leaves your process — see
server-bound arguments.
What it returns
The three surfaces wrap this differently, and code written against one will not read another correctly — see return shape.
The shape of result for knowledge-base-retrieve is not recorded here: it was not captured against a live
deployment. Call it once and read what comes back rather than assuming a shape.
Keeping the lifecycle_id is what lets you ask later why a call was allowed, refused or held.
Calling it
The same call on all four surfaces. Pick a tab once and every code block in the documentation follows it.
The ids in this example are real: they resolve against the project the documentation is written against, so the call runs as written once you point it at your own deployment. Swap them for the ids of your own objects.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "knowledge-base-retrieve",
"arguments": {
"tags": []
}
}
}Errors
Both SDKs raise the same typed errors, chosen from the gateway's own error string first and its
HTTP status second. knowledge-base-retrieve checks the fabric:orchestrate.read grant, and reaches the seven classes every
tool reaches — listed under the common set. These are the ones specific to it:
| Error | Status | Raised when |
|---|---|---|
ConfigurationError | 5xx | knowledge-base-retrieve is not available to you. Retrying will not help. |
Governance
Every call to knowledge-base-retrieve runs through the same ten-stage lifecycle as every other Wexa tool: the
credential is resolved to a scope, the fabric:orchestrate.read grant is checked, quota is drawn down, the arguments are
validated, policy rules are evaluated, the call is executed, the result is shaped and redacted, and an audit
record is written. The lifecycle_id in the response is the handle to that record.
knowledge-base-retrieve only reads, so it is not marked consequential: it is audited lightly and is never held for
approval. It still consumes quota and is still refused by policy like anything else.
See also
The tool index and errors.