Skip to content

feat: SEP-1686 Tasks#844

Open
devcrocod wants to merge 1 commit into
mainfrom
feat/task-wire
Open

feat: SEP-1686 Tasks#844
devcrocod wants to merge 1 commit into
mainfrom
feat/task-wire

Conversation

@devcrocod

Copy link
Copy Markdown
Contributor

finished SEP-1686
closes #421

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

Copilot AI review requested due to automatic review settings June 19, 2026 12:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds SEP-1686 task augmentation support to existing MCP request types in kotlin-sdk-core, enabling callers to optionally request task-based (call-now / fetch-later) execution for tools and sampling.

Changes:

  • Add optional task: TaskMetadata? to tools/call and sampling/createMessage request parameter types, plus convenience getters on the request wrappers.
  • Add/extend serialization tests ensuring task is encoded when present and omitted when null (consistent with explicitNulls = false).
  • Update the published API surface (.api dump) to reflect the new parameters/getters.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/types/ToolsTest.kt Adds serialization tests for CallToolRequest with/without task augmentation.
kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/types/SamplingTest.kt Adds encoding/round-trip tests for CreateMessageRequestParams.task.
kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/tools.kt Introduces task into CallToolRequestParams and exposes it on CallToolRequest.
kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/sampling.kt Introduces task into CreateMessageRequestParams and exposes it on CreateMessageRequest.
kotlin-sdk-core/api/kotlin-sdk-core.api Updates API dump for the added task getter/parameter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +225 to +226
* @property task If specified, the caller is requesting task-augmented execution. The request
* will return a [CreateTaskResult] immediately, and the actual result can be retrieved later via `tasks/result`.
Comment on lines +225 to +226
* @property task If specified, the caller is requesting task-augmented execution. The request
* will return a [CreateTaskResult] immediately, and the actual result can be retrieved later via `tasks/result`.
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.

Implement SEP-1686: Tasks

2 participants