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

Open Beginner friendly
#2,703 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
tooling

Research direction

Start in src/filesystem/index.ts around line 117, where the list_directory tool schema is defined. Reproduce the request with the gpt-oss-120b-MLX-8bit model and inspect how list_directory handles its parameters. Done means a generated depth argument no longer causes argument validation to fail and directory listing still works.

Written by the indexing model from the issue text.

Description

bug

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

Dominant language
TypeScript
Stars
90.5k
Forks
11.7k
Avg merge
2d 2h
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modelcontextprotocol/servers

All issues in modelcontextprotocol/servers

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.