Uh oh!
There was an error while loading. Please reload this page.
query_sql: bake the three query rules into the sql param description - #346
Closed
bgmcmullen wants to merge 1 commit into
Closed
query_sql: bake the three query rules into the sql param description#346bgmcmullen wants to merge 1 commit into
bgmcmullen wants to merge 1 commit into
Conversation
The MCP path never loads the hypaware-query skill file, so the rules (date-filter ai_gateway_messages, dialect and column gotchas, dedupe sums by part_id) ride the inputSchema the model reads at call time. verb.summary stays one line for the CLI listing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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 freeto 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.
What
Extends the
query_sqlverb'ssqlparameter description with the three query rules an MCP caller needs at call time: date-filterai_gateway_messages(with the slice-size guidance), the dialect and column-name gotchas (SELECT-only,||concat,conversation_source/client_name, TIMESTAMP-vs-string comparison, where token usage lives), and the dedup-by-part_idrecipe for sums.The parameter description travels to the model through the MCP
inputSchema(toJsonSchemapasses property descriptions through) without touchingverb.summary, which doubles as the one-line CLI summary in help listings under the LLP 0034 one-declaration projection. The neighboringinclude-local-onlyproperty already carries a long model-facing description as precedent.Why
From the Team AI Usage Review 2026-07-16 (prod fleet, 2026-06-16 → 2026-07-16), proposed change 6 (re-proposed from 07-15):
query_sqlfailed 27% of its calls this window (47 of 173 on one machine). Sampled causes are exactly these three rule classes — timeouts from unfiltered scans, repeated dialect and column-name mistakes, and undeduped sums. The rules exist in the hypaware-query skill file, but the MCP tool path never loads skill files, so the tool has to teach its own dialect.Rule 3 is the guard rail until the server-side ingest dedup lands (hyparam/hypaware-server#133 / #134); it stays true afterward as a safe default ("the table can re-log rows").
Notes
src/core/mcp/server.jsreadsverb.summary+inputSchema), so this repo is where the text lives; the server serves the same projected tool.test/core/mcp-server.test.js+test/core/verb-codec.test.js: 23/23 pass; fullnpm testfailure set is unchanged from master in this environment.🤖 Generated with Claude Code