query_build_knowledge
Search the platform's proven build knowledge before inventing a fix.
Ask one focused query per recipe concept ("branding debian", "users autologin gdm", "installer calamares", ...) and one per new failure text. Make each a separate MCP invocation and read its result before the next; never batch queries in one shell call or concatenate their responses. A concept card comes back whole: every file that concept needs, with its template, slots and checks.
Tenant-scoped RAG over verified past fixes, feature/hook docs, and proven build documents, plus the verified learned-rule prose for the build's base image. Queries run as the BUILD OWNER, not the caller — guest builds run on system-owned harness keys, and querying as the system user would skip the owner's private knowledge tier. Read-only; the response is capped at 32KB.
For a recipe with a specific desktop, config_baseline is the certified
config baseline for this base image and desktop (a commit to read with
git show, or a line saying none exists): the same text
prepare_iso_workspace returns as prior_knowledge, for a goal that
was handed a Build ID and so never calls it. learned_rules and
config_baseline come with a session's first call for the build only,
unless include_learned_rules says otherwise; context_note says
whether they were sent earlier, none were found, the read failed or
learned_rules was truncated.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"build_id": "<build_id>",
"query": "<query>"
},
"name": "query_build_knowledge"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | Maximum evidence hits to return (capped at 12). | |
| query | Yes | What you need to know — a failure summary, feature question, or capability you are about to implement. | |
| api_key | No | OpenFactory MCP API key (optional). | |
| build_id | Yes | The build whose knowledge scope to query. | |
| session_token | No | Session token from a previous tool response. IMPORTANT: Always pass the session_token from the most recent tool response to maintain session continuity. | |
| include_learned_rules | No | Also include learned_rules (previously VERIFIED remediations for this build's base image) and config_baseline. Default: only on this session's first call for this build; true repeats them, false omits them. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||