{"id":109249,"target_id":"51af4e7bc6917816","observed_at":"2026-11-14T20:32:52Z","from_subject":"sha256-Qt6S2oNTYdYRbApK0yocBq8z3OhQ1pIY7i4r3QOu/5M=","to_subject":"sha256-7eDRReKl3IMuuVzApapgF1th8aKbhdhrgjHmRSr7MaM=","from_toolset":"sha256-pTTeI2/VFEaynoNh56fPvN4df9H/p7H5sB4EiEFrlao=","to_toolset":"sha256-6TP+PPu80sWko/8ppV3Ct44gUmW9FhvL9mCsupu0rMQ=","summary":{"added":[],"removed":[],"modified":[{"tool":"check_ollama","fields":{"description":[["=","Check whether the LLM backend is running and the configured embedding/chat model is installed.\n\n    Read-only: yes. No side effects. Call before smart_search,\n    semantic_search, or explain_symbol (when on-demand fallback is\n    expected — pre-computed analysis returns instantly without the LLM\n    backend).\n\n    Args:\n        project_root: Project root. Auto-detected if omitted. Used to\n            locate the project's LLM configuration.\n        project: Project name or project_id — call list_projects to get them.\n            Use it to ask about a project that is not the project of the\n            current directory. It is an alternative to project_root, which\n            takes a root path. Give one of the two, not both.\n\n    Returns:\n        dict: {ollama_enabled (bool), status (str — \"ok\"|\"disabled\"|\n        \"not_configured\"|\"model_missing\"|\"embedding_unavailable\"|\"error\"),\n        ollama_running (bool), ollama_url (str), configured_model (str),\n        num_ctx (int), installed_models (list[str]),\n        chat_api (dict — ``{configured (bool), model (str)}``: whether an\n        external chat API replaces Ollama, and the model it names; a\n        configured one adds endpoint, format, and compliance_warning for an\n        external host),\n        configured_embed_model (str), embedding_installed (bool),\n        embedding_backend (str — \"ollama\", \"local\" for a\n        sentence-transformers or ``ft://`` model, which needs no Ollama:\n        it counts as installed, and with chat on an external API a\n        stopped Ollama still gives \"ok\"; or the provider of an API profile\n        of the embeddings, \"openrouter\" or \"openai_compatible\"),\n        embedding_compliance_warning (str, when the embeddings go to an\n        external API: the code and each search query leave the machine),"],["+","\n        version_problem (str, when the Ollama server of ``ollama_url`` is\n        older than the oldest version of one of its uses: 0.40.15 for the\n        embeddings, 0.30.1 for the chat),"],["=","\n        message (str, when status is not \"ok\"), model_details (list[dict]),\n        suggest_cloud (bool), vec_available (bool),\n        vec_error (str, optional), debug_log (str, optional — only when\n        debug logging is enabled)}\n\n        The tool looks for the chat model on the Ollama server of the chat\n        profile (the ``url`` of an Ollama profile).  A profile of another\n        provider (an API or the ChatGPT plan) runs the model itself, and\n        the tool asks no Ollama server for it.  ``\"model_missing\"``:\n        ``message`` names a command for each missing model, which sets\n        ``OLLAMA_HOST`` to the server that must hold the model.\n        ``\"error\"`` also means that the Ollama server of the chat profile\n        gives no model list.  When the Ollama server of the embeddings\n        (``ollama_url``) does not answer, the tool does not look for the\n        chat model.\n\n        ollama_url, num_ctx, installed_models, model_details,\n        configured_embed_model, and embedding_installed are present only\n        when Ollama runs; configured_model also needs chat on Ollama.\n        ``\"disabled\"`` gives only status, ollama_enabled,\n        ollama_running, configured_model, num_ctx, and message;\n        embedding_backend is present on every other status.\n\n    What to do for each status:\n\n    - ``\"ok\"``, ``\"disabled\"``: continue. ``\"disabled\"`` means that no\n      tool calls the LLM.\n    - ``\"not_configured\"``: when ``message`` says that the url of the\n      Ollama profile names a server that is not Ollama, the operator\n      corrects that profile.  Else ask the operator: a local Ollama or a\n      cloud service?  For a local Ollama, the operator installs it from\n      https://ollama.com (without internet: the installer from a\n      different computer).  Do not install Ollama yourself.  For a cloud\n      service, the operator runs ``fw-context llm setup`` in a terminal,\n      then you call ``configure_llm(profile=<name>)``.\n    - ``\"model_missing\"``: give the size of each model as your estimate,\n      and say that it can be wrong.  Ask: pull the model, or use a cloud\n      service?  Run a command of ``message`` only after the approval.  In\n      a different shell, set ``OLLAMA_HOST`` as the command does: without\n      it, the model can go to a different server.  When the pull fails\n      on the network, the operator can pull the model on a computer with\n      internet and copy ``~/.ollama/models/``.  With\n      ``suggest_cloud: true``, no installed model is large enough for\n      code: recommend a cloud service.\n    - ``\"embedding_unavailable\"``: tell the operator that\n      ``semantic_search`` does not work, and give the cause from\n      ``message``.\n    - ``\"error\"``: give ``message`` to the operator."],["+","\n    - ``version_problem``, with each status: give it to the operator.  An\n      index run does not do the use that it names (no embeddings, or no\n      LLM analysis) until the operator updates Ollama."],["=","\n\n    WHY these rules are here and not only in the server instructions: an\n    LLM client can cut the instructions of a server (Claude Code keeps\n    approximately 2500 characters), and it always sends the description\n    of a tool.\n    "]]}},{"tool":"explain_symbol","fields":{"description":[["=","Explain what a C/C++ symbol does in plain English — libclang-aware\n    analysis. Uses pre-computed LLM analysis when available (instant),\n    falls back to on-demand LLM. Falls back to macro explanation when\n    the name matches a ``#define``.\n\n    Read-only. No side effects — uses pre-computed LLM analysis when available\n    (instant, generated during ``fw-context index --analyze``), falls back to\n    calling an LLM on-demand. Returns the symbol's purpose, inputs, outputs,\n    and side effects.\n\n    For raw source code use ``get_source``. For symbol metadata without\n    explanation use ``lookup_symbol``. For body + callers + callees use\n    ``get_symbol_context``.\n\n    Args:\n        name: Symbol name to explain. E.g. ``uart_init``, ``Modem::send``.\n        project_root: Project root directory. Auto-detected if omitted.\n        project: Project name or project_id — call list_projects to get them.\n            Use it to ask about a project that is not the project of the\n            current directory. It is an alternative to project_root, which\n            takes a root path. Give one of the two, not both.\n        context_lines: Lines of source context around the symbol definition\n            (default 40, max 200). Only used when no pre-computed analysis exists.\n        variant: Variant of the build (a board, or a PlatformIO\n            environment). On a project of more than one build, give the\n            arguments of one build as the refusal lists them: the\n            variant, the image, or the two. fw-context does not select a\n            build. One query answers for ONE build.\n        image: Image of the build: a separate program, such as the\n            application or the bootloader. Give it when the build has an\n            image name.\n\n    Returns:\n        dict: {name, kind, file, line, signature, explanation, llm_analysis\n        (if pre-computed)}.  With no pre-computed analysis and no LLM\n        (disabled), the dict holds ``explain_prompt`` and no\n        ``explanation``.  Macro fallback returns ``kind=\"macro\"``, ``signature`` (as ``#define NAME``\n        or ``#define NAME(a, b)``), ``is_function_like``, ``value`` (the\n        replacement text ALONE), and "],["-","``expanded_value``."],["+","``expanded_value`` or\n        ``expanded_values`` (the value in the build, see ``lookup_symbol``)."],["=","\n\n        A ``warning`` key means that the chat model of the LLM profile gave\n        no explanation — the request timed out, or the model is not\n        available.  The dict then holds ``source`` and ``explain_prompt``:\n        read the source, and answer the prompt yourself.\n\n        When the file changed after the last index run, the dict adds\n        ``stale`` (True) and ``stale_warning`` (str).  ``stale_warning`` is\n        separate from ``warning``, which the LLM error paths use.  A symbol\n        that moved gives its indexed body, not the code that now sits at the\n        stored line number.\n\n        The on-demand path reads ``context_lines`` around the symbol from\n        the DISK.  That window is NOT ifdef-filtered: it holds every\n        ``#if`` branch.  This tool gives no ``source_origin``.\n\n        An ``ambiguous_warning`` key means that *name* matched more than one\n        symbol, such as two classes with a method of the same name.  This\n        answer is about ONE of them, and the key names it.  ``candidates``\n        (max 20) lists the others and ``candidates_total`` counts them.\n        Give a ``qualified_name`` from it to ask about one symbol only.\n        It is separate from ``warning``, which the LLM error paths use.\n\n        A symbol in a file outside the project root, such as an SDK\n        header, is explained and not refused.\n\n        On failure the dict holds only ``error`` with the reason.\n    "]]}},{"tool":"find_callers","fields":{"description":[["=","Find who calls a C/C++ function — direct calls AND indirect via\n    function pointers, callbacks, and struct/array init lists (such as a\n    vector table that the build generates in C). libclang-powered: detects\n    function-pointer assignments that text-based search cannot see.\n    A slot of an assembly vector table (``ref_kind`` ``\"vector\"``) and an\n    ``NVIC_SetVector`` install (``\"runtime_vector\"``) are not callers: use\n    ``find_references`` or ``get_vector_table`` for those.  The SDK model\n    gives the handler of an ``NVIC_SetVector`` install a ``\"call\"`` row\n    from ``NVIC_SetVector`` too (origin ``\"sdk\"``, entry ``\"an\n    interrupt\"``).\n\n    Falls back to macro lookup when the symbol is not found as a\n    function/method: returns the macro definition (kind=\"macro\") and\n    files that use it (ref_kind=\"macro_use\").\n\n    Use when you need a quick, flat list of immediate callers. For the full\n    transitive call tree (who calls this indirectly through other functions),\n    use ``find_all_callers_recursive``.  For all references including reads\n    and member accesses, use ``find_references``.  For a path between two\n    specific symbols, use ``find_call_path``.\n\n    Read-only. No side effects. Requires the reference index\n    (``fw-context index`` — refs are on by default).  Only direct call\n    sites are returned; callers more than one hop away are not included.\n\n    Indirect edges (``ref_kind: \"indirect\"``) are detected when a function\n    pointer references a function through:\n\n    - **Call arguments**: ``callback(&Class::method, this)``,\n      ``EventQueue::call_every(ms, obj, &handler)``\n    - **Assignments**: ``driver.onData = &handleData``,\n      ``global_cb = &handler``\n    - **Variable initializers**: ``static void (*fp)(int) = &handler``\n    - **Struct/array init lists**: ``{.on_data = &handler}``,\n      ``{&fn_a, &fn_b}``\n\n    Args:\n        name: Symbol name to find callers of. Uses the same three-tier\n            resolution as ``find_references`` (exact name, exact qualified,\n            suffix LIKE).\n        project_root: Project root directory. Auto-detected if omitted.\n        project: Project name or project_id — call list_projects to get them.\n            Use it to ask about a project that is not the project of the\n            current directory. It is an alternative to project_root, which\n            takes a root path. Give one of the two, not both.\n        limit: Maximum results of one page (default 50, max 200).\n        offset: Skip this many results. Reads the next page of a symbol\n            with many call sites; the page notice names the offset to use.\n        variant: Variant of the build (a board, or a PlatformIO\n            environment). On a project of more than one build, give the\n            arguments of one build as the refusal lists them: the\n            variant, the image, or the two. fw-context does not select a\n            build. One query answers for ONE build.\n        image: Image of the build: a separate program, such as the\n            application or the bootloader. Give it when the build has an\n            image name.\n\n    Returns:\n        The page notice first — ``total``, ``offset``, ``shown``, ``more``\n        — then a dict per call site with: file, line, col (the column of the\n        site, 0 when the index has none; two calls on one line are two rows),\n        ref_kind (``\"call\"``, ``\"indirect\"``, ``\"implicit_construct\"``, or\n        ``\"macro_use\"``), origins (list — the analyses that found the site: ``\"direct\"``, the AST\n        of the compiler names the target; ``\"asm\"``, the\n        assembly reader (a call, a jump or a fall into another routine, of a\n        routine that the flow of control of the file gives); ``\"sdk\"``, a\n        rule of the SDK model: a function of an SDK runs the function that a\n        registration put into its slot, and no C code of the build does (a\n        task that the scheduler starts, a callback of a library without\n        source); the row stands at the declaration of that function;\n        ``\"instantiation\"``, the body of a template instance, stored on the\n        template; ``\"slot\"``, an indirect call reaches a function that the\n        code puts into the slot it calls through; ``\"type_only\"``, an\n        indirect call whose slot does not tell its targets reaches each\n        function of its type whose address the build takes, a superset),\n        caller (enclosing function name), caller_kind (``\"function\"``,\n        ``\"method\"``, …), and ``entry`` when a rule of the SDK model gives\n        the edge: what starts the function (``\"the FreeRTOS scheduler\n        (vTaskStartScheduler)\"``, ``\"an interrupt\"``). Macro fallback puts a dict with ``kind=\"macro\"``,\n        ``signature`` (``#define`` free: ``NAME`` or ``NAME(a, b)``),\n        ``is_function_like``, ``value`` (the replacement text ALONE) and\n        ``expanded_value`` "],["+","or ``expanded_values`` (see ``lookup_symbol``)\n        "],["=","between the notice and the rows;\n        that answer pages too, and its ``total`` counts the uses in active\n        code only — a use inside a comment is not one.\n\n        When *name* matches more than one symbol, such as two classes with\n        a method of the same name, the answer holds the call sites of all\n        of them.  A ``warning`` dict then comes first and names the\n        symbols, and each result carries ``target_qualified_name``.  Give\n        the full qualified name to ask about one symbol only.\n\n        A virtual method with no call site of its own answers with the\n        call sites of its base method and of the other overrides of that\n        base.  A ``warning`` dict leads such an answer, and each row\n        carries ``recorded_against`` (the symbol the index records the\n        call against) and ``reaches_this_symbol`` (true for a call on the\n        base method, which reaches this override at run time; false for a\n        call on a sibling override, which does not).  Read both before you\n        report a caller count.\n\n        Never empty: one dict with ``error`` (symbol not resolved) or\n        ``info`` (no references of this kind).  Check both keys first.\n    "]]}},{"tool":"find_references","fields":{"description":[["=","Find ALL references to a C/C++ symbol — calls, reads, member accesses,\n    function pointer registrations, vector table slots, and macro\n    usages. libclang-powered: detects function-pointer registrations\n    (vector table entries, callback attachments, ``NVIC_SetVector``\n    installs) that text-based search cannot see.\n\n    Falls back to macro lookup when the symbol is not found as a\n    function/method: returns the macro definition (kind=\"macro\") and\n    files that reference it (ref_kind=\"macro_use\").\n\n    Read-only. No side effects. Returns every reference in the indexed codebase,\n    including call sites, variable reads, struct member accesses, indirect\n    function-pointer references, and macro usages. Requires the reference\n    index (``fw-context index`` — refs on by default).\n\n    For direct callers only use ``find_callers``. For transitive callers use\n    ``find_all_callers_recursive``. For call paths between two symbols use\n    ``find_call_path``.\n\n    Args:\n        name: Symbol name to find all references of.\n        project_root: Project root directory. Auto-detected if omitted.\n        project: Project name or project_id — call list_projects to get them.\n            Use it to ask about a project that is not the project of the\n            current directory. It is an alternative to project_root, which\n            takes a root path. Give one of the two, not both.\n        limit: Maximum results of one page (default 50, max 200).\n        offset: Skip this many results. Reads the next page of a symbol\n            with many references; the page notice names the offset to use.\n        variant: Variant of the build (a board, or a PlatformIO\n            environment). On a project of more than one build, give the\n            arguments of one build as the refusal lists them: the\n            variant, the image, or the two. fw-context does not select a\n            build. One query answers for ONE build.\n        image: Image of the build: a separate program, such as the\n            application or the bootloader. Give it when the build has an\n            image name.\n\n    Returns:\n        The page notice first — ``total``, ``offset``, ``shown``, ``more``\n        — then a dict per reference with: file, line, col, ref_kind,\n        origins (as in ``find_callers``), caller, caller_kind, and\n        ``entry`` as in ``find_callers``.\n        ``ref_kind`` is one of: ``\"call\"``, ``\"ref\"``, ``\"member\"``,\n        ``\"indirect\"`` (function-pointer reference in arguments, assignments,\n        initializers, or init lists), ``\"implicit_construct\"`` (the\n        constructor that the compiler selects for an object at namespace\n        or class scope; a local object, a new-expression and a member\n        initializer give a ``\"call\"``), ``\"vector\"`` (a slot of\n        an assembly vector table names the symbol; file and line are the\n        table entry), ``\"vector_data\"`` (a slot holds an address computed\n        from the symbol, such as the initial stack pointer),\n        ``\"runtime_vector\"`` (an ``NVIC_SetVector`` call installs the\n        symbol at run time), ``\"alias\"`` (``.thumb_set``: another assembly\n        name for the symbol), ``\"macro_use\"`` (macro usage\n        in file). Macro fallback puts a dict with ``kind=\"macro\"``,\n        ``signature`` (``NAME`` or ``NAME(a, b)``), ``is_function_like``,\n        ``value`` (the replacement text ALONE) and ``expanded_value``"],["+"," or"],["=","\n        "],["+","``expanded_values`` (see ``lookup_symbol``) "],["=","between the notice and"],["-"," "],["+","\n        "],["=","the rows;\n        that answer pages too, and its ``total`` counts the uses in active\n        code only — a use inside a comment is not one.\n\n        When *name* matches more than one symbol, the answer holds the\n        references of all of them.  A ``warning`` dict then comes first and\n        names the symbols, and each result carries\n        ``target_qualified_name``.  Give the full qualified name to ask\n        about one symbol only.\n\n        A virtual method with no reference of its own answers with the\n        references of its base method and of the other overrides of that\n        base.  A ``warning`` dict leads such an answer, and each row\n        carries ``recorded_against`` and ``reaches_this_symbol`` (true only\n        for a row on the base method), as in ``find_callers``.  Read both\n        before you report a reference count.\n\n        Never empty: one dict with ``error`` (symbol not resolved) or\n        ``info`` (no references).  Check both keys first.\n    "]]}},{"tool":"get_source","fields":{"description":[["=","Read a C/C++ function/method/enum/macro body using libclang exact\n    extents — no guessing line numbers. Uses AST-precise {start, end}\n    extents so you get exactly the function body. Generic file readers\n    don't know where a function actually ends — libclang tracks exact\n    {start, end} from the AST.\n\n    The body is **ifdef-filtered**: a line of an inactive ``#if`` branch\n    comes back blank, thus the text holds only the code that compiles for\n    this build.  The line numbers do not move.  ``source_origin`` says where\n    the text came from — ``\"index\"`` is the filtered copy, ``\"disk\"`` is the\n    file itself and holds EVERY branch.  A body reaches you from the disk\n    when the file changed after the last index run (``stale_warning`` says\n    so), or when the index holds no body for the symbol, such as a\n    declaration.\n\n    For enums, includes a ``constants`` array of the member constants\n    with their values (at most 200; ``constants_total`` counts them all,\n    and ``constants_hint`` names the call that pages them).  For macros,\n    returns kind=\"macro\" with ``signature``\n    (``#define NAME`` or ``#define NAME(a, b)``), ``is_function_like``,\n    ``value`` (the replacement text ALONE — the parameter list is not part\n    of it) and ``expanded_value`` "],["-","(preprocessor-resolved)."],["+","or ``expanded_values`` (the value in the\n    build, see ``lookup_symbol``)."],["=","\n\n    For rich context (who calls this, what does it call) use\n    ``get_symbol_context`` instead — it returns body, callers, and callees\n    in a single call. For the full file, use ``read_file``.\n\n    Read-only. No side effects.\n\n    Args:\n        name: Symbol name, or qualified name (``Class::method``) to select\n            one symbol. Returns exact function body via libclang extent.\n        project_root: Project root. Auto-detected if omitted.\n        project: Project name or project_id — call list_projects to get them.\n            Use it to ask about a project that is not the project of the\n            current directory. It is an alternative to project_root, which\n            takes a root path. Give one of the two, not both.\n        variant: Variant of the build (a board, or a PlatformIO\n            environment). On a project of more than one build, give the\n            arguments of one build as the refusal lists them: the\n            variant, the image, or the two. fw-context does not select a\n            build. One query answers for ONE build.\n        image: Image of the build: a separate program, such as the\n            application or the bootloader. Give it when the build has an\n            image name.\n\n    Returns:\n        dict: {name, qualified_name, kind, file, line, signature,\n        docstring, is_definition, is_template, is_virtual, is_pure_virtual,\n        source (str — the function/enum/macro body, truncated at 8000 chars),\n        warning (str, optional — when source file cannot be read)}.\n        May also include ``end_line`` (the last line of the extent),\n        ``template_usr``, ``parent_usr``, ``enum_value``, ``constants``\n        (list for enums), ``value`` (macro replacement text),\n        ``expanded_value`` "],["-","(preprocessor-resolved"],["+","or ``expanded_values`` (the value of a"],["="," macro "],["-","value)"],["+","in\n        the build, see ``lookup_symbol``)"],["="," when"],["-","\n        "],["+"," "],["=","applicable.  A declaration has no extent, thus it gets no\n        ``end_line``.\n\n        ``line`` and ``end_line`` are the extent of the symbol, thus they\n        are the citation: quote ``file:line-end_line``.  Do not count the\n        lines of ``source`` to find the end.\n\n        ``source`` carries a line-number prefix on every line — four\n        columns, right-aligned, then two spaces (``\"  20     bool ...\"``).\n        This tool always numbers its text.  ``read_file`` numbers its\n        ``content`` when you pass ``line_numbers=True``, and the ``source``\n        of ``search_bodies`` is always bare.  Strip the prefix before you\n        compare the text with anything.\n\n        When the file changed after the last index run, the dict adds\n        ``stale`` (True) and ``stale_warning`` (str).  ``source_origin`` then\n        tells where the body comes from: ``\"disk\"`` when the symbol did not\n        move, ``\"index\"`` when it did and the body comes from the index\n        instead.  A moved symbol never gives the code of another symbol.\n\n        ``_source_truncated`` (True) marks a body that a cap cut:\n        ``index.max_symbol_body_lines`` bounds the number of lines, and a\n        second cap bounds the characters (8000).  The character cut lands in the\n        middle of a line, thus a body with this mark can end in an\n        unbalanced brace.  Read the rest with ``read_file`` and a range.\n\n        An ``ambiguous_warning`` key means that *name* matched more than one\n        symbol, such as two classes with a method of the same name.  This\n        body belongs to ONE of them, and the key names it.  ``candidates``\n        (max 20, each with ``in_project_root``) lists the others and\n        ``candidates_total`` counts them.  Give a ``qualified_name`` from it\n        to get one symbol only.  It is separate from ``warning``, which\n        reports a body that could not be read from the disk.\n\n        A body in a file outside the project root, such as an SDK header,\n        is returned and not refused.\n\n        On failure the dict holds only ``error`` with the reason.\n    "]]}},{"tool":"get_symbol_context","fields":{"description":[["=","Rich one-shot context for a C/C++ symbol: body, signature, the direct\n    callers and callees. Answers \"what does this do and how does it fit in\n    the system?\" in a single response — libclang powers the call graph,\n    not regex. Falls back to macro display when the symbol is not found.\n\n    Prefer this over ``get_source`` when you also need callers, callees,\n    indirect call sites, or LLM analysis — all returned in a single call.\n    If you only need the raw function body (no metadata), ``get_source`` is\n    slightly faster. For transitive call-graph exploration use\n    ``find_all_callers_recursive`` or ``find_callees_recursive``.\n\n    The callers and callees include vendor/SDK code — the call graph\n    naturally spans project and vendor boundaries in both directions\n    (project → vendor API, vendor callback → project handler).  Each list\n    is cut (callers at 50, callees at 100), and its ``*_total`` says how\n    many there are; ``*_hint`` names the tool that pages a cut list.\n\n    The body is **ifdef-filtered**, the same as in ``get_source``: a line of\n    an inactive ``#if`` branch comes back blank and the line numbers do not\n    move.  ``source_origin`` says whether the text is the filtered copy\n    (``\"index\"``) or the file itself (``\"disk\"``, every branch present).\n\n    Read-only. No side effects.\n\n    Args:\n        name: Symbol name. Returns body, signature, the direct callers\n            and callees (each list with its total).\n        project_root: Project root. Auto-detected if omitted.\n        project: Project name or project_id — call list_projects to get them.\n            Use it to ask about a project that is not the project of the\n            current directory. It is an alternative to project_root, which\n            takes a root path. Give one of the two, not both.\n        variant: Variant of the build (a board, or a PlatformIO\n            environment). On a project of more than one build, give the\n            arguments of one build as the refusal lists them: the\n            variant, the image, or the two. fw-context does not select a\n            build. One query answers for ONE build.\n        image: Image of the build: a separate program, such as the\n            application or the bootloader. Give it when the build has an\n            image name.\n\n    Returns:\n        dict with: name, qualified_name, kind, file, line, signature,\n        docstring (raw Doxygen comment text), is_definition, callers (list,\n        max 50 — ``call``, ``indirect`` and ``implicit_construct``\n        references, each with its line, its column, its ``origins`` and\n        ``entry`` as in ``find_callers``),\n        callees (list, max 100 — one row for each callee and kind of\n        reference), source (body text),\n        indirect_call_sites (list, max 200, the rows of\n        ``find_indirect_call_sites`` — for a field/variable symbol, the\n        calls through the function pointer; for a function, method or\n        lambda, the indirect calls that it makes).  For a field or a\n        variable also ``indirect_targets`` (list, max 50, the rows of\n        ``find_indirect_targets``: each function it can hold, and where the\n        code stored it), and ``slot_escapes`` (True) when code out of view\n        can write it: a call through it then also reaches each function of\n        its type.\n        ``callers_total``, ``callees_total``, ``indirect_call_sites_total``\n        and ``indirect_targets_total`` count each whole list.  When a list\n        is cut, ``callers_hint``, ``callees_hint``,\n        ``indirect_call_sites_hint`` or ``indirect_targets_hint`` names the\n        tool that pages it.\n        For an enum also returns constants (at most 200), constants_total and,\n        when the list is cut, constants_hint; for an enum constant, enum_value.\n        For macros returns ``kind=\"macro\"``, ``signature`` (``#define NAME``\n        or ``#define NAME(a, b)``), ``is_function_like``, ``value`` (the\n        replacement text ALONE) and ``expanded_value``"],["+"," or"],["=","\n        "],["-","(preprocessor-resolved)."],["+","``expanded_values`` (the value in the build, see ``lookup_symbol``)."],["=","\n        When LLM analysis has been generated (``fw-context index --analyze``),\n        includes ``llm_analysis``: {summary, inputs, outputs, model, analyzed_at}\n        with a structured description of the symbol's purpose, parameters, and\n        return values/side effects.\n\n        When the file changed after the last index run, the dict adds\n        ``stale`` (True) and ``stale_warning`` (str), and ``source_origin``\n        tells where the body comes from: ``\"disk\"`` when the symbol did not\n        move, ``\"index\"`` when it did.  The callers and callees come from the\n        index in all cases, thus a stale dict can hold an incomplete list.\n        ``_source_truncated`` (True) marks a body that a cap cut, as in\n        ``get_source``.\n\n        The dict also carries the libclang flags of the symbol:\n        is_virtual, is_pure_virtual, is_template, parent_usr, and\n        template_usr.  For a virtual method it adds ``overrides`` (the base\n        methods that this method overrides) and ``overridden_by`` (the\n        derived methods that override it) — use these two before you change\n        a virtual method.\n\n        An ``ambiguous_warning`` key means that *name* matched more than one\n        symbol, such as two classes with a method of the same name.  Every\n        part of this answer — body, callers and callees — is about the ONE\n        symbol that the key names.  ``candidates`` (max 20) lists the others\n        and ``candidates_total`` counts them.  Give a ``qualified_name`` from\n        it to ask about one symbol only.\n\n        A symbol in a file outside the project root, such as an SDK header,\n        is returned and not refused.\n\n        On failure the dict holds only ``error`` with the reason.\n    "]]}},{"tool":"lookup_symbol","fields":{"description":[["=","Look up a C/C++ symbol by name via libclang index — exact or prefix\n    matching. Finds symbols text-based search can miss: build-conditional\n    code, template instantiations, macro-expanded names. Macros are\n    extracted via ``clang -dM -E`` during indexing so ``#ifdef``-conditional\n    macros resolve correctly for the build of the query. Prefer this over\n    search_code when you know the exact symbol name or a prefix\n    (``uart_`` finds all UART symbols). Use search_code for\n    keyword/concept search.\n\n    *name* matches the name or the qualified name.  A name with ``::``\n    that matches nothing is tried once more by its last part, kept where\n    the qualified name ends with *name*: ``Foo::bar`` finds\n    ``ns::Foo::bar``.  Macros are searched only when no symbol matches.\n\n    Read-only: yes. May auto-reindex stale files (non-blocking).\n\n    Args:\n        name: Symbol name (exact match) or prefix (set exact=False).\n            E.g. 'uart_init' finds the exact function; 'uart_' finds\n            all symbols starting with 'uart_'.\n        project_root: Project directory. Auto-detected if omitted.\n        project: Project name or project_id — call list_projects to get them.\n            Use it to ask about a project that is not the project of the\n            current directory. It is an alternative to project_root, which\n            takes a root path. Give one of the two, not both.\n        exact: True = exact name match, False = prefix LIKE match (default).\n        limit: Maximum results of one page (default 50, max 100).\n        offset: Skip this many results (default 0).  A common method name\n            lives in many classes — ``read`` and ``write`` match dozens of\n            symbols — and this walks past the ones already seen.  The page\n            notice names the offset to use.  The order is stable (a\n            definition first, then the line, then the file and the USR),\n            thus two pages never overlap and never skip a symbol.\n        variant: Variant of the build (a board, or a PlatformIO\n            environment). On a project of more than one build, give the\n            arguments of one build as the refusal lists them: the\n            variant, the image, or the two. fw-context does not select a\n            build. One query answers for ONE build.\n        image: Image of the build: a separate program, such as the\n            application or the bootloader. Give it when the build has an\n            image name.\n\n    Returns:\n        list[dict]: The page notice leads the answer — ``total``, ``offset``,\n        ``shown``, ``more`` — where ``total`` counts every symbol the name\n        matches.  Read it before you conclude that a page holds them all.\n        Each symbol that follows has name, qualified_name, kind, file,\n        line, signature, docstring, is_definition, is_template, is_virtual,\n        is_pure_virtual fields, and ``class`` — the class, struct or union\n        that declares the symbol, absent for a free function.  ``class`` is\n        what tells two same-name methods apart at a glance.\n        Enum constants include ``enum_value``\n        with the integer value. Macro results include ``kind=\"macro\"``,\n        ``signature`` (how the macro is invoked: ``#define NAME``,\n        ``#define NAME()`` or ``#define NAME(a, b)``), ``is_function_like``,\n        ``value`` (the replacement text ALONE — the parameter list is not\n        part of "],["-","it),"],["+","it).  The"],["="," "],["-","and"],["+","value"],["="," "],["+","of the macro in the build: the definition\n        of the name at the end of each C or C++ unit that reads the file\n        of the ``#define`` (``clang -dM -E``; the macros in it are not\n        expanded).\n        "],["=","``expanded_value`` "],["-","(preprocessor-resolved"],["+","when"],["="," "],["-","value)."],["+","all of those units agree, else\n        ``expanded_values``: a list of ``{state, units}`` items, ``state``\n        ``\"defined\"`` (with ``value``, ``params``, ``is_function_like``),\n        ``\"undefined\"`` or ``\"no_answer\"``.  Neither: the index has no\n        value (``reindex_file`` stored the file after the last index run)."],["=","\n        May also include ``template_usr``,\n        ``parent_usr``, and ``llm_analysis`` (``{summary, inputs,\n        outputs}``) when available.  A model wrote the text in\n        ``llm_analysis``, and the code did not — use it to find a symbol,\n        and quote ``signature``, ``docstring``, or ``get_source`` instead.\n        When nothing matches, a trailing dict may hold ``_did_you_mean``\n        with suggested names.  The symbols of the first suggestion that\n        matches exactly then come back, each with ``_fallback: True`` — its\n        name is NOT *name*.  With no match and no suggestion, the list is\n        empty and has no page notice, because there is no page.  An\n        ``info`` entry comes back for one case only: an offset past the\n        end of an answer that does hold rows.  When a file that the answer\n        names changed on disk, a dict with ``warning`` comes first.\n\n        **Note:** C++ constructors share their name with the enclosing\n        class, so ``lookup_symbol(\"Foo\")`` may return both ``class Foo``\n        and ``constructor Foo::Foo()``.  Use the ``kind`` field to\n        filter when you need a specific symbol type.\n\n        A list with one dict that holds an ``error`` key means that the\n        project has no index, that the variant or image is wrong, or that\n        the lookup failed.  Read that key\n        before you read the result fields.\n    "]]}},{"tool":"search_code","fields":{"description":[["=","Find C/C++ symbols by name — searches function/class/enum NAMES.\n\n    Searches symbol names, qualified names, signatures, docstrings, and\n    pre-computed name tokens (CamelCase/snake_case split).  Does NOT search\n    function bodies — for patterns in code like ``.attach(``,\n    interrupt handler registrations, callback attachments use ``search_bodies`` instead.\n\n    Use when you know the concept but not the exact name\n    (``\"interrupt handler\"``, ``\"modem init\"``).  Prefer ``lookup_symbol``\n    when you already know the exact or prefix name.\n\n    Results hold the metadata of each symbol — name, location, signature,\n    docstring — not its implementation code.\n\n    **FTS5 syntax:**\n    - Every bare term gets a trailing ``*`` and the terms are OR-joined:\n      ``modem init`` goes to FTS5 as ``modem* OR init*`` and answers with\n      the symbols that hold EITHER word.  ``search_bodies`` does the\n      opposite — it takes the query literally, where a space is an AND.\n      A query that holds a double quote, ``AND``, ``OR``, ``NEAR`` or a\n      column filter goes to FTS5 as written.\n    - ``init*`` matches init, init_uart, initialize (trailing wildcard)\n    - ``\"spi init\"`` matches the exact phrase \"spi init\"\n    - Do NOT use an underscore in a query.  The tokenizer splits\n      ``modem_init`` into two tokens and looks for them NEXT TO EACH\n      OTHER.  That is a phrase and not an AND, thus the query misses\n      ``modem_parser_oob_init``.  Measured on one firmware index,\n      ``serial_write`` gave 1 result and ``serial write`` gave 200.\n      Write ``modem init`` instead.\n    - Punctuation is not searchable.  The tokenizer drops it, thus\n      ``.attach(`` becomes a phrase that looks for the token ``attach``.\n      The query is repaired, never rejected.\n\n    **Progressive relaxation:** when a step matches nothing, the next one\n    runs.  Six steps can run.  Step 1 is the primary path and its results\n    carry NO ``_fallback`` key; each step after it names itself there:\n\n    1. FTS5 with the ``kind`` filter.  No ``_fallback`` key.\n    2. FTS5 without the kind, when the kind matched nothing; operators\n       often guess the wrong kind — ``_fallback=\"fts5\"``.\n    3. ``name_tokens`` substring match over the pre-computed CamelCase /\n       snake_case tokens (``BuildType`` is indexed as ``\"build type\"``).\n       Needs N−1 of N query terms — ``\"name_tokens_like\"``.\n    4. LIKE over the docstring column, for a single-term query that the\n       token steps missed — ``\"docstring_like\"``.\n    5. FTS5 per query word, results merged — ``\"individual_terms\"``.\n    6. ``macros_fts`` for ``#define`` names and values, kind=\"macro\" —\n       ``\"macros_fts\"``.\n\n    Steps 3-6 ignore ``kind``.\n\n    **Kind filter values:** ``function``, ``method``, ``constructor``,\n    ``destructor``, ``class``, ``struct``, ``union``, ``enum``, ``enum_constant``,\n    ``typedef``, ``varglobal``, ``varlocal``, ``variable``, ``field``,\n    ``namespace``, ``label`` (a local label of assembly, inside the code of\n    a function; ``parent_usr`` is empty when no single function holds it),\n    ``lambda`` (a C++ lambda, named ``<lambda>`` after the code that holds\n    it; the calls in its body are its calls).\n\n    **Local variables are out.**  FTS5 indexes the qualified name, thus a\n    local matches through the function that holds it: a query for\n    ``sensor`` used to answer with ``V``, ``ret`` and ``tmp_value`` from\n    inside ``read_sensor_value``, 4 of 20 results on one measured query.\n    A local is never the answer to \"which symbol is about X\", thus\n    ``varlocal`` and the legacy ``variable`` kind are excluded.\n    ``varglobal`` stays — a global carries architectural weight.  Ask for\n    them explicitly with ``kind=\"varlocal\"``, or use ``find_variables``.\n\n    After ``fw-context index --analyze``, a result also holds\n    ``llm_analysis`` — ``{summary, inputs, outputs}``.  A model wrote that\n    text, and the code did not.  Treat it as a hint that points you at a\n    symbol, never as a fact to quote.  Quote ``source`` from\n    ``get_source``, ``signature``, or ``docstring``.\n\n    Read-only: yes. May auto-reindex stale files (non-blocking). When a\n    file that the answer names changed on disk, this tool starts the\n    watcher daemon in the background and answers from the index it has.\n\n    Args:\n        query: FTS5 search terms. Keep queries short — 1–3 words.\n        project_root: Project root directory. Auto-detected from CWD if omitted.\n        project: Project name or project_id — call list_projects to get them.\n            Use it to ask about a project that is not the project of the\n            current directory. It is an alternative to project_root, which\n            takes a root path. Give one of the two, not both.\n        kind: Optional filter to return only symbols of this kind.\n        limit: Maximum results of one page (default 20, max 100).\n        offset: Skip this many results. Reads the next page of a topic\n            that many symbols carry; the page notice names the offset to\n            use.  One relaxation step owns the whole answer, thus a walk\n            never changes the step under the reader.\n        project_only: When True, exclude vendor SDK directories and return only\n            application code. Default False.\n        variant: Variant of the build (a board, or a PlatformIO\n            environment). On a project of more than one build, give the\n            arguments of one build as the refusal lists them: the\n            variant, the image, or the two. fw-context does not select a\n            build. One query answers for ONE build.\n        image: Image of the build: a separate program, such as the\n            application or the bootloader. Give it when the build has an\n            image name.\n\n    Returns:\n        list of dicts.  The page notice leads the answer — ``total``,\n        ``offset``, ``shown``, ``more`` — where ``total`` counts the\n        answer of the step that answered.  Each symbol that follows has\n        name, qualified_name, kind, file, line, is_definition, signature,\n        docstring, is_template, is_virtual, is_pure_virtual. Enum\n        constants include ``enum_value`` with the integer value. May also\n        include ``template_usr``, ``parent_usr``, and ``llm_analysis``\n        (``{summary, inputs, outputs}`` — written by a model, not by the\n        code.  ``get_build_info().analysis.model`` names it). Fallback\n        results include ``_fallback`` with the method name.  A macro\n        result also holds "],["-","``_macro_value``"],["+","``_macro_value``,"],["="," and ``_macro_expanded_value``\n        "],["+","or ``_macro_expanded_values`` (see ``lookup_symbol``) "],["=","when "],["-","they"],["+","the\n        index"],["="," "],["-","are"],["+","has"],["="," "],["-","not empty."],["+","them."],["=","\n\n        No match gives ``[]``.  A dict with ``error`` means the query\n        failed.  When FTS5 refuses the query and no LIKE step finds a row,\n        the answer is one dict with ``warning`` + ``hint``.  When a file\n        that the answer names changed on disk, a dict with ``warning``\n        comes BEFORE the page notice — find the notice by its keys, and\n        not by its position.  An empty answer gets that ``warning`` too\n        when indexed files changed: the code can be in them.\n    "]]}}],"detail":"full","newAddresses":[],"newAddressesTotal":0},"label_id":"urn:uuid:e98175db-02e1-4baa-82a7-375ba7c05184","run_id":391271,"from_package_version":"0.36.0","to_package_version":"0.37.0","from_server_version":"1.30.0","to_server_version":"1.30.0","from_registry_version":"0.36.0","to_registry_version":"0.36.0","name":"io.github.turbyho/fw-context-mcp","endpoint":"pypi:fw-context-mcp","title":null}