Skip to main content
Custom tools let Visito call your backend when the AI needs live business data or needs to trigger an approved action. Common examples include looking up an order status, creating a support ticket, checking loyalty points, or updating a customer profile. All endpoints use the M2M base URL:
Prefer a guided setup? Start with Connect your agent to an order system. Developers can use the runnable endpoint example alongside this API reference.

Tool Model

A tool describes what the AI can call, the JSON input it should provide, and the HTTP endpoint Visito will invoke.
parameters should be a JSON Schema object. Visito uses it to decide when the tool is relevant and to shape the input sent to your endpoint.

What Visito Sends to Your Endpoint

For a GET tool, Visito converts tool arguments into query parameters. Primitive values are sent as strings; objects and arrays are JSON-encoded.
For a POST tool, Visito sends the arguments together with conversation metadata:
Your endpoint should return a JSON object with only the fields the assistant needs. Non-object JSON responses are normalized into an object before the result is returned to the assistant. Configured authentication is added by Visito:
  • bearer sends Authorization: Bearer <configured secret>.
  • api_key sends the configured secret in auth.headerName.
  • Stored secrets are redacted from invocation logs and are never returned by the API.

Example Conversation and Tool-Call Receipt

Assume get_order_status is active, read only, and enabled in Playground. The following sequence shows what the customer, Visito, and an operator each see.

1. The customer asks for live information

The assistant recognizes that the answer requires current order data and calls get_order_status with:

2. Your backend returns a structured result

Return facts rather than customer-facing prose. This makes it easier for the assistant to use the result naturally in the customer’s language and conversation context.

3. Visito records an operator-only receipt

While the call is running, Playground can show:
After a successful response, that activity becomes:
In a live conversation, the Conversations timeline currently displays the more compact receipt Action completed. The customer does not receive either receipt or the raw backend response. Open Build → Tool calls → Activity logs for the detailed execution record:

4. The assistant answers the customer

The receipt confirms that an action was attempted; it is not the customer response. If the endpoint fails, the receipt changes to Action failed and the activity log contains the error. The assistant should not claim the lookup or mutation succeeded when the tool failed.

Create a Tool

Requires the tools:write scope.
Secrets are not returned after creation. Responses only include whether auth is configured and the last four characters when available.

Create and Update Rules

  • name must start with a letter or underscore, contain only letters, numbers, and underscores, and be at most 64 characters.
  • description is required and can be at most 2000 characters.
  • parameters must be a JSON Schema object. Visito sets type: "object" and additionalProperties: false when they are omitted.
  • endpoint.url must be an HTTP or HTTPS URL.
  • endpoint.method must be GET or POST.
  • endpoint.timeoutMs, when provided, must be an integer from 500 to 30000.
  • auth.type must be none, bearer, or api_key.
  • allowInPlayground defaults to false. Active read-only tools remain eligible in Playground; this flag permits mutating tools there. Playground executes the real endpoint.
  • active: true is required for normal agent calls, including Playground; it also makes the tool available for live execution. The direct test endpoint can execute inactive definitions.
  • readOnly declares behavior; it does not prevent your endpoint from changing data.
  • Omitting auth.value during a patch preserves the existing secret. Setting auth.type to none removes it.

List and Read Tools

Requires tools:read.
Read one tool:

Update or Delete a Tool

Update one or more fields:
Requires tools:write.
Delete a tool:

Test a Tool

Use the test endpoint before enabling a tool in production conversations.
Requires tools:execute.

Execution Logs

Use logs to audit AI tool calls and diagnose backend failures.
Requires tools:logs:read.
Read one log:

Endpoint Requirements

  • Your endpoint must be reachable from Visito’s backend.
  • Supported methods are GET and POST.
  • Return JSON whenever possible.
  • Return a 2xx response for success. A non-2xx response is recorded as custom_tool_http_error.
  • Keep tool responses concise and structured for AI use.
  • Use readOnly: true for lookup tools that should never mutate state.
  • Use tool-specific auth secrets instead of broad internal credentials.
  • Make mutating endpoints idempotent using a business identifier from arguments or meta.eventId.
  • Do not rely on the assistant to hide sensitive fields returned by your endpoint; omit secrets and unnecessary personal data from the response.

Production Checklist

  1. Create the tool with active: false.
  2. Test representative success, validation, timeout, and upstream-failure cases.
  3. Confirm request headers are redacted in Build → Tool calls → Activity logs.
  4. Keep the response small and stable so the assistant can interpret it reliably.
  5. Set readOnly: false for mutations and require your own authorization and idempotency checks.
  6. Enable the tool, then review invocation logs after the first real conversations.