Skip to content

Use symbolize_names: true in JSON.parse calls#279

Open
koic wants to merge 1 commit intomodelcontextprotocol:mainfrom
koic:refactor__use_symbolize_names
Open

Use symbolize_names: true in JSON.parse calls#279
koic wants to merge 1 commit intomodelcontextprotocol:mainfrom
koic:refactor__use_symbolize_names

Conversation

@koic
Copy link
Copy Markdown
Member

@koic koic commented Mar 30, 2026

Motivation and Context

Replace custom deep_transform_keys in Tool::Schema and string key access in StreamableHTTPTransport with the symbolize_names: true option of JSON.parse.

This aligns StreamableHTTPTransport with StdioTransport, which already uses symbolize_names: true.

How Has This Been Tested?

This is a refactoring that preserves the existing tests.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Replace custom `deep_transform_keys` in `Tool::Schema` and
string key access in `StreamableHTTPTransport` with
the `symbolize_names: true` option of `JSON.parse`.

This aligns `StreamableHTTPTransport` with `StdioTransport`,
which already uses `symbolize_names: true`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant