kernel_graph MCP tool
Query the tree-sitter code graph of a pinned Linux kernel tree (symbols, definitions, references, includes, call edges, Kconfig and Kbuild links) with file:line answers. Build it first with fw kernel graph build on a host that has the tree.
Call it
Section titled “Call it”{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "kernel_graph", "arguments": { "query": "stats" } }}Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
query |
string: stats, def, refs, callers, callees, includes, included-by, file, config, search, path |
yes | |
operands |
array |
no | Symbol, file path or CONFIG_ name (two symbols for path). |
tree |
string |
no | Pinned tree id: stable (default), mainline, cachyos. |
limit |
integer |
no |
Input schema
Section titled “Input schema”{ "type": "object", "properties": { "query": { "type": "string", "enum": [ "stats", "def", "refs", "callers", "callees", "includes", "included-by", "file", "config", "search", "path" ] }, "operands": { "type": "array", "items": { "type": "string" }, "description": "Symbol, file path or CONFIG_ name (two symbols for `path`)." }, "tree": { "type": "string", "description": "Pinned tree id: stable (default), mainline, cachyos." }, "limit": { "type": "integer" } }, "required": [ "query" ]}Server
Section titled “Server”Part of the fw MCP server. See the tool list and the agents guide.