utcp-specification
utcp-specification copied to clipboard
The specification for the Universal Tool Calling Protocol
Universal Tool Calling Protocol (UTCP) Specification
This repository contains the official specification documentation for the Universal Tool Calling Protocol (UTCP). UTCP is a modern, flexible, and scalable standard for defining and interacting with tools across various communication protocols.
What is UTCP?
UTCP provides a standardized way for AI systems and other clients to discover and call tools from different providers, regardless of the underlying protocol used (HTTP, WebSocket, CLI, etc.). This specification defines:
- Tool discovery mechanisms
- Tool call formats and templates
- Plugin-based architecture for extensibility
- Enhanced authentication methods
- Comprehensive error handling
- Response processing and validation
Version 1.0 Features
UTCP v1.0 introduces significant architectural improvements:
- Plugin Architecture: Core functionality split into pluggable components for better modularity
- Enhanced Data Models: Improved Pydantic models with comprehensive validation
- Multiple Protocol Support: HTTP, CLI, WebSocket, Text, and MCP protocols via plugins
- Advanced Authentication: Expanded authentication options including API key, OAuth, and custom auth
- Better Error Handling: Specific exception types for different error scenarios
- Performance Optimizations: Optimized client and protocol implementations
- Async/Await Support: Full asynchronous client interface for better performance
Contributing to the Specification
We welcome contributions to the UTCP specification! Here's how you can contribute:
- Fork the repository: Create your own fork of the specification repository
- Make your changes: Update or add documentation as needed
- Submit a pull request: Open a PR with your changes for review
- Participate in discussions: Join the conversation about proposed changes
When contributing, please follow these guidelines:
- Ensure your changes align with the overall vision and goals of UTCP
- Follow the established documentation structure and formatting
- Include examples when adding new features or concepts
- Update relevant sections to maintain consistency across the documentation
Installation and Usage
Core Package Installation
# Install the core UTCP package
pip install utcp
# Install protocol plugins as needed
pip install utcp-http utcp-cli utcp-websocket utcp-text utcp-mcp
Migration from v0.1 to v1.0
If you're upgrading from UTCP v0.1, please see our comprehensive Migration Guide which covers:
- Breaking changes and architectural improvements
- Step-by-step migration instructions
- Configuration and manual format updates
- Common migration issues and solutions
Building the Documentation Locally
Prerequisites
To build and preview the documentation site locally, you'll need:
- Node.js version 18.0 or higher
- npm or yarn package manager
Setup
-
Clone the repository:
git clone https://github.com/universal-tool-calling-protocol/utcp-specification.git cd utcp-specification -
Install dependencies:
npm install
Running the Documentation Site
To build and serve the site locally:
npm start
This will start a local development server at http://localhost:3000 where you can preview the documentation.
Documentation Structure
The UTCP documentation is organized as follows:
docs/index.md: Homepage and introduction to UTCPintroduction.md: Detailed introduction and core conceptsfor-tool-providers.md: Guide for implementing tool providersfor-tool-callers.md: Guide for implementing tool callersmigration-v0.1-to-v1.0.md: Comprehensive migration guide from v0.1 to v1.0protocols/: Documentation for each protocol typehttp.md: HTTP protocol implementationwebsocket.md: WebSocket protocol implementationcli.md: CLI protocol implementationsse.md: Server-Sent Events protocol implementationtext.md: Text protocol implementationmcp.md: Model Context Protocol implementation
api/: API reference documentationcore/: Core API documentationplugins/: Plugin API documentation
implementation.md: Implementation guidelines and best practices
versioned_docs/: Version-specific documentation for backwards compatibility
Working with the Specification
Modifying the Documentation
The documentation is built with Docusaurus and written in Markdown format. When making changes:
- Ensure your Markdown follows the established style
- Preview changes locally before submitting PRs
- Keep examples up-to-date with the latest specification (v1.0)
- Update navigation items in
sidebars.tsif adding new pages - Consider version compatibility when making breaking changes
File Organization
When adding new documentation:
- Place protocol-specific documentation in
docs/protocols/ - Place API documentation in
docs/api/core/ordocs/api/plugins/ - Use consistent front matter with appropriate navigation ordering
- Include tags for improved searchability
- Consider versioning for breaking changes using
versioned_docs/
Version Control
The UTCP specification follows semantic versioning:
- Major versions (1.0, 2.0): Breaking changes to the protocol
- Minor versions (1.1, 1.2): New features added in a backward-compatible manner
- Patch versions (1.0.1, 1.0.2): Backward-compatible bug fixes and clarifications
License
This specification is distributed under the Mozilla Public License 2.0 (MPL-2.0).