Skip to content

Meta questions about capabilities get routed to tools (e.g. read-file) #207

Description

@pluginslab

Repro

Ask the assistant in chat:

do you have an ability that adds context to the page where you are calling this chat from?

Actual

The ReAct loop picks `wp-agentic-admin/read-file`, fails to extract a path, and the UI renders the error.

A: Could not read file: <something>

(A separate fix in 3cc2993 stops it rendering literal `undefined` — but the tool still shouldn't be called.)

Expected

Meta questions about the assistant's own capabilities ("do you have", "can you", "what abilities…", "how does this work") should be answered conversationally without invoking any ability.

Root cause (two contributing factors)

  1. Over-aggressive tool description. `src/extensions/abilities/read-file.js:155` says "Always use this tool for file reading requests" — that primes the LLM to grab it on weak signal.
  2. Broad keyword set. Same file, lines 157–172: `show`, `view`, `open`, `display`, `contents`, `source` — generic verbs that overlap with non-file intents.

Suggested fixes (pick one, ideally both)

  • Soften the read-file description — drop "Always use this tool", scope to "when the user names or quotes a file path".
  • Trim read-file keywords — keep `file`, `wp-config`, `htaccess`, `functions.php`, drop the bare verbs.
  • Optional: add a router-level intent check for meta questions ("do you have", "can you", "what (abilities|tools|can you)") that short-circuits to the conversational path.

Notes

Activity

  1. pluginslab commented on May 15, 2026

    @pluginslab
    OwnerAuthor

    Superseded by #209 — bundled with the docSearch / RAG precision issue and a post-hoc validation proposal.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions