Skip to content

filesystem: lock structured-content response shape for text tools #3587

@davidahmann

Description

@davidahmann

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.

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