In mcp java sdk there is a meta filed, and I see that this doesn't seem to be implemented in SpringAI.

My scene is like this: my project has many MCP tools, which will be passed every time when call the LLM. This will consume a lot of tokens, and it will cause confusion in the choice of LLM. So I hope to add some metadata to the MCP tool so that my MCP client can filter according to this metadata and then call the LLM.

I think the implementation might be like this, or there is an additional annotation

@Tool(metadata={"Type=RealTimeAnalysis"})
@Tool(metadata={"Type=HistoricalAnalysis"})
@ToolMeta({"Type=RealTimeAnalysis"})

Comment From: vdm24

_meta field can have a complex structure, thus metadata={"Type=RealTimeAnalysis"} is not enough.

I would suggest to introduce a new MetaProvider interface with a method returning Map<String, Object> getMeta() and use an implementation of this interface in @Tool annotation in a new Class<? extends MetaPovider> metaProvider() property.

This idea is implemented in this spring-ai-community PR: https://github.com/spring-ai-community/mcp-annotations/pull/83 But it's for @McpTool annotation rather than for @Tool one. It would be nice to have this feature in @Tool annotation as well.