Skip to content

Conversation

@LucaButBoring
Copy link
Contributor

@LucaButBoring LucaButBoring commented Dec 26, 2025

The specification only allows the server to return a null TTL, it doesn't allow the client to request that. This is intentional, as it forces clients to make a choice betwen a specific TTL or not caring what the TTL is, rather than defaulting to keeping tasks forever all the time.

This change removes null as a valid requested TTL. Allowing the requested value to be null was an implementation oversight that diverged from the spec.

Motivation and Context

Fixes a request shape mismatch against the specification.

How Has This Been Tested?

Updated unit tests.

Breaking Changes

Yes, if anyone was requesting a null TTL.

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

Additional context

Partial backport of #1315.

The specification only allows the server to return a null TTL, it doesn't allow the client to request that.
This is intentional, as it forces clients to make a choice betwen a specific TTL or not caring what the TTL is, rather than defaulting to keeping tasks forever all the time.

Allowing the requested value to be null was an implementation oversight that diverged from the spec.
@LucaButBoring LucaButBoring requested a review from a team as a code owner December 26, 2025 23:11
@changeset-bot
Copy link

changeset-bot bot commented Dec 26, 2025

⚠️ No Changeset found

Latest commit: 8f0c809

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 26, 2025

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/sdk@1339

commit: 8f0c809

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