build_context_prompt tool ¶Returns a fully assembled prompt with relevant facts in a fixed envelope, suitable for piping into a non-MCP LLM.
user_promptRequired string. The user’s actual question.
limitInteger. Optional. Number of facts to include. Default 8.
max_charsInteger. Optional. Hard cap on the total prompt size in characters.
The tool greedy-packs the highest-scoring facts that fit, stopping
when adding the next would exceed max_chars. At least one
fact is always included if any matched.
min_scoreNumber, 0–1. Optional. Lower bound on similarity for included facts.
tagsArray of strings. Optional. Tag filter, same semantics as
recall.
{
"ok": true,
"prompt": "The following are previously known facts:\\n\\n[fact 1]\\n\\n[fact 2]\\n\\n-----------------\\n\\nThe following is the user's prompt:\\n\\n[user prompt]"
}
If no relevant facts were found, the body says "No relevant
previously known facts were found." instead of listing facts.
INVALID_INPUT, EMBEDDING_ERROR, DATABASE_ERROR.