Skip to content

Approved tools should become discoverable without another discovery pass #873

Closed

Description

@neylwalecki

Summary

After approving pending tools with approve_tool or approve_all_tools, the approval records are updated, but the approved tool snapshots are not immediately added back to the search index. In practice, an operator may need another discovery/reindex cycle before retrieve_tools and describe_tool can see the approved tools.

Why this matters

The approval action is the moment an operator says the current tool description/schema is trusted. After that succeeds, the current approved snapshot should be discoverable without requiring a separate upstream refresh.

Related existing work

I found related but distinct prior work:

Those cover upstream-driven or scheduled discovery. This issue is specifically about the local approval workflow and an explicit operator recovery path.

Expected behavior

When approve_tool or approve_all_tools approves a current snapshot:

  • The approved snapshot should be indexed immediately when the server is enabled and not server-quarantined.
  • Disabled tools and tools denied by static config should remain hidden.
  • Profile indexes and compact signature cache should stay consistent with the shared index.
  • Operators should also have an explicit per-upstream refresh/reindex operation for recovery when the discovery state is stale.

Notes

I have a patch with tests that:

  • indexes approved snapshots after ApproveTools
  • covers ApproveAllTools
  • keeps server-level quarantined tools withheld
  • adds upstream_servers operation=refresh|reindex for one upstream

Activity

  1. Dumbris commented on Jul 21, 2026

    @Dumbris
    Member

    Thanks @neylwalecki — nice catch, reproduced on latest main (0aa3de4) with a rug-pull test server (toolset v1 → v2): after approve_all_tools, the new tool was instantly callable (call_tool_read succeeded) but stayed invisible to retrieve_tools/describe_tool for a full 40s poll — only the 5-min discovery sweep would surface it. ApproveTools/ApproveAllTools just write the approval records; nothing re-runs the indexing seam.

    One security-critical detail for your patch: applyDifferentialToolUpdate itself never checks server-level quarantine (it relies on quarantined servers never being discovered), so a post-approval reindex must guard on server enabled + not quarantined — otherwise approving tools on a quarantined server leaks its tool descriptions into the index.

    PR welcome 🙏 We've got a fix branch with tests going as well — happy to reconcile.

  2. neylwalecki commented on Jul 21, 2026

    @neylwalecki
    ContributorAuthor

    Thanks @Dumbris — appreciate the quick confirmation and fix. We'll test from our side once this lands in a stable release.

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