Migration Guide (v0.x to v1.0.0)
Relevant source files
The following files were used as context for generating this wiki page:- README.md
- core/README.md
- core/tests/client/test_utcp_client.py
- plugins/communication_protocols/cli/README.md
- plugins/communication_protocols/http/src/utcp_http/openapi_converter.py
- plugins/communication_protocols/http/tests/test_openapi_converter_auth.py
- plugins/communication_protocols/mcp/README.md
- plugins/communication_protocols/text/README.md
- plugins/communication_protocols/websocket/README.md
- CLAUDE.md
- scripts/extract_required_docs.py
Version 1.0.0 of the Universal Tool Calling Protocol (UTCP) introduces a major architectural shift towards a modular, plugin-based system. This change enhances extensibility, testability, and packaging but includes several breaking changes. This guide provides a comprehensive overview and step-by-step instructions to migrate your existing v0.x projects to the v1.0.0 standard.
The core of the migration revolves around adapting to the new package structure, updated configuration methods, and revised terminology. The previous monolithic structure has been replaced by a lean utcp core package and individual, installable packages for each communication protocol (e.g., utcp-http, utcp-cli).
Sources: README.md:12-14, README.md:90-92, core/README.md:12-14
1. Architectural Changes
The primary change in v1.0.0 is the move from a single package to a core library with a plugin system. This makes the framework more lightweight and allows users to install only the protocols they need.
The following diagram illustrates the architectural evolution from v0.x to v1.0.0.
This diagram shows the shift from a single, all-inclusive package in v0.x to a modular system in v1.0.0 with a central core and separate, installable protocol plugins.
Sources: README.md:23-33, core/README.md:23-33, CLAUDE.md:27-41
2. Migration Steps
Follow these steps to update your project for compatibility with UTCP v1.0.0.
Step 1: Update Dependencies
The first step is to update your project's dependencies. You will need to replace the old utcp package with the new utcp core package and the specific protocol plugins your application uses.
Example pip commands:
# Uninstall the old version
pip uninstall utcp
# Install the new core package and the HTTP plugin (most common)
pip install utcp utcp-http
# Install other plugins as needed
pip install utcp-cli utcp-mcp utcp-text utcp-websocket
Sources: README.md:93, README.md:44-51, core/README.md:44-51
Step 2: Update Client Configuration
The UtcpClient initialization and configuration have been significantly refactored.
Terminology Changes
Key terms have been updated to better reflect their purpose. The most important change is from provider to call_template.
| Old Term (v0.x) | New Term (v1.0.0) | Description |
|---|---|---|
provider | call_template | Represents the configuration for a specific communication protocol instance. |
provider_type | call_template_type | The identifier for the communication protocol (e.g., http, cli). |
providers_file_path | manual_call_templates | The configuration key for defining tool sources. |
Sources: README.md:98-100, core/README.md:98-100
Configuration Method
The UtcpClient is now initialized with a UtcpClientConfig object, a dictionary, or a path to a JSON configuration file. The providers_file_path option has been removed. Instead, you now provide a list of manual_call_templates directly within the configuration.
The diagram below shows the configuration flow change.
This diagram contrasts the v0.x file-based provider loading with the v1.0.0 direct configuration approach.
Sources: README.md:95-97, core/README.md:95-97, core/tests/client/test_utcp_client.py:228-230
Before (v0.x style):
# client.py
client = await UtcpClient.create(
config={"providers_file_path": "./providers.json"}
)
# providers.json
[
{
"name": "my_api",
"provider_type": "http",
"url": "https://api.example.com/utcp"
}
]
Sources: CLAUDE.md:47-53
After (v1.0.0 style):
# client.py
client = await UtcpClient.create(config={
"manual_call_templates": [{
"name": "my_api",
"call_template_type": "http",
"url": "https://api.example.com/utcp"
}]
})
Sources: README.md:54-61, core/README.md:54-61
Protocol-Specific Changes
- Streamable HTTP: The
call_template_typehttp_streamhas been renamed tostreamable_http.
Sources: README.md:101, core/README.md:101
Step 3: Update Imports
Due to the new modular structure, import paths for protocol-specific classes have changed. These classes are now part of their respective plugin packages.
Example:
- Before (v0.x):
from utcp.client.transport_interfaces.http_transport import HttpProvider - After (v1.0.0):
from utcp_http.http_call_template import HttpCallTemplate
Sources: README.md:102, core/README.md:102, core/tests/client/test_utcp_client.py:16-20
Step 4: Update Tool Naming and Variable Substitution
Tool Naming
Tool names are now automatically namespaced with the name of the call_template they belong to, using the format manual_name.tool_name. The client handles this namespacing during manual registration and tool calling.
Example:
If a call_template named my_api provides a tool named get_data, you must now call it as my_api.get_data.
# Calling a namespaced tool in v1.0.0
result = await client.call_tool("my_api.get_data", {"id": "123"})
Sources: README.md:104, README.md:200-203, core/README.md:104
Variable Substitution Namespacing
Variables used in call_template configurations are now namespaced to avoid conflicts. A variable like API_KEY in a call_template named manual_1 must be provided in the client configuration as manual__1_API_KEY (note the double underscore).
Sources: README.md:105-107, core/tests/client/test_utcp_client.py:483-490
The following sequence diagram illustrates the tool calling process in v1.0.0, highlighting the namespacing.
This diagram shows how UtcpClient uses the namespaced tool name to retrieve the correct tool and its associated CallTemplate before dispatching the call to the appropriate communication protocol plugin.
Sources: core/tests/client/test_utcp_client.py:328-347
Step 5: Update Server-Side UtcpManual
If you are providing a UTCP manual from a server, the Tool model has been updated. The tool_provider object within a Tool has been replaced by tool_call_template.
Before (v0.x Tool object):
{
"name": "get_weather",
"description": "Get current weather",
"tool_provider": {
"provider_type": "http",
"url": "https://example.com/api/weather",
"http_method": "GET"
}
}
After (v1.0.0 Tool object):
{
"name": "get_weather",
"description": "Get current weather for a location",
"tool_call_template": {
"call_template_type": "http",
"url": "https://example.com/api/weather",
"http_method": "GET"
}
}
Sources: README.md:220-241, core/README.md:220-241
Summary of Changes
The migration to UTCP v1.0.0 is a significant but valuable update. The key takeaways are the shift to a modular plugin architecture, the change in configuration from providers_file_path to manual_call_templates, the new terminology (call_template), and the introduction of namespacing for both tools and configuration variables. These changes result in a more flexible, scalable, and maintainable system for universal tool calling.
Sources: README.md:12-21, core/README.md:12-21