Skip to content

Conversation

@vanmarkic
Copy link

Summary

  • Fixes schema validation issues for MCP tools that don't require arguments
  • Replaces Record<string, unknown> with proper empty object schema {}
  • Adds comprehensive test coverage for schema validation

Changes

  • Updated schema definitions for no-argument tools to use {} instead of Record<string, unknown>
  • Added 160 lines of tests for schema validation scenarios
  • Ensures proper MCP protocol compliance

Related Issue

Fixes bug #33

🤖 Generated with Claude Code

…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
@netlify
Copy link

netlify bot commented Nov 15, 2025

Deploy Preview for superb-starlight-b5acb5 canceled.

Name Link
🔨 Latest commit f44262c
🔍 Latest deploy log https://app.netlify.com/projects/superb-starlight-b5acb5/deploys/6918c81989d6820008cd2ae2

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants