modelcontextprotocol / modelcontextprotocol/servers

filesystem: lock structured-content response shape for text tools

Open
#3,587 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Problem

Filesystem tools expose structured content for clients, but the repo still relies on ad hoc per-tool shaping and narrow tests. That makes schema drift easy to reintroduce and hard to validate automatically.

Why now

Structured content is one of the server's clearest machine-readable artifact surfaces. The filesystem server is also used heavily for client contract testing, so its response shape should be stable and explicit.

Expected behavior

Filesystem tools that declare outputSchema: { content: string } should emit one stable structured-content object shape, with representative regression coverage for file and directory cases.

Claim-to-codepath map

  • src/filesystem/index.ts
  • src/filesystem/lib.ts
  • src/filesystem/__tests__/structured-content.test.ts
  • src/everything/tools/get-structured-content.ts

Validation requirements

  • Reduce per-tool schema shaping drift through a shared helper or equivalent normalization path.
  • Add representative regression coverage for filesystem text-tool responses.
  • Keep non-text structured-content surfaces unchanged unless they share the same contract.

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.

Research direction

Start with src/filesystem/index.ts and src/filesystem/lib.ts, then run src/filesystem/tests/structured-content.test.ts to inspect the existing file and directory cases. Compare the filesystem paths with src/everything/tools/get-structured-content.ts. Done means text tools use one stable structured-content shape, regression coverage represents both cases, and unrelated structured-content surfaces remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, testing-qa
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.