MCP search_schemas tool - #313
Merged
Merged
Conversation
alexbainter
force-pushed
the
alex-293-search-schemas-tool
branch
from
July 27, 2026 16:48
178643d to
9c4c469
Compare
alexbainter
requested review from
aaronjae22 and
lisad
and removed request for
lisad
July 27, 2026 16:52
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.
Closes #293. Closes #292.
Replaces the half-baked
list_schemastool withsearch_schemas.search_schemasaccepts a few parameters:query: A string, which can be keywords (eg'photos') or an$idvalue from a JSON schema. Can be omitted (Noneor blank) to just return everything in scope.scope: Either'all'or'user', to control whether the results include everything accessible to the user (public + the user's own schemas) or just the user's, respectively. Defaults to'all'.page: A page number for paginated results. Defaults to1.Results are paginated (as per https://www.anthropic.com/engineering/writing-tools-for-agents) and limited to 10 results per page for now.
I got rid of
PublicSchemaManagerin favor of just adding apublic()filter onto the newSchemaQuerySet, which meant I needed to update a few references. Similarly I addedaccessible_to(user)to that queryset which is a helper for "this user's private schemas + all public schemas" since we require that access pattern in a couple places.