Tools API
Manage your registered tools programmatically. Create tools, update pricing, and manage metadata.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/tools | List all your tools |
| POST | /v1/tools | Register a new tool |
| GET | /v1/tools/:slug | Get a tool by slug |
| PATCH | /v1/tools/:slug | Update tool config or pricing |
| DELETE | /v1/tools/:slug | Delete a tool |
Create a tool
Bash
curl -X POST https://api.climeter.ai/v1/tools \
-H "Authorization: Bearer <jwt>" \
-H "Content-Type: application/json" \
-d '{
"slug": "code-search",
"name": "Code Search",
"description": "Semantic code search across repositories",
"pricing": {
"type": "per_call",
"price_usd": 0.002
},
"is_public": false
}'List all your tools:
Bash
curl https://api.climeter.ai/v1/tools \
-H "Authorization: Bearer <jwt>"
# Response
{
"tools": [
{
"slug": "code-search",
"name": "Code Search",
"is_public": false,
"created_at": "2025-01-15T09:00:00Z"
}
],
"total": 1
}Pricing models
per_call
Flat fee per successful invocation. Matches the price= parameter in @meter.track().
JSON
{
"type": "per_call",
"price_usd": 0.01
}tiered
Volume discounts — lower price per call as monthly usage grows.
JSON
{
"type": "tiered",
"tiers": [
{ "up_to": 1000, "price_usd": 0.005 },
{ "up_to": 10000, "price_usd": 0.003 },
{ "up_to": null, "price_usd": 0.001 }
]
}free
No charge. Events are still recorded — analytics remain active.
JSON
{ "type": "free" }Schema reference
| Field | Type | Required | Description |
|---|---|---|---|
| slug | string | Yes | URL-safe unique ID (e.g., "code-search", max 64 chars) |
| name | string | Yes | Display name shown to users (max 64 chars) |
| description | string | Yes | Short description for marketplace (max 256 chars) |
| pricing | object | Yes | Pricing configuration object (see above) |
| tags | string[] | No | Searchable tags for marketplace (max 10) |
| is_public | boolean | No | List on marketplace (default: false) |
| webhook_url | string | No | Receive event notifications via webhook |