Skip to content

Personas cannot see or call interface tools — tool visibility gap blocks visual loop #525

Closed

Description

@joelteply

Bug

Personas cannot see or call interface/screenshot, interface/interact, or interface/navigate even after adding them to the always-include tool group. CodeReview AI reports its tool list as: get_current_time, get_room_info, get_user_info, send_message, get_conversation_history.

The full command system (336+ commands) is not exposed to personas as callable tools. They only see a small hardcoded subset.

Root Cause (suspected)

The tool definitions sent to the LLM provider are built from a different source than ToolGroupRegistry. The native tool protocol (for providers like DeepSeek, Fireworks) likely has a hardcoded tool list that does not include interface commands.

What Needs To Happen

  1. Find where the native tool spec list is built for each provider
  2. Ensure interface/screenshot, interface/interact, interface/navigate are included
  3. Verify personas can actually CALL these tools (not just see them in RAG text)
  4. Test with multiple providers (native tool protocol vs XML fallback)

Impact

This blocks the entire visual feedback loop (#342, #494, #496). Personas cannot design the UI if they cannot see or interact with it.

Dependencies

Activity

  1. joelteply commented on Mar 26, 2026

    @joelteply
    ContributorAuthor

    Key insight: commands should be dynamic anyway.

    The command system auto-discovers 336+ commands via filesystem scanning. Zero central registries. Adding a command is dropping a folder.

    The tool list sent to LLMs should work THE SAME WAY:

    • Built dynamically from registered commands at RAG build time
    • Filtered by ToolGroupRegistry relevance (intent matching)
    • alwaysInclude groups are always present
    • No hardcoded tool list anywhere

    Currently there appears to be a static/hardcoded tool spec (get_current_time, send_message, etc.) that does not reflect the real command registry. This violates the core architecture principle: no central registries, no hardcoded lists.

    Fix: the native tool protocol builder should query the command registry, not a constant array.

  2. joelteply commented on Mar 26, 2026

    @joelteply
    ContributorAuthor

    Update: The persona HALLUCINATED its tool list.

    get_current_time, get_room_info, etc. do not exist in our codebase. The persona made them up because it could not see the real tools. This means:

    1. Tools ARE being sent via RAG context (XML format in system prompt)
    2. But the LLM is not recognizing them as callable — treating as context text
    3. The LLM invents tool names it expects from general training data

    Root cause is likely: the tool definitions in the system prompt are not formatted in a way that triggers the LLMs tool-calling behavior. For native tool protocol providers (DeepSeek, Fireworks), tools need to be in the function/tool schema format, not just XML examples in the prompt.

    Need to check: are the tools being passed via the providers tool parameter (structured schema) or just as text in the system prompt?

  3. joelteply commented on Mar 26, 2026

    @joelteply
    ContributorAuthor

    The context challenge (from Joel):

    336 tools as function schemas would overwhelm any LLM context window. But hiding tools means personas dont know what they can do. RAG cant be noise, but must give access to everything they have permissions for.

    This is a PRESENTATION problem, not a filtering problem.

    The restaurant menu analogy:

    • Dont hand someone a 50-page catalog
    • Show them the right page based on what they said
    • But the full catalog exists and they can ask for anything

    Tiered tool presentation:

    1. Always visible (5-8 tools): chat/send, code/read, code/edit, interface/screenshot, interface/interact. These are your hands. Always in the function schema.

    2. Intent-surfaced (10-20 tools): ToolGroupRegistry matches message intent, adds relevant tools to the function schema for THIS request only. Coding message adds code/write, code/shell. Design message adds interface/navigate.

    3. Discoverable (all 336): A meta-tool like "discover-tools" or "help" that searches the full registry. Persona says "what tools do I have for training?" and gets a filtered list. Then it can call those tools by name even if they werent in the initial schema.

    Category presentation matters:

    • Group tools visually in the prompt (Code Tools, Chat Tools, UI Tools, System Tools)
    • Show examples for each category
    • Short descriptions, not full schemas, for the discovery tier
    • Full schema only for the active tier (5-20 tools)

    This keeps context small while making everything accessible. The persona always knows it CAN do more — it just needs to ask.

  4. joelteply commented on Mar 26, 2026

    @joelteply
    ContributorAuthor

    Recipes are the missing link.

    Recipes already define context focus: which tools, which RAG sources, which capabilities. A "coding" recipe knows code tools matter. A "design" recipe knows interface tools matter. A "help" recipe knows onboarding tools matter.

    The flow should be:

    1. Message arrives in a room
    2. Room has a recipe (or recipes)
    3. Recipe defines the tool tier for this context
    4. RAG builds the prompt with recipe-appropriate tools
    5. Intent matching refines within the recipe scope
    6. Persona sees exactly the right tools for THIS room + THIS message

    A persona in the Code room sees code tools + interface tools (for visual verification). The same persona in the Help room sees documentation tools + chat tools. Same persona, different recipes, different tool presentation.

    This connects to #362 (content routing via recipes) — recipes are not just UI layout. They are the context definition that drives everything: layout, tools, RAG sources, persona behavior.

  5. added a commit that references this issue on Mar 26, 2026
    6da9afd
  6. joelteply commented on Mar 26, 2026

    @joelteply
    ContributorAuthor

    Progress after PR #527 (native tool protocol for DeepSeek):

    Local Assistant now ATTEMPTS to call tools instead of writing code about them:

    <call_tool>
    <tool_name>screenshot</tool_name>
    <room>general</room>
    </call_tool>
    

    The behavior changed from "I dont have tools" to "let me call this tool." The tool name is wrong (screenshot vs interface/screenshot) and the format is close but not exact. The AgentToolExecutor tool name correction should handle this.

    Remaining work:

    • Verify tool name correction catches "screenshot" -> "interface/screenshot"
    • Verify the tool actually executes and returns results to the persona
    • Test with multiple providers (DeepSeek, Fireworks, etc.)
    • Ensure humans always retain navigation control over personas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions