Add support context propagation

Open
#3,047 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
java, spring
Domain
api, backend

Research direction

Start with the ServerRequest and MethodToolCallback entry points described in the issue, then review the linked MCP SDK issue 225 for the proposed context changes. Done should mean request data such as cookies and headers can reach Spring AI tool callbacks, with a supported way to provide additional method context.

Written by the indexing model from the issue text.

Description

status: waiting-for-triage

When using MCP, we need to read some data from the ServerRequest, e,g cookies and headers, and then pass it to Spring-Ai's tool callbacks.

I just submitted a PR to the mcp SDK, https://github.com/modelcontextprotocol/java-sdk/issues/225, and still, there are some changes in the Spring AI SDK too.

What do you think about bout, another issue is , now the MethodToolCallback is final, how about I want to prepare a MyAdditionalContext to the method?

Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 10h
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from spring-projects/spring-ai

All issues in spring-projects/spring-ai

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.