ClouisleClouisle

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):

TypeDescriptionUse Cases
HTTP APICall external HTTP endpoints, supporting GET/POST/PUT/PATCH/DELETEQuery CRM, create tickets, call third-party APIs
Code ToolExecute Python or JavaScript in a restricted sandboxData transformation, text processing, custom calculations
Database ToolConnect to an external relational/cache database, inspect the schema, then run read-only queriesLet 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

  1. In Capabilities > Tools, select Create Tool > HTTP API.
  2. Set the tool name, display name, description, and category.
  3. Configure the HTTP method (default GET), URL, headers, query parameters, JSON request body, and response path.
  4. Use {parameter_name} placeholders in the URL, headers, query parameters, and body.
  5. The timeout defaults to 30 seconds, range 1-300 seconds.
  6. 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

CRM Lookup Tool Configuration
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: string

HTTP Tool Configuration Example: Create Ticket (POST)

Create Support Ticket Tool Configuration
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: string

Creating 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:

ResourceDefaultDescription
Timeout30 secondsMaximum execution time
Disk1024MBAvailable disk space
Standard Output256KBstdout cap
Standard Error256KBstderr cap

Artifact paths must be under /workspace and can be marked optional.

Create an HTTP tool
Create an HTTP tool

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.

  1. Under Capabilities > Tools, select Create Tool > Database Tool.
  2. Pick the database type: postgresql, mysql, redis, or mongodb.
  3. 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 url directly (common for Redis / MongoDB); Redis can also set the logical database index db, and MongoDB can set the auth database auth_source.
  4. Set the query timeout (timeout, default 15s, range 1-120) and the maximum returned rows (max_limit, default 100, range 1-1000).
  5. Select Test connection (which calls POST /api/v1/admin/tools/database/test-connection and also passes the SSRF check), then save once it succeeds.

Actions the Agent can call

ActionParametersDescription
schema (default)tables (optional list), include_samples (optional)Read the table structure so the model first learns which tables and columns exist
querysql (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

  1. Select the custom tool
  2. Select Edit
  3. Modify tool details, endpoint configuration, parameters, or response format
  4. Test the tool
  5. Save changes

Deleting Custom Tools

  1. Select the custom tool
  2. Select Delete
  3. Review impact: Agents and workflows using this tool
  4. 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

  1. Select the tool
  2. Select the Test button
  3. Enter test parameters
  4. Select Run Test

Test Result Examples

Web Search Test Result
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: 1
CRM Lookup Test Result
Tool: 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 correct

Credentials 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.

PermissionDescription
Read-onlyReceiving team can view tool configuration but cannot execute
Read & ExecuteReceiving 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:

StatusDescription
EnabledTool is operational and appears in tool selection
DisabledTool 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.

MethodPathDescription
GET/api/v1/toolsList 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/testSingle test execution
POST/api/v1/tools/execute-codeRun code directly in sandbox
POST/api/v1/tools/database/test-connectionTest 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:

PermissionDescription
tool:readView tools
tool:createCreate tools
tool:updateUpdate tools
tool:deleteDelete tools
tool:executeExecute/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:

Action TypeRecommended Prefix / KeywordsCoT Header Display
Query / Retrievalquery_, fetch_, get_, search_, find_, check_Querying {tool}...
Sending / Notificationssend_, post_, push_, notify_, mail_Sending {tool}...
Creationcreate_, add_, insert_, new_, build_Creating {tool}...
External API / Requestsapi_, http_, rest_, request_, or input has url/endpointRequesting {tool}...
Computation / Analysiscalc_, math_, count_, analyze_, stat_Calculating...
Artifacts & Downloadsartifact, artifacts, contains Create Download LinkCollecting artifacts...
Files / Documentsread_, write_, open_file, save_fileReading / Editing file...

2. Display Name Tips

  • Provide a friendly Display Name: If configured (e.g. Fetch Stock Quotes or Send Slack Notification), the CoT header directly uses this name for status rendering.
  • Automatic Identifier Beautification: Raw identifiers like fetch_user_orders or syncCrmAccount are 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

  1. Check tool configuration: Verify credentials, endpoint URL, test connectivity
  2. Check audit logs: Review audit log entries for the tool's team
  3. Common errors:
    • Authentication failed: Invalid credentials
    • Timeout: Increase timeout or check endpoint
    • Invalid parameters: Check parameter format
  4. Test tool: Use the test panel to review results

Slow Response

  1. Use the tool test panel to measure response time
  2. Optimize: increase timeout, reduce data transfer, optimize endpoint
  3. Check external service status for outages
  • 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?

On this page