modelcontextprotocol / modelcontextprotocol/servers
[bug] list_directory params is not allowed to have the additional property depth
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 90.5k
- Forks
- 11.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 5
Description
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:
- Open LM Studio on on Mac
- Load lmstudio-community/gpt-oss-120b-MLX-8bit model
- add filesystem mcp and ask it to list direcotry
- it will call a tool with a
depthargument 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100