DwiziDwizi

Browse docs

API Reference

CRUD operations for AI tools.

Tools API

Manage the lifecycle of your AI tools: creation, updates, and deletion.

Create Tool

Creates a new tool in an organization.

POST /v1/tools

Request Body:

{
  "name": "My Tool",
  "description": "Optional description",
  "language": "ts", // "ts" or "js"
  "source": "export default async () => ({ hello: 'world' })",
  "inputSchema": {}, // JSON Schema object
  "env": { "KEY": "value" },
  "public": false,
  "outputPolicy": "retain" // retain | omit | obfuscate
}

Output Policy Values: retain (default), omit, obfuscate.

Response: 201 Created

{
  "id": "uuid",
  "name": "My Tool",
  "slug": "my-tool",
  "outputPolicy": "retain",
  "url": "https://...",
  "token": "..." // Secret token for invoking private tools
}

List Tools

Returns a paginated list of tools for the current organization.

GET /v1/tools

Query Parameters:

  • limit: Number of items (default 50, max 100)
  • cursor: Pagination cursor

Response:

{
  "tools": [ ... ],
  "nextCursor": "string"
}

Get Tool

Retrieve details for a specific tool by its slug.

GET /v1/tools/:slug

Response: Returns the full tool object including source, schema, and configuration.

Update Tool

Modify an existing tool.

PUT /v1/tools/:slug (Full update) PATCH /v1/tools/:slug (Partial update)

Request Body: Same as Create Tool, but all fields are optional for PATCH.

Output Policy: Controls what is stored from tool executions. See Output Policy.

Delete Tool

Permanently remove a tool.

DELETE /v1/tools/:slug

Response: 204 No Content