Your app's own tools

Give an assistant an action on your server: the assistant's Connect tab → Add a tool. A tool has a name (search_products), what it does (the assistant reads this to decide when to use it), the address to call, and its parameters as JSON Schema:

{ "type": "object",
  "properties": { "query": { "type": "string" }, "max": { "type": "integer", "maximum": 20 } },
  "required": ["query"] }

The call

When the assistant uses it, the host sends:

POST https://api.example.com/vexyline/tools
X-Vexyline-Timestamp: 2026-11-21T10:00:00.000Z
X-Vexyline-Signature: sha256=5f2c…

{ "tool": "search_products", "arguments": { "query": "silk", "max": 5 },
  "conversation": { "id": "c_…", "user": "customer-1842", "name": "Ana" } }

Whatever you answer (JSON or text) is what the assistant reads. Answer within 20 seconds.

Who is asking

conversation.id is the conversation your server started with the assistant API (or agent:<key> when an agent called through MCP). Look up who the person is in your own records, by that id. Don't trust anything the model put in the arguments. conversation.user repeats what your server gave when it started the conversation. Conversations started from the website widget carry the widget's own visitor id instead.

Check the signature

The signature is HMAC-SHA256(secret, timestamp + "." + body) in hex, over the raw body, with the secret shown (once) when you added the tool. Each tool has its own secret. The timestamp is an RFC 3339 time. Refuse calls whose signature does not match, or whose timestamp is more than five minutes away.

import crypto from 'node:crypto';

export function fromVexyline(req, rawBody, secret) {
  const ts = req.headers['x-vexyline-timestamp'];
  const sig = String(req.headers['x-vexyline-signature'] || '').replace(/^sha256=/, '');
  if (!ts || !(Math.abs(Date.now() - Date.parse(ts)) <= 5 * 60 * 1000)) return false;
  const want = crypto.createHmac('sha256', secret).update(`${ts}.${rawBody}`).digest('hex');
  return sig.length === want.length && crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(want));
}

On Vexyline Cloud the address must be https and public.

A complete example, with five tools, guests and customers: Velora's apps/api/src/services/support/.