Custom HTTP and Code Tools
Create external API tools or restricted code tools, configure parameters, test execution, and share with teams
Clouisle groups tools into three kinds: Built-in tools (registered by the platform, no creation needed — see Built-in Tools), MCP servers (connect an external MCP Server — see MCP Servers), and Custom tools (created by teams). Custom tools belong to the current team, support the HTTP API, Code, and Database types, and can be configured, tested, and shared with other teams.
Tool Types
The Create Tool menu under Capabilities > Tools offers four entries (MCP servers have their own page):
| Type | Description | Use Cases |
|---|---|---|
| HTTP API | Call external HTTP endpoints, supporting GET/POST/PUT/PATCH/DELETE | Query CRM, create tickets, call third-party APIs |
| Code Tool | Execute Python or JavaScript in a restricted sandbox | Data transformation, text processing, custom calculations |
| Database Tool | Connect to an external relational/cache database, inspect the schema, then run read-only queries | Let the Agent answer questions from business data |
Naming Rules
Tool names can only contain letters, digits, and underscores, and must start with a letter, for example lookup_order. Names must be unique within the team.
Creating HTTP API Tools
- In Capabilities > Tools, select Create Tool > HTTP API.
- Set the tool name, display name, description, and category.
- Configure the HTTP method (default
GET), URL, headers, query parameters, JSON request body, and response path. - Use
{parameter_name}placeholders in the URL, headers, query parameters, and body. - The timeout defaults to
30seconds, range1-300seconds. - After saving, select Run Test and confirm the result path and error behavior.
The URL must be static
A custom HTTP tool's URL allows no placeholders at all: if the URL contains {param}, {{param}}, or a bare {{ / }}, execution is rejected outright (http_tool_url_templates_not_supported). Put variables in the Query Parameters, Request Headers, or Body Template fields — those three support {{param}} substitution.
The URL also passes an SSRF check (a domain/IP allowlist that blocks private addresses); the request is only issued when it passes.
HTTP Tool Configuration Example: Customer Lookup
Name: CRM Lookup
Description: Look up customer information in CRM system
Category: Data
Type: Custom
Endpoint Configuration:
URL: https://api.crm.example.com/customers
Method: GET
Authentication: API Key
API Key Header: X-API-Key
API Key: crm_...
Query Parameters:
customer_id: "{customer_id}"
Timeout: 30 seconds
Input Parameters:
- name: customer_id
type: string
required: true
description: Customer ID to lookup
Response Format:
type: json
schema:
customer_id: string
name: string
email: string
phone: string
status: stringHTTP Tool Configuration Example: Create Ticket (POST)
Name: Create Support Ticket
Description: Create a support ticket in the ticketing system
Category: Communication
Type: Custom
Endpoint Configuration:
URL: https://api.tickets.example.com/tickets
Method: POST
Authentication: Bearer Token
Token: Bearer tk_...
Content-Type: application/json
Timeout: 30 seconds
Input Parameters:
- name: title
type: string
required: true
description: Ticket title
- name: description
type: string
required: true
description: Ticket description
- name: priority
type: enum
required: false
default: medium
options: [low, medium, high, urgent]
description: Ticket priority
- name: assignee
type: string
required: false
description: Assignee email
Response Format:
type: json
schema:
ticket_id: string
status: string
created_at: stringCreating Code Tools
Code tools support Python and JavaScript, executed in a restricted sandbox. Python packages must use exact package==version; JavaScript packages must use package@version. You can configure the command argv, package source address, artifacts, and resource limits.
Default resource limits:
| Resource | Default | Description |
|---|---|---|
| Timeout | 30 seconds | Maximum execution time |
| Disk | 1024MB | Available disk space |
| Standard Output | 256KB | stdout cap |
| Standard Error | 256KB | stderr cap |
Artifact paths must be under /workspace and can be marked optional.

Creating Database Tools
A database tool lets an Agent query an external database directly. The connection details (host, port, credentials, connection URL) stay hidden from the model — the Agent only sees the tool name and description, so the description should say what the database holds and which questions it answers.
- Under Capabilities > Tools, select Create Tool > Database Tool.
- Pick the database type:
postgresql,mysql,redis, ormongodb. - Fill in the connection, using either mode:
- Field mode: host (
host), port (port), database (database), username (username), password (password), SSL. - Connection URL mode: fill in
urldirectly (common for Redis / MongoDB); Redis can also set the logical database indexdb, and MongoDB can set the auth databaseauth_source.
- Field mode: host (
- Set the query timeout (
timeout, default15s, range1-120) and the maximum returned rows (max_limit, default100, range1-1000). - Select Test connection (which calls
POST /api/v1/admin/tools/database/test-connectionand also passes the SSRF check), then save once it succeeds.
Actions the Agent can call
| Action | Parameters | Description |
|---|---|---|
schema (default) | tables (optional list), include_samples (optional) | Read the table structure so the model first learns which tables and columns exist |
query | sql (required), limit (optional, default 50, capped by max_limit) | Execute a read-only SQL statement |
Database tools allow read-only queries only: non-query statements (INSERT / UPDATE / DELETE / DDL) and dangerous keywords are rejected by validate_readonly_sql, and only one statement is permitted per call. Use an HTTP API or code tool when you need writes.
Connection details are stored server-side and never sent to the model, but always use a read-only database account with least privilege. Testing connectivity also requires the tool:create permission.
Editing and Deleting Tools
Editing Custom Tools
- Select the custom tool
- Select Edit
- Modify tool details, endpoint configuration, parameters, or response format
- Test the tool
- Save changes
Deleting Custom Tools
- Select the custom tool
- Select Delete
- Review impact: Agents and workflows using this tool
- Confirm deletion
Deletion Impact
After deleting a custom tool, Agents and workflows referencing this tool will be unable to execute it. Please confirm no dependencies exist before deleting.
Testing Tools
Running Tests
- Select the tool
- Select the Test button
- Enter test parameters
- Select Run Test
Test Result Examples
Tool: Web Search
Test Parameters:
query: "artificial intelligence"
max_results: 5
Status: Success
Response Time: 1.2 seconds
Results:
- title: "Artificial Intelligence - Wikipedia"
url: "https://en.wikipedia.org/wiki/Artificial_intelligence"
snippet: "Artificial intelligence (AI) is intelligence..."
- title: "What is AI? | IBM"
url: "https://www.ibm.com/topics/artificial-intelligence"
snippet: "Artificial intelligence leverages computers..."
Metadata:
total_results: 5
search_time: 0.8s
api_calls: 1Tool: CRM Lookup
Test Parameters:
customer_id: "12345"
Status: Success
Response Time: 0.5 seconds
Response:
{
"customer_id": "12345",
"name": "John Doe",
"email": "john@example.com",
"phone": "+1-555-0123",
"status": "active"
}
Validation: Passed
✓ Response format matches schema
✓ All required fields present
✓ Data types correctCredentials and Sharing
Credentials are stored server-side and injected at call time. Custom tools can be shared with other teams with Read-only or Read & Execute permission.
| Permission | Description |
|---|---|
| Read-only | Receiving team can view tool configuration but cannot execute |
| Read & Execute | Receiving team can view and execute the tool |
Sharing Restrictions
- Built-in tools cannot be deleted or shared
- Shared tools cannot have their owner's configuration modified by the receiving team
The tool API response's share_permission (null when not shared) and shared_with_count fields reflect the sharing state and the number of receiving teams.
Tool Status Management
Tools have two statuses: enabled and disabled:
| Status | Description |
|---|---|
| Enabled | Tool is operational and appears in tool selection |
| Disabled | Tool is disabled and hidden from users |
Tools have a single enabled/disabled state. There are no testing or deprecated statuses. Custom tools can be toggled via POST /api/v1/admin/tools/{tool_id}/toggle.
Failure Handling
HTTP Tool Test Failures
Check the following:
- URL is correct
- TLS certificate is valid
- Authentication credentials are not expired
- Request body JSON format is correct
- Response path matches the actual response structure
Code Tool Test Failures
Check the following:
- Packages use pinned versions (
package==version) - Standard output does not exceed 256KB cap
- Disk usage does not exceed 1024MB cap
- Execution does not exceed timeout (default 30 seconds)
- Artifact paths are under
/workspace
Best Practices
Tool Configuration
✅ Do:
- Test tools before enabling
- Rotate credentials regularly
- Document tool purposes
- Keep tools updated
- Use error handling
❌ Don't:
- Enable untested tools
- Use static credentials forever
- Skip documentation
- Ignore errors
Security
✅ Do:
- Use secure authentication
- Rotate API keys regularly
- Restrict tool access
- Enable audit logging
- Monitor for abuse
- Use HTTPS only
- Validate responses
❌ Don't:
- Use weak authentication
- Use static API keys forever
- Allow unrestricted access
- Disable audit logs
- Ignore suspicious activity
- Allow HTTP connections
- Trust responses blindly
Performance
✅ Do:
- Set appropriate timeouts
- Use caching where possible
- Monitor response times
- Optimize tool calls
- Handle errors gracefully
❌ Don't:
- Use very long timeouts
- Skip caching
- Ignore performance metrics
- Make unnecessary calls
- Ignore errors
API Endpoints
The Tools API supports full CRUD operations, primarily for user-side tool management. See Tools API for details.
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/tools | List all tools (supports pagination, search, filters) |
| GET | /api/v1/tools/id/{tool_id} | Get tool details by ID |
| GET | /api/v1/tools/name/{tool_name}?team_id={team_id} | Get tool details by name |
| POST | /api/v1/tools/test | Single test execution |
| POST | /api/v1/tools/execute-code | Run code directly in sandbox |
| POST | /api/v1/tools/database/test-connection | Test database-tool connectivity (requires tool:create; also mounted under /api/v1/admin/tools) |
| POST | /api/v1/tools?team_id={team_id} | Create custom tool |
| PUT | /api/v1/tools/{tool_id} | Update tool configuration |
| DELETE | /api/v1/tools/{tool_id} | Delete custom tool |
Admin Endpoints
Admin endpoints live under /api/v1/admin/tools and require admin:capability:* permissions:
# List tools (admin)
tools = api.get("/api/v1/admin/tools", params={"page": 1, "page_size": 20})
# Get filter options
filters = api.get("/api/v1/admin/tools/filters")
# Test a tool (builtin, custom, or MCP)
result = api.post("/api/v1/admin/tools/test", json={
"tool_name": "web_search",
"arguments": {"query": "artificial intelligence", "max_results": 5}
})
# Execute code directly
code_result = api.post("/api/v1/admin/tools/execute-code", json={
"language": "python",
"code": "return params['a'] + params['b']",
"params": {"a": 1, "b": 2}
})Admin endpoints POST /api/v1/tools/web_search/call and GET /api/v1/tools/web_search/usage do not exist. Tool configuration (e.g. TAVILY_API_KEY) is managed via GET/POST/PUT/DELETE /api/v1/admin/tools/config[/{tool_name}].
Permissions
All endpoints require an authenticated JWT user session:
| Permission | Description |
|---|---|
tool:read | View tools |
tool:create | Create tools |
tool:update | Update tools |
tool:delete | Delete tools |
tool:execute | Execute/test tools |
Custom Tool Naming Conventions & Chat Status Visibility
When an Agent calls tools during reasoning, the top Chain of Thought header automatically surfaces the action without requiring users to expand the collapsible panel. Follow these naming conventions to ensure intuitive status display:
1. Recommended Verb Prefixes
| Action Type | Recommended Prefix / Keywords | CoT Header Display |
|---|---|---|
| Query / Retrieval | query_, fetch_, get_, search_, find_, check_ | Querying {tool}... |
| Sending / Notifications | send_, post_, push_, notify_, mail_ | Sending {tool}... |
| Creation | create_, add_, insert_, new_, build_ | Creating {tool}... |
| External API / Requests | api_, http_, rest_, request_, or input has url/endpoint | Requesting {tool}... |
| Computation / Analysis | calc_, math_, count_, analyze_, stat_ | Calculating... |
| Artifacts & Downloads | artifact, artifacts, contains Create Download Link | Collecting artifacts... |
| Files / Documents | read_, write_, open_file, save_file | Reading / Editing file... |
2. Display Name Tips
- Provide a friendly Display Name: If configured (e.g.
Fetch Stock QuotesorSend Slack Notification), the CoT header directly uses this name for status rendering. - Automatic Identifier Beautification: Raw identifiers like
fetch_user_ordersorsyncCrmAccountare automatically converted to clean phrases (e.g.Querying Fetch User Orders...). - Parallel Call Aggregation: When multiple tools execute simultaneously, the header aggregates them into
Calling {N} tools in parallel...to preserve clean UI presentation.
Troubleshooting
Tool Call Failed
- Check tool configuration: Verify credentials, endpoint URL, test connectivity
- Check audit logs: Review audit log entries for the tool's team
- Common errors:
- Authentication failed: Invalid credentials
- Timeout: Increase timeout or check endpoint
- Invalid parameters: Check parameter format
- Test tool: Use the test panel to review results
Slow Response
- Use the tool test panel to measure response time
- Optimize: increase timeout, reduce data transfer, optimize endpoint
- Check external service status for outages
Related Documentation
- Built-in Tools — Enable time, math, web, file, and media system capabilities
- MCP Services — Connect MCP Servers via stdio, SSE, or HTTP
- Skills & Packages — Import reusable Skill packages and manage resources
- Tools API — Complete API endpoint reference
How is this guide?