Skip to content

Allow metadata to be passed to MCP calls #1323

@jacquicollier2-eng

Description

@jacquicollier2-eng

In Spring AI it is possible to pass metadata to MCP calls, e.g.,

@McpTool(
    generateOutputSchema = true,
    description = "Fetches jobs for the current worker..."
)
public BrowseJobsToolResponse browseJobs(McpMeta meta) { ... }

can be called by setting the data in the toolContext in Spring AI. E.g.,

chatClient.prompt(prompt)
    .toolCallbacks(toolCallbacks())
    .toolContext(toolContext(Map.of("authToken", authToken())))
    .call();

It would be good to be able to send metadata in MCP calls in Embabel too.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions