Skip to content

[Test] ReadResource response shaping by content.type (text/binary/json) #18

@cloud-nitrostack

Description

@cloud-nitrostack

Tests for ReadResource response shaping by content.type (text / binary / json)

Summary: ReadResource builds MCP contents from a switch on content.type. Regressions (e.g. missing break) should be caught by tests.

Where to change: typescript/packages/core/src/core/server.ts (handler); new or extended tests under typescript/packages/core/src/**/__tests__/ (follow existing layout).

Acceptance criteria:

  • Tests for text, binary, and json branches assert mimeType, text vs blob, and JSON stringification of data only for json.
  • No fall-through to default for valid json payloads.

Suggested labels: test, good first issue


Source: docs/STARTER_ISSUES_REVIEW.md — edit in-repo first, then sync GitHub issues if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions