Repository navigation
fix(agent-plugins): scope tool discovery to requested servers - #14
Closed
tylerbishopdev wants to merge 1 commit into
Closed
tylerbishopdev wants to merge 1 commit into
tylerbishopdev wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scope Agent Plugins tool discovery before connecting to MCP servers, so an unrelated slow or failing server cannot delay a targeted tool lookup or call.
Currently, the bridge applies
serverIdaftergateway.listTools()walks every enabled/approved server sequentially. Describe and call also perform that global walk, including retries of unrelated failed servers once their backoff expires.Changes
serverIdthrough the static bridge and CLI before catalog loading.Catalog semantics
A
serverId-scoped result now returnsserverscounts for that scope only. Accurate cold counts for unrelated servers would require discovering them. Unscoped counts and ordering retain their existing behavior, including synthetic server-error entries.Static bridge tool names and input schemas, opaque-ID generation, query ranking/pagination, describe ordering/deduplication, metadata forwarding and the call result/error envelope are retained. OAuth and transport implementations are unchanged. This is scoped tool discovery; it does not introduce a background search service or change prompt/resource discovery.
Verification
@get-bb/plugin-sdk@0.5.29.bb plugin build packages/bb-plugin-agent-pluginspassed.pnpm check:compatpassed for all 16 plugins against stable BB0.49.0/ SDK0.6.132.git diff --checkpassed.Fixture coverage includes cold/warm targeted discovery with unrelated hanging/error servers, a healthy call during stalled broad discovery, bounded concurrency and stable ordering, per-server retry isolation, TTL/list-changed/reset invalidation, malformed/stale IDs, slug-prefix collisions, approval changes, same-server IDs across plugins, concurrent load coalescing and single-dispatch mutation failures. Bridge/CLI tests cover scoped wiring and the existing schema/result contract; local protocol/OAuth fixtures also pass.
Five files changed: gateway, bridge/CLI wiring, two test files and a README paragraph. No dependency, manifest, lockfile or generated-bundle changes.