Repository navigation
feat(tools): Return a params summary instead of full schemas from searchTools - #3496
Conversation
…rchTools Co-Authored-By: Aditya Mathur <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
27 screenshot changes — 27 changed · 0 added · 0 removed Review screenshots in Frameshift Show 12 more changed screenshots9 more changed screenshots in Frameshift. |
There was a problem hiding this comment.
I checked the claims I could check. Every deferred tool in the GitHub, memory, Vercel, and core catalogs ranks first for its own exact name and returns input_schema (39 tools). summarizeInputSchema renders none of them as unknown. The search-result shape has no other consumers to update: tool-search-harness reads only tool_name, and searchMcpTools has its own shape. Dropping annotations is safe, because the action-review gate reads them from the tool definition (guardian/gate.ts:198, :373) and no prompt mentions them.
Two things before this lands:
paramsdrops every paramdescribe(), andpolicies/tool-design.mdputs behavior there: null-as-command, rules that tie fields together, and value formats. For example,searchTools({query: "pause automation"})returnsupdateAutomationasparamsonly:instruction?: string | null, skill?: string | null, context?: string | null, …. Every othernullmeans "keep", but anullcontextremoves it (automations/tools/update.ts:318-321,:375). That call passes validation, so Zod errors cannot repair it. The Code Mode hint (codemode/tool.ts:158) now says to call a result "with the arguments that its input_schema or params lists", which tells the model it can call aparams-only tool directly. Makeparamsa preview for picking a tool: in thesearchToolsdescription (search-tools.ts:633) and the Code Mode hint, say to search the exact name forinput_schemabefore you call a tool that came back withparamsonly.- This changes what the model reads to build
executeTooland script calls, but no agent-facing eval ran. Behavioral evals were skipped because their path filter does not includesearch-tools.tsorcodemode/, and thetool-searcheval checks only ranking. Add thetrigger-evals-behaviorallabel before you merge.coding/subscriptions.eval.tsalready checks a deferredexecuteToolcall togithub_updatePullRequest.
Co-Authored-By: Aditya Mathur <[email protected]>
|
Addressed the review in 2e578eb. The |
Follow-up to #3496. The `params` preview showed "No arguments." for tools whose input is a root union, like `slackListUpdateItem`, and showed params with defaults as required. This fixes both, rewrites the searchTools description so it matches how discovery works now, and shares the preview hint with the Code Mode hint. It also updates the deferred tool discovery spec to describe the `params` preview, fixes two stale comments left from #3494, and makes automation card details use the shared Slack external ref id schema. <!-- junior-request-attribution:start --> via @MathurAditya724. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Afb8931822e52792d37f63497ad7ad63d --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3Afb8931822e52792d37f63497ad7ad63d) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Afb8931822e52792d37f63497ad7ad63d/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Aditya Mathur <[email protected]>
We are dropping OpenSpec. Committed plans go stale: half of the plans in `openspec/changes/` describe work that is already done (see #3517), and agents read stale plans as current intent. Code, tests, and `policies/` already own the contract, so planned work goes in GitHub issues. Docs and agent tooling only. No runtime code changes. - Delete `openspec/`, which holds `config.yaml`, its README, and all four plans under `changes/`. - Delete the `/opsx:propose` and `/opsx:apply` commands in `.claude/commands/` and `.cursor/commands/`. - Remove the `openspec/changes/` references from `AGENTS.md`, `CONTRIBUTING.md`, and `policies/README.md`. `AGENTS.md` now says: do not commit implementation plans, and track planned work in GitHub issues. The two plans that are still active are deleted too. Git history keeps them: - `actor-identity-end-state`: its rollout rules point at #2439, which can hold whatever is still needed. - `deferred-tool-discovery`: no task boxes are checked, but `searchTools` already has the `source` filter and params summaries (#3496). This overlaps with #3517, which deletes two of these plans and edits `CONTRIBUTING.md`. Whichever PR merges second needs a small rebase. `CHANGELOG.md` still mentions OpenSpec. That is release history, so it stays. <!-- junior-request-attribution:start --> via @dcramer. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AC0CHB3YHES2%3A1794853763.133949 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AC0CHB3YHES2%3A1794853763.133949) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0CHB3YHES2%3A1794853763.133949/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: David Cramer <[email protected]>
Refs #2893 (recommendation 4 only).
searchToolsreturned the fullinput_schemaandannotationsfor every result, so each search paid for the schemas of tools the model never called.input_schema.params: a TypeScript-like summary fromsummarizeInputSchema, such asrepo: string, number: integer, content: "+1" | "-1" | ....?marks an optional param. Enum values and nested object shapes stay; param descriptions and constraints do not.annotationsis gone.call_notesis omitted when empty.searchToolsdescription says to search a tool's exact name to get its full schema. In the GitHub, memory, and tracker catalogs, every deferred tool ranks first for its own name.Result size on the GitHub plugin catalog (~4 chars per token):
github, 5 resultsgithub, all 15get issue details, 3 resultscreate a new GitHub issue, 1 resultRanking does not change, so the
tool-searchclassifier eval is not affected. It was not run here (no model credentials).Open question: the issue also suggests returning the full schema when
executeToolvalidation fails. This PR does not do that. Zod tool errors already name up to 5 bad fields with their expected values, and an exact-name search returns the schema. If agents still guess arguments wrong for non-top results, attach the schema to theexecuteToolinput error inpi-tool-adapter.ts.via @MathurAditya724.
--
View Session [Sentry]