Tools API

Manage your registered tools programmatically. Create tools, update pricing, and manage metadata.

Endpoints

MethodEndpointDescription
GET/v1/toolsList all your tools
POST/v1/toolsRegister a new tool
GET/v1/tools/:slugGet a tool by slug
PATCH/v1/tools/:slugUpdate tool config or pricing
DELETE/v1/tools/:slugDelete 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

FieldTypeRequiredDescription
slugstringYesURL-safe unique ID (e.g., "code-search", max 64 chars)
namestringYesDisplay name shown to users (max 64 chars)
descriptionstringYesShort description for marketplace (max 256 chars)
pricingobjectYesPricing configuration object (see above)
tagsstring[]NoSearchable tags for marketplace (max 10)
is_publicbooleanNoList on marketplace (default: false)
webhook_urlstringNoReceive event notifications via webhook
Tools API — CLIMeter Docs