Custom Tools
GET /api/orgs/{org_id}/custom-tools
Section titled “GET /api/orgs/{org_id}/custom-tools”List Custom Tools
List custom tools for the organization.
Omit limit to get every tool; total is the full count either way.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| limit | query | integer | no | Max rows to return (1-100). Omit to return every row. |
| offset | query | integer | no | Rows to skip — pass the previous response’s next_offset. |
| org_id | path | string (uuid) | yes | |
| project_id | query | string | no | Filter by project id, or ‘none’ for uncategorized tools. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | Page_CustomToolResponse_ |
| 422 | Validation Error | HTTPValidationError |
POST /api/orgs/{org_id}/custom-tools
Section titled “POST /api/orgs/{org_id}/custom-tools”Create Custom Tool
Create a new custom tool. Requires admin/owner role.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
| env_vars | string[] | no | |
| name | string | yes | |
| source_code | string | yes | |
| tags | string[] | no |
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Successful Response | CustomToolResponse |
| 422 | Validation Error | HTTPValidationError |
GET /api/orgs/{org_id}/custom-tools/{id_or_slug}
Section titled “GET /api/orgs/{org_id}/custom-tools/{id_or_slug}”Get Custom Tool
Get a custom tool by ID or slug.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id_or_slug | path | string | yes | |
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | CustomToolResponse |
| 422 | Validation Error | HTTPValidationError |
PUT /api/orgs/{org_id}/custom-tools/{id_or_slug}
Section titled “PUT /api/orgs/{org_id}/custom-tools/{id_or_slug}”Update Custom Tool
Update a custom tool. Requires admin/owner role.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id_or_slug | path | string | yes | |
| org_id | path | string (uuid) | yes |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
| env_vars | string[] | no | |
| is_enabled | boolean | no | |
| name | string | no | |
| source_code | string | no | |
| tags | string[] | no |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | CustomToolResponse |
| 422 | Validation Error | HTTPValidationError |
DELETE /api/orgs/{org_id}/custom-tools/{id_or_slug}
Section titled “DELETE /api/orgs/{org_id}/custom-tools/{id_or_slug}”Delete Custom Tool
Delete a custom tool. Requires admin/owner role.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id_or_slug | path | string | yes | |
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | Successful Response | |
| 422 | Validation Error | HTTPValidationError |
GET /api/orgs/{org_id}/custom-tools/{id_or_slug}/runs
Section titled “GET /api/orgs/{org_id}/custom-tools/{id_or_slug}/runs”List Tool Runs
List recent runs for a custom tool.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id_or_slug | path | string | yes | |
| limit | query | integer | no | |
| offset | query | integer | no | |
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | CustomToolRunResponse[] |
| 422 | Validation Error | HTTPValidationError |
GET /api/orgs/{org_id}/custom-tools/{id_or_slug}/runs/{run_id}
Section titled “GET /api/orgs/{org_id}/custom-tools/{id_or_slug}/runs/{run_id}”Get Tool Run
Get a specific tool run by ID.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id_or_slug | path | string | yes | |
| org_id | path | string (uuid) | yes | |
| run_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | CustomToolRunResponse |
| 422 | Validation Error | HTTPValidationError |
POST /api/orgs/{org_id}/custom-tools/{tool_id}/execute
Section titled “POST /api/orgs/{org_id}/custom-tools/{tool_id}/execute”Execute Custom Tool
Execute a custom tool directly with provided arg bindings. Requires admin/owner role.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes | |
| tool_id | path | string (uuid) | yes |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
| arg_bindings | object | no |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | CustomToolRunResponse |
| 422 | Validation Error | HTTPValidationError |
POST /api/orgs/{org_id}/custom-tools/validate
Section titled “POST /api/orgs/{org_id}/custom-tools/validate”Validate Source
Validate Python source code without saving. Requires admin/owner role.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
| env_vars | string[] | no | |
| source_code | string | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | ValidateSourceResponse |
| 422 | Validation Error | HTTPValidationError |