-
Notifications
You must be signed in to change notification settings - Fork 248
feat: lazy graphql schema #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| ${contentApiClient.schema} | ||
| `, | ||
| return source` | ||
| Search the Supabase documentation using GraphQL. Must be a valid GraphQL query. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related with this PR but I've noticed that this tool is only called when I start my prompts with "How can I... or How do I..." (at least for me). Sometimes, if it bumps into any problem while calling other tool, the LLM will search for the docs online instead of calling this tool.
If anyone else is experiencing this, my suggestion is:
- We write explicitly in the tool description "If you face any issue while calling other Supabase tool, use the search_docs tool to get the most up-to-date documentation to help you debug"
- We put this disclaimer on every tool description
I prefer the first one because we only have to maintain this instruction once.
PS: I would only change this behavior once we have evals in place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I have not much to add to this PR besides the comment about the docs tool description, which we should address (or at least discuss) on a different PR.
Ship it 🚀
|
Added a link to your comment on our ticket for eval test cases, will revisit the invocation behavior as part of that 👍 |
* feat: support lazy tool definitions, disable client schema validation by default * feat: lazy tool descriptions * chore: cleanup logs * docs: restore comment * feat: revert lazy tool definitions, just use lazy description * chore: cleanup * chore: unused imports * test: schema is only loaded when listing tools


Updates server to only fetch the GraphQL schema for
search_docsdescription once per session, even for stateless transports.Changes
validateSchemanow defaults tofalse, disabling local schema validation in favor of server-side validation with comparable error reporting verified in feat: lazy graphql schema #166 (comment)descriptionchanged fromstringtoProp<string>allowing sync/async callbacks to lazily construct descriptions as-needed during"tools/list"requests"schema is only loaded when listing tools"checks that the (mocked) schema loading only occurs when listing tools and not on tool callsResolves AI-179