modelcontextprotocol / modelcontextprotocol/java-sdk

standardize tool metadata by adding annotation classes to sdk

Open
#224 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
3.7k
Forks
1.1k
Avg merge
1d 15h
Merged PRs (30d)
9

Description

Expected Behavior

It would be ideal to have Tool annotation classes (specifically Tool/ToolParam) be added to the mcp-java-sdk.

Current Behavior

Multiple, tool-specific annotations exist, the most prominent being spring's:

https://github.com/spring-projects/spring-ai/tree/main/spring-ai-model/src/main/java/org/springframework/ai/tool/annotation

These annotations (and the one interface dependency) should be a part of the java mcp-sdk itself, rather than require spring dependencies (or other emerging implementations).

Context
b
It would be helpful to have Tool/ToolParam/ToolAnnotations/ToolResult annotations that are part of the java sdk, so that the MCP developer would not have to change annotations to use a different framework. Having Tool/ToolParam/ToolAnnotations/ToolResult annotations as part of the mcp itself rather than spring or any other specific framework would aid in that effort.

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.

Research direction

Start by reviewing the Spring AI annotation directory linked in the issue and comparing its Tool, ToolParam, ToolAnnotations, and ToolResult annotations with the current mcp-java-sdk. Done means the SDK provides framework-independent equivalents so MCP developers can use the same annotations without Spring or another implementation dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.