You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add opt-in toolSearch configuration that exposes search and generic invocation tools in place of direct component tool calls.
Index the effective tool catalog with Bleve for ranked, paginated search; return tool schemas and references for invocation.
Route invocation through the current catalog, reject unavailable or changed tool references, and refresh search catalogs after tool-change notifications.
Add coverage for search, invocation, refresh behavior, and indexing performance.
Add Bleve-backed discovery, generic tool invocation, and off/search/hybrid modes. Keep calls bound to current catalog grants and cover behavior with unit and Everything integration tests.
Move Bleve search and synthetic tool definitions into toolsearch, rename the public tools with the mmmcp prefix, and let searches wait for background indexing with retryable timeouts. Add concurrency tests and document the exported interface.
Compile a client-visible tool list and call lookup for off, search, and hybrid
modes. Keep the allowed component routes in the same snapshot for reference
invocation, while the catalog enforces which names clients may call.
Resolve search and generic calls in the catalog and let the handler use the
existing downstream invocation path for resolved component routes. This removes
mode-specific dispatch and the extra executeTool wrapper from the handler.
Build search documents from effective tool definitions, indexing configured
names and descriptions while excluding disabled tools. Include the visible
view and mode in catalog cursor identity, remove unreleased compatibility
aliases, and cover routing, overrides, and cursor isolation in tests.
Enforce schema term cap while appending property names
toolsearch/search.go:329
The intended 256-term bound is bypassed by a flat schema: this loop appends every property name without rechecking len(parts), so an untrusted component can make indexing consume memory and CPU proportional to an arbitrarily large property map. Stop the loop once the cap is reached.
Expose CATALOG_UNAVAILABLE through the HTTP frontend
README.md:99
This documented error is not observable through the HTTP frontend. selectFrontendImplementation calls Registry.Get before dispatching every POST and converts this error to HTTP 500 with the body frontend identity unavailable (http.go:62-70), so HTTP clients never receive CATALOG_UNAVAILABLE. Either preserve this stable reason through that pre-dispatch path or document the actual transport-specific behavior.
Reject non-object arguments instead of forwarding invalid JSON
toolsearch/search.go:107
An explicitly supplied arguments: null (or an array/string) has a nonzero RawMessage length and is forwarded downstream, despite this synthetic tool declaring arguments as an object. Validate the provided JSON shape here; only a truly omitted field should default to {}.
Distinguish explicit zero limit from an omitted limit
toolsearch/search.go:508
The published schema and README require a positive limit, but an explicit limit: 0 is silently treated as if the field were omitted. Decode limit as an optional value so only absence selects the default and zero returns INVALID_ARGUMENTS; update the zero-limit test accordingly.
Correct the error message for optional arguments
catalog/tool_calls.go:47
This error says arguments is required even though the advertised schema makes it optional and ParseCallArguments defaults omission to {}. Report that tool and revision are required and that arguments must be an object when provided, so clients can correct the actual invalid field.
Generic invocation scans and re-marshals the full tool catalog
catalog/search.go:56
Every generic invocation linearly scans the full tool catalog and then re-marshals the matched definition to recompute its revision. This makes the hot call path scale with catalog size and schema size—the same feature is benchmarked with up to 5,000 tools. Store routes and precomputed revisions by exposed reference when the immutable catalog is built so invocation is an O(1) lookup.
Term cap bypassed while appending wide schema properties
toolsearch/search.go:344
The intended term cap is checked only when entering walk; this loop continues appending every property name after nested calls start returning. A tool with a very wide schema can therefore create an arbitrarily large terms string and index workload despite the 256-term guard.
Reject explicit zero limit instead of defaulting to five
toolsearch/search.go:554
An explicit "limit": 0 is treated as if the field were omitted, even though this tool's schema declares minimum: 1 and the README requires a positive limit. This silently converts invalid client input into a five-result request (and the added test currently codifies that mismatch). Represent the field as a pointer so omission can default to 5 while an explicit zero is rejected.
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
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
toolSearchconfiguration that exposes search and generic invocation tools in place of direct component tool calls.Addresses obot-platform/obot#8065 for the mmmcp search and invocation layer.