fix(den): preserve admin capability arguments - #3102
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
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.
Summary
Fixes admin MCP capability argument plumbing so
execute_capabilitycan call tools likeadmin:den_querywith real input.Reproduced error before the fix when executing
admin:den_querywith body{"sql":"SELECT @@sql_mode"}(and equivalently with the new regression's JSON-string body):Root cause / fix
ee/apps/den-api/src/mcp/admin-capabilities.ts:98-104now uses the existingnormalizeToolRecord(body) ?? {}helper from./invoke.js; the removed localnormalizeArgumentshelper previously returned{}for JSON-encoded string bodies, silently dropping every admin argument.ee/apps/den-api/src/mcp/admin-capabilities.ts:40-63now emitsargumentsSchema: tool.inputSchemaandinvocation: { argumentsField: "body" }for admin tools with input, matching the external-MCP convention.ee/apps/den-api/src/mcp/search.ts:36-39types those shared match fields.No changes were made to
admin:den_querybehavior, SQL allowlisting, permission gating, oradmin-tools.ts.Regression proof
Before fix (tests added, production code still unfixed):
After fix:
Affected tests:
Typecheck:
Other commands run:
No video/fraimz is included because this is an MCP argument-plumbing fix with no UI surface. The real end-to-end proof after deploy is
admin:den_queryaccepting{"sql": "..."}throughexecute_capability.