fix: Replace Record<string, unknown> with empty object schema for no-arg tools (#33)#50
Open
vanmarkic wants to merge 3 commits intojacksteamdev:mainfrom
Conversation
…arg tools (jacksteamdev#33) MCP clients with strict schema validation were rejecting tools that used `arguments: "Record<string, unknown>"` for tools that don't take arguments. The MCP specification expects concrete schemas, and generic Record types can cause validation failures in some clients. This fix updates: - get_server_info: Changed from "Record<string, unknown>" to {} - delete_active_file: Changed from "Record<string, unknown>" to {} This ensures compatibility with stricter MCP clients like Gemini CLI and Q CLI that enforce proper JSON schema validation. Fixes jacksteamdev#33
…dev#33) - Test empty object schema {} accepts empty objects - Test get_server_info schema structure - Test delete_active_file schema structure - Compare Record<string, unknown> vs {} behavior - Verify {} correctly rejects objects with properties - Test tool registration with empty arguments schema - Document why {} is more correct than Record<string, unknown> for no-argument tools
✅ Deploy Preview for superb-starlight-b5acb5 canceled.
|
…v#33) - Fix test expectations to match actual ArkType behavior - type({}) accepts objects with any properties (not strict empty) - Fix runtime access to schema.infer (TypeScript-only property) - Add test for non-object rejection - All 10 tests now pass
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
Record<string, unknown>with proper empty object schema{}Changes
{}instead ofRecord<string, unknown>Related Issue
Fixes bug #33
🤖 Generated with Claude Code