generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 461
Closed
Labels
area-mcpMCP relatedMCP relatedenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersready for contributionPull requests welcomePull requests welcome
Description
Problem Statement
I would like strands to support MCP output schema tool specs feature: https://modelcontextprotocol.io/specification/2025-06-18/server/tools#data-types
A tool definition includes:
- name: Unique identifier for the tool
- title: Optional human-readable name of the tool for display purposes.
- description: Human-readable description of functionality
- inputSchema: JSON Schema defining expected parameters
- outputSchema: Optional JSON Schema defining expected output structure
- annotations: optional properties describing tool behavior
Proposed Solution
Running the most latest version of python MCP SDK (v1.13.1), I was able to connect and fetch output schema from remote MCP server with the following change to MCPAgentTool tool spec function:
def tool_spec(self) -> ToolSpec:
"""Get the specification of the tool.
This method converts the MCP tool specification to the agent framework's
ToolSpec format, including the input schema and description.
Returns:
ToolSpec: The tool specification in the agent framework format
"""
description: str = self.mcp_tool.description or f"Tool which performs {self.mcp_tool.name}"
return {
"inputSchema": {"json": self.mcp_tool.inputSchema},
"outputSchema": {"json": self.mcp_tool.outputSchema},
"name": self.mcp_tool.name,
"description": description,
}Use Case
It will allow LLM agents to incorporate enhanced context from MCP servers that have implemented the new MCP data types. I'm working on a use case where an Agent is having issues determine which tool to use and providing the context of the output schema has shown to facilitate discerning the nuances between different tools.
Alternatives Solutions
No response
Additional Context
No response
dbschmigelski
Metadata
Metadata
Assignees
Labels
area-mcpMCP relatedMCP relatedenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersready for contributionPull requests welcomePull requests welcome