Skip to content

add metadata in tool/list #4743

@SunJiFengPlus

Description

@SunJiFengPlus

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"})

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions