Repository navigation
fix(dsql): pin awslabs/mcp doc links to a commit permalink - #300
Open
avneetbansal-aws wants to merge 1 commit into
Open
avneetbansal-aws wants to merge 1 commit into
avneetbansal-aws wants to merge 1 commit into
Conversation
Replace the three mutable awslabs/mcp blob/main links in the DSQL MCP tool docs with permalinks to awslabs/mcp@dbf8c31. That is the last server.py revision before the params_list/injection-filter rewrite, and the one the existing L141, L267-272 and L295-318 anchors and the surrounding text describe: readonly_query(sql, ctx) and transact(sql_list, ctx) with no parameter binding, and the read_only validation block at L295-318. Pinning to current main would have kept the anchors but pointed them at different code, since those ranges have drifted. Fixes awslabs#217 Verified in the worktree: - python -m pre_commit run check-vcs-permalinks --all-files: Passed - Fetched server.py at the pinned sha via the GitHub contents API and read lines 141-142, 267-272 and 295-318 to confirm they match the doc text. - The hook did not flag references/language.md, so its aws-samples links are unchanged. Signed-off-by: avneetbansal-aws <284363899+avneetbansal-aws@users.noreply.github.com>
avneetbansal-aws
requested review from
a team,
arnewouters,
krokoko and
laithalsaadoon
November 6, 2026 16:42
avneetbansal-aws
requested review from
Benjscho,
anwesham-lab,
gxjx-x,
jaichabria,
pkale,
praba2210 and
spencercorwin
November 6, 2026 16:42
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.

This change replaces the three mutable awslabs/mcp blob/main links in the DSQL MCP tool docs with a permalink pinned to awslabs/mcp commit dbf8c317815911259b43e13cc79c9e83e0105fc1. The links are in mcp/tools/database-tools.md (line 125) and mcp/tools/input-validation.md (lines 56 and 61). The #L anchors are unchanged: L295-L318 for the write-mode note, and L141 for the readonly_query signature. Fixes #217.
The issue suggests pinning to a commit, and a plain swap to the current main sha would have passed the hook. The links would then have pointed at the wrong code, though. The anchors were written against an older server.py, and on current main those line ranges now land on a docstring and unrelated signatures, because readonly_query and transact have since moved and gained params_list. The pinned commit is the last revision before that rewrite. At dbf8c31, lines 141-142 are the readonly_query(sql, ctx) signature, lines 267-272 are the transact(sql_list, ctx) signature with no parameter binding, and lines 295-318 are the read_only validation block that write mode skips. That matches what both docs say about SQL-only inputs and about write mode disabling the server-side filters.
The tradeoff is that the docs now describe a historical version of the server rather than its current behaviour. If you prefer a link that tracks main, the alternative from the issue is to exclude these two files from check-vcs-permalinks. That would be a small follow-up if you want it. The prose in the docs was not changed, so reviewers may also want to check whether the newer params_list support should be documented separately.
Running python -m pre_commit run check-vcs-permalinks --all-files in the branch passes. The server.py contents at the pinned sha were read through the GitHub API to confirm the three line ranges. The hook did not flag the aws-samples links in references/language.md, so that file is untouched.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.