Skip to content

Python: [Bug]: Creation of agent with MCPStreamableHttpTool impossible #3946

Closed

Description

@ocinrepmek

Description

When creating a agent with MCPStreamableHTTPTool for the usage with the sentinel-mcp server from microsoft the creation fails.
The creation should be succesful with the provided parameters.

Code Sample

try:
            self.provider = AzureAIProjectAgentProvider(
                credential=self.credential,
                project_endpoint=self.project_endpoint,                
            )
               
        except Exception as e:
            logger.error("Failed to initialize Azure AI Projects client", error=str(e))
            raise
        try:
            mcp = MCPStreamableHTTPTool(
                name="sentinel-mcp",
                url="https://sentinel.microsoft.com/mcp/data-exploration",
                allowed_tools=["list_sentinel_workspaces", "search_tables", "query_lake"],
                approval_mode='never_require'
            )
            self.agent = await self.provider.create_agent(
                name= "localdeployed-agent",
                tools=mcp,
                model="gpt-4.1"
            )
        except Exception as e:
            logger.error("Failed to create Azure AI Projects agent", error=str(e))
            raise

Error Messages / Stack Traces

error=<agent_framework._mcp.MCPStreamableHTTPTool object at 0x0000022E12D07B90> is not a callable object

Package Versions

agent-framework 1.0.0b260212

Python Version

3.12.3

Additional Context

No response

Metadata

Metadata

Labels

bugUsage: [Issues], Target: all issues (Legacy, prefer issue type: bug)pythonUsage: [Issues, PRs], Target: Python

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions