generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 423
Open
Labels
area-mcpMCP relatedMCP relatedenhancementNew feature or requestNew feature or requestready for contributionPull requests welcomePull requests welcome
Description
Problem Statement

In the MCP server, I use the meta
field to pass some business-related fields, but I found that when using the AWS Strands SDK's MCP tool, themeta
field is ignored. Will support for passing this field be added in the future?
See MCP specification
for notes on _meta usage.
Proposed Solution
No response
Use Case
test_mcp= FastMCP("test_mcp")
@test_mcp.tool(
name="xxxx",
description="xxxx",
)
async def xxxx():
try:
token_usage = response.usage_metadata.total_token_count if response.usage_metadata else 0
return TextContent(
type="text",
text=url,
_meta={
"token_usage": token_usage,
}
)
except Exception as e:
logger.error(f"{type(e).__name__}: {e}")
raise e
Alternatives Solutions
No response
Additional Context
No response
Metadata
Metadata
Assignees
Labels
area-mcpMCP relatedMCP relatedenhancementNew feature or requestNew feature or requestready for contributionPull requests welcomePull requests welcome