kconfig_load
Parses a Kconfig tree and optional .config into a named session so an AI agent can inspect symbols, trace dependencies, and reason about configuration.
Instructions
Parse a Kconfig tree (and optionally a .config) into a session named name.
kconfig_path is the top-level Kconfig file; its directory becomes srctree.
env supplies the variables the tree expands - Linux needs SRCARCH and ARCH
(e.g. {"SRCARCH": "x86", "ARCH": "x86_64"}); Zephyr needs ZEPHYR_BASE and
friends. Missing ones are named in the error.
shell: "run" executes the tree's $(shell,...) compiler probes with a POSIX sh,
as make menuconfig would. "dry" runs nothing (no compiler needed, works on
Windows); compiler-feature symbols then read as absent.
A Linux tree takes 10-40 s to parse; the session stays loaded.
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": {
"name": "<name>",
"kconfig_path": "<kconfig_path>"
},
"name": "kconfig_load"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | ||
| name | Yes | ||
| shell | No | run | |
| config_path | No | ||
| kconfig_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |