servers icon indicating copy to clipboard operation
servers copied to clipboard

[bug] list_directory params is not allowed to have the additional property depth

Open alxekb opened this issue 4 months ago • 0 comments

Describe the bug A clear and concise description of what the bug is. Model failed to generate a tool call

Failed to parse arguments for tool "list_directory": params is not allowed to have the additional property "depth"

<|start|>assistant<|channel|>commentary to=functions.list_directory <|constrain|>json<|message|>{"path":"/Users/alekseiivanov/dev/github/application/app/composites/contracts/ai_document_analyser","depth":1}

To Reproduce Steps to reproduce the behavior:

  1. Open LM Studio on on Mac
  2. Load lmstudio-community/gpt-oss-120b-MLX-8bit model
  3. add filesystem mcp and ask it to list direcotry
  4. it will call a tool with a depth argument which breaks the flow.

Expected behavior A clear and concise description of what you expected to happen. filesystem mcp successfully lists directory as it does with qwen3 models.

Logs If applicable, add logs to help explain your problem.

Model failed to generate a tool call

Failed to parse arguments for tool "list_directory": params is not allowed to have the additional property "depth"

<|start|>assistant<|channel|>commentary to=functions.list_directory <|constrain|>json<|message|>{"path":"./", "depth":2}

Additional context Add any other context about the problem here.

Maybe I'm misusing the tool. But it might be useful to add an optional parameter here https://github.com/modelcontextprotocol/servers/blob/8ba0ff5e4c74b1b0034f30f4ad75632183df67f4/src/filesystem/index.ts#L117

alxekb avatar Sep 10 '25 14:09 alxekb