Skip to content

Commit 9b66b33

Browse files
committed
Update version 1.0
1 parent dcb497b commit 9b66b33

File tree

11 files changed

+903
-654
lines changed

11 files changed

+903
-654
lines changed

versioned_docs/version-1.0/for-tool-providers.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ As a tool provider, you'll create a **UTCP Manual** - a standardized description
4545
},
4646
"tool_call_template": {
4747
"call_template_type": "http",
48-
"url": "https://api.example.com/users/${user_id}",
48+
"url": "https://api.example.com/users/{user_id}",
4949
"http_method": "GET"
5050
}
5151
}
@@ -236,11 +236,7 @@ Use `${VARIABLE_NAME}` syntax for dynamic values:
236236

237237
```json
238238
{
239-
"url": "https://api.example.com/users/${user_id}",
240-
"body": {
241-
"name": "${name}",
242-
"email": "${email}"
243-
}
239+
"url": "https://api.example.com/users/{user_id}"
244240
}
245241
```
246242

@@ -270,8 +266,7 @@ Use `${VARIABLE_NAME}` syntax for dynamic values:
270266
"name": "get_data",
271267
"tool_call_template": {
272268
"call_template_type": "http",
273-
"url": "${base_url}/data",
274-
"timeout": "${timeout}"
269+
"url": "${base_url}/data"
275270
}
276271
}
277272
]
@@ -327,7 +322,7 @@ The UTCP manual describes how to call your existing endpoints:
327322
},
328323
"tool_call_template": {
329324
"call_template_type": "http",
330-
"url": "https://api.example.com/users/${user_id}",
325+
"url": "https://api.example.com/users/{user_id}",
331326
"http_method": "GET",
332327
"auth": {
333328
"auth_type": "api_key",
@@ -550,9 +545,7 @@ Test your manual with UTCP clients:
550545
"call_template_type": "http",
551546
"url": "https://api.example.com/batch",
552547
"http_method": "POST",
553-
"body": {
554-
"items": "${items}"
555-
}
548+
"body_field": "items"
556549
}
557550
}
558551
```

versioned_docs/version-1.0/implementation.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ Call templates define how to invoke tools using specific protocols:
146146
}
147147

148148
Tool arguments not used in the URL path or headers will be sent as query parameters for GET requests, or in the request body for POST/PUT/PATCH requests. The `body_field` specifies which tool argument contains the data for the request body.
149-
}
150149
```
151150

152151
#### CLI Call Template

versioned_docs/version-1.0/index.md

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ UTCP acts as a **"manual"** that tells agents how to call your tools directly:
2828
*"If a human can call your API, an AI agent should be able to call it too - with the same security and no additional infrastructure."*
2929
:::
3030

31+
## OpenAPI Compatibility
32+
33+
UTCP extends OpenAPI for AI agents while maintaining full backward compatibility. Where OpenAPI describes APIs for human developers, UTCP adds agent-focused enhancements: `tags` for categorization, `average_response_size` for resource planning, multi-protocol support (HTTP, CLI, gRPC, MCP), and direct execution instructions. Existing OpenAPI specs can be automatically converted to UTCP manuals without requiring API changes or additional infrastructure.
34+
3135
## Quick Start (5 Minutes)
3236

3337
### 1. Install UTCP
@@ -44,7 +48,12 @@ npm install @utcp/core @utcp/http
4448

4549
### 2. Expose Your First Tool
4650

47-
Add a discovery endpoint to your existing API:
51+
**Option A: Discovery via existing OpenAPI spec**
52+
53+
**Generate OpenAPI endpoint**: `GET http://api.github.com/openapi.json`
54+
55+
56+
**Option B: Add a discovery endpoint to your existing API**
4857

4958
**Add endpoint**: `GET /utcp`
5059
**Return your UTCP manual**:
@@ -72,31 +81,55 @@ Add a discovery endpoint to your existing API:
7281
"var_name": "appid",
7382
"location": "query"
7483
}
75-
}
76-
}]
7784
}
7885
```
7986

8087
### 3. Call Your Tool
8188

82-
**Configure UTCP client**:
89+
**Option A: Configure UTCP client**:
8390
```json
8491
{
8592
"manual_call_templates": [{
8693
"name": "weather_api",
8794
"call_template_type": "http",
88-
"url": "http://localhost:8000/utcp",
95+
"url": "http://localhost:8000/utcp", // Or http://api.github.com/openapi.json, the openapi spec gets converted automatically
8996
"http_method": "GET"
9097
}]
9198
}
9299
```
93100

101+
**Option B: Convert OpenAPI spec to UTCP manual manually**
102+
103+
```python
104+
async def convert_api():
105+
async with aiohttp.ClientSession() as session:
106+
async with session.get("https://api.github.com/openapi.json") as response:
107+
openapi_spec = await response.json()
108+
109+
converter = OpenApiConverter(openapi_spec)
110+
manual = converter.convert()
111+
112+
print(f"Generated {len(manual.tools)} tools from GitHub API!")
113+
return manual
114+
```
115+
116+
Then save that to a text file and load it with the text configuration:
117+
```json
118+
{
119+
"manual_call_templates": [{
120+
"name": "github_manual",
121+
"call_template_type": "text",
122+
"file_path": "./github_manual.json",
123+
}]
124+
}
125+
```
126+
127+
94128
**Call the tool**:
95129
1. Initialize UTCP client with configuration
96130
2. Discover tools from weather API
97131
3. Call `get_weather` tool with location parameter
98132
4. Receive weather data response
99-
```
100133

101134
**That's it!** Your tool is now discoverable and callable by any UTCP client.
102135

@@ -106,7 +139,7 @@ Add a discovery endpoint to your existing API:
106139
|---------|-------------|
107140
| **🚀 Zero Latency Overhead** | Direct tool calls, no proxy servers |
108141
| **🔒 Native Security** | Use your existing authentication and authorization |
109-
| **🌐 Protocol Flexibility** | HTTP, WebSocket, CLI, GraphQL, and more |
142+
| **🌐 Protocol Flexibility** | HTTP, MCP, CLI, GraphQL, and more |
110143
| **⚡ Easy Integration** | Add one endpoint, no infrastructure changes |
111144
| **📈 Scalable** | Leverage your existing scaling and monitoring |
112145

@@ -132,7 +165,6 @@ UTCP supports multiple communication protocols through plugins:
132165
| Protocol | Use Case | Plugin | Status |
133166
|----------|----------|--------|--------|
134167
| **[HTTP](./protocols/http.md)** | REST APIs, webhooks | `utcp-http` | ✅ Stable |
135-
| **[WebSocket](./protocols/websocket.md)** | Real-time communication | `utcp-websocket` | ✅ Stable |
136168
| **[CLI](./protocols/cli.md)** | Command-line tools | `utcp-cli` | ✅ Stable |
137169
| **[Server-Sent Events](./protocols/streamable-http.md)** | Streaming data | `utcp-http` | ✅ Stable |
138170
| **[Text Files](./protocols/text.md)** | File reading | `utcp-text` | ✅ Stable |
@@ -151,7 +183,7 @@ UTCP v1.0 features a modular, plugin-based architecture:
151183
- **[UTCP Client](./api/core/utcp/utcp_client.md)**: Tool discovery and execution engine
152184

153185
### Plugin System
154-
- **Protocol Plugins**: HTTP, WebSocket, CLI, etc.
186+
- **Protocol Plugins**: HTTP, MCP, CLI, etc.
155187
- **Custom Protocols**: Extend with your own communication methods
156188
- **Tool Repositories**: Pluggable storage for tool definitions
157189
- **Search Strategies**: Customizable tool discovery algorithms

versioned_docs/version-1.0/migration-v0.1-to-v1.0.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ load_variables_from:
139139
```json
140140
{
141141
"manual_version": "1.0.0",
142-
"utcp_version": "1.0.1",
142+
"utcp_version": "0.2.0",
143143
"info": {
144144
"title": "Weather API",
145145
"version": "1.0.0",
@@ -174,7 +174,6 @@ load_variables_from:
174174
"var_name": "appid",
175175
"location": "query"
176176
}
177-
}
178177
}
179178
]
180179
}

0 commit comments

Comments
 (0)