Skip to content

kimi-cu MCP tool "js_reset" ships inputSchema without "properties", LM Studio rejects every request with 400 invalid_type #4177

Description

@yexing17

Summary

The js_reset tool exposed by the kimi-cu MCP server (Kimi Computer Use plugin) has an inputSchema of:

{"type": "object", "additionalProperties": false}

It is missing the properties key. OpenAI's API tolerates this, but LM Studio's OpenAI-compatible server validates tools[] with zod and requires function.parameters.properties to be present, so every chat request fails with HTTP 400 before reaching the model.

Environment

  • kimi-cu plugin: 0.6.3 (~/.kimi-code/plugins/managed/kimi-cu/kimi.plugin.json)
  • KimiCU.app: 0.6.6 (/Applications/KimiCU.app, bundle id ai.kimi.cu)
  • macOS, provider type openai, base_url http://127.0.0.1:1234/v1 (LM Studio), model qwen/qwen3.5-9b

Error

400 "[
  {
    "code": "invalid_type",
    "expected": "object",
    "received": "undefined",
    "path": [25, "function", "parameters", "properties"],
    "message": "Required"
  }
]"

Tool index 25 (0-based) in the request is exactly mcp__kimi-cu__js_reset. I extracted the 47-tool payload from the session wire log: it is the only tool whose parameters lacks properties.

Minimal reproduction (against LM Studio directly, no kimi-code involved)

# tools = [{"type": "function", "function": {"name": "js_reset",
#   "description": "reset",
#   "parameters": {"type": "object", "additionalProperties": False}}}]
# POST /v1/chat/completions  ->  400 with the exact zod error above

# Same tool with "properties": {} added  ->  200 OK

Expected behavior

js_reset's inputSchema should be:

{"type": "object", "properties": {}, "additionalProperties": false}

An object schema without properties is non-idiomatic JSON Schema and breaks strict validators. Two possible fixes:

  1. Fix the schema in the KimiCU MCP server (the tool definition lives in the compiled /Applications/KimiCU.app binary, so users cannot patch it themselves).
  2. Defensively, kimi-code could normalize MCP tool schemas before sending them to OpenAI-compatible providers (fill missing properties: {} for object schemas) — related to the schema-sanitization gap discussed in MCP tool schema validation fails with HTTP 400 ("moonshot flavored json schema") due to missing schema sanitization in new CLI #792.

Workaround

Disable the kimi-cu plugin, or remove "js_reset" from enabledTools in kimi.plugin.json; requests to LM Studio then succeed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions