Skip to content

[FEATURE] Add support for the Universal Tool Calling Protocol (UTCP) #812

@perrozzi

Description

@perrozzi

Problem Statement

Add support for the Universal Tool Calling Protocol (UTCP) to enable Strands agents to discover and call tools directly using their native protocols - no wrapper servers required.

What is UTCP?

UTCP is a lightweight, secure, and scalable standard that enables AI agents to call tools directly. Unlike other approaches that require wrapper servers and proxy protocols, UTCP acts as a "manual" that tells agents how to call your tools directly with zero latency overhead.

Key Benefits

  • 🚀 Zero Latency Overhead - Direct tool calls, no proxy servers
  • 🔒 Native Security - Use existing authentication and authorization
  • 🌐 Protocol Flexibility - HTTP, WebSocket, CLI, GraphQL, and more
  • ⚡ Easy Integration - Load existing OpenAPI specs or add one endpoint to the existing API, no infrastructure changes
  • 📈 OpenAPI Compatible - Extends OpenAPI for AI agents while maintaining full backward compatibility

Proposed Solution

Proposed Implementation

  • UTCPClient - Main interface for UTCP integration with async context manager support
  • UTCPAgentTool - Adapter between UTCP tools and Strands framework
  • Support for multiple protocols (HTTP, WebSocket, CLI, etc.)
  • OpenAPI/Swagger automatic conversion to UTCP manuals
  • Comprehensive error handling and logging

Example Usage

from strands import Agent
from strands.tools.utcp import UTCPClient

# Configure UTCP client with HTTP call templates
utcp_config = {
   "manual_call_templates": [
       {
           "name": "petstore",
           "call_template_type": "http",
           "http_method": "GET", 
           "url": "https://petstore.swagger.io/v2/swagger.json"
       },
       {
           "name": "weather_api",
           "call_template_type": "http",
           "http_method": "GET",
           "url": "https://api.weather.com/utcp"
       }
   ]
}

async with UTCPClient(utcp_config) as utcp_client:
   # Discover tools from all configured APIs
   tools = await utcp_client.list_tools()
   print(f"Found {len(tools)} tools from external APIs")
   
   # Create agent with UTCP tools
   agent = Agent(tools=tools)
   result = await agent.invoke("Find information about pets and current weather")

Use Case

Use cases

This would complement our existing MCP support and allow Strands users to:

  • Connect to multiple external APIs simultaneously using native protocols
  • Automatically generate tools from existing OpenAPI/Swagger specifications
  • Access tools without requiring wrapper servers or additional infrastructure
  • Leverage existing API security and scaling infrastructure

Alternatives Solutions

UTCP vs MCP Comparison

Feature UTCP MCP
Infrastructure None required Wrapper servers
Latency Direct calls Double hop
Security Native Reimplemented
Protocols Multiple (HTTP, WebSocket, CLI) HTTP streaming
OpenAPI Support Native compatibility Requires conversion

Additional Context

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions