Create a custom tool

Wire up any HTTP endpoint as a tool agents can call.

POST /api/v1/custom_tools

Wire up any HTTP endpoint as a tool agents can call. The tool's name is auto-generated from label (slugified, prefixed custom_, deduped within the org).

Scope: custom_tools:write

Request body

FieldTypeRequiredNotes
labelstringyesHuman-readable name. Include connector + resource ("List Postmark Templates", not "List Templates").
descriptionstringyesLLM-facing description. Decides when the tool gets called.
methodenumyesGET | POST | PUT | PATCH | DELETE.
urlstringyesEndpoint URL. May contain {{param}} placeholders.
typeenumno"read" or "write". Defaults to read.
headersobjectnoStatic headers map.
body_templatestringnoJSON template for POST/PUT/PATCH bodies. Supports {{param}}.
parametersarraynoSee below.
response_mappingstringnoDot path to extract from the response, e.g. data.items.
authobjectnoAuth type + credentials. Omitted = no auth.
groupobjectnoUI grouping { name, icon, color }.

Auth shape

{
  "type": "bearer" | "api_key" | "basic" | "none",
  "credentials": {
    "token":       "...",   // bearer
    "apiKey":      "...",   // api_key
    "header_name": "...",   // api_key (default "X-API-Key")
    "username":    "...",   // basic
    "password":    "..."    // basic
  }
}

Example request

curl -X POST https://dashboard.getmacha.com/api/v1/custom_tools \
  -H "Authorization: Bearer $MACHA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "label": "List Postmark Templates",
    "description": "Returns email templates from Postmark.",
    "method": "GET",
    "url": "https://api.postmarkapp.com/templates",
    "type": "read",
    "parameters": [
      { "name": "count", "type": "integer", "description": "How many templates to return.", "in": "query" }
    ],
    "auth": {
      "type": "api_key",
      "credentials": { "apiKey": "your-postmark-token", "header_name": "X-Postmark-Server-Token" }
    },
    "group": { "name": "Postmark" }
  }'

Errors

StatusCodeWhen
409custom_tool_name_takenA tool with the same generated name already exists.
422validation_failedMissing required field, bad method, etc.

© 2026 AGZ Technologies Private Limited