Skip to content

Create tool

View .md
POST

Create a new tool for an agent. Tools allow the agent to call external webhooks.

Authorization

  • Authorizationheaderrequired

    Bearer YOUR_API_KEY. Create a key in the dashboard.

Path parameters

  • senderIdstringrequired

Body

application/json

  • namestringrequired
    Limitsmax length 100
  • descriptionstringrequired
    Limitsmax length 500
  • parametersobjectrequired
    3 properties
    • typestringrequired
      One ofobject
    • propertiesobjectrequired
      1 properties
      • {key}object
        2 properties
        • typestring
        • descriptionstring
    • requiredstring[]required
  • webhookUrlstring<uri>required

    Must be HTTPS.

  • webhookSecretstring

    Signing secret for the webhook. Optional: Zavu generates one when omitted and returns it on this response only. Supply your own if you already have a secret you want reused.

  • enabledboolean
    Defaulttrue

Responses

201Tool created.
  • toolobjectrequired
    10 properties
    • idstringrequired
    • agentIdstringrequired
    • namestringrequired
    • descriptionstringrequired

      Description for the LLM to understand when to use this tool.

    • parametersobjectrequired
      3 properties
      • typestringrequired
        One ofobject
      • propertiesobjectrequired
        1 properties
        • {key}object
          2 properties
          • typestring
          • descriptionstring
      • requiredstring[]required
    • webhookUrlstring<uri>required

      HTTPS URL to call when the tool is executed.

    • enabledbooleanrequired
    • createdAtstring<date-time>required
    • updatedAtstring<date-time>required
    • webhookSecretstring

      Signing secret for this tool's webhook. Returned only when the tool is created, never on a later read.

      Zavu generates one if you do not supply it, and signs every call to this tool with it: X-Zavu-Signature: <hex>, the HMAC-SHA256 of the request body. Verify it before trusting the call. Lost it? Rotate with POST /v1/senders/{senderId}/agent/tools/{toolId}/webhook/secret.

400Invalid request.
  • codestringrequired
  • messagestringrequired
  • detailsobject
401Unauthorized.
  • codestringrequired
  • messagestringrequired
  • detailsobject
404Agent not found.
  • codestringrequired
  • messagestringrequired
  • detailsobject
409`conflict`: the agent already has a tool with this name. Tool names are unique per agent, because a flow's `tool` step and the model both call a tool by name.
  • codestringrequired
  • messagestringrequired
  • detailsobject