Let the assistant act in your app
Give your Masheev assistant typed tools it can call during a conversation. They run in your app, can return a card or quick replies, and can wait for the person to approve. Developer access is in beta.
Card required. No charge if you cancel within 14 days. Available to businesses in the UK and US.
- Zod or JSON Schema
- Runs in your app
- Optional approval
import { clientTool, useMasheev } from "@masheev/embed-sdk/react";
import { z } from "zod";
const checkOrder = clientTool({
name: "check_order_status",
description: "Look up the status of a customer's order",
parameters: z.object({ orderId: z.string() }),
needsApproval: false,
execute: async ({ orderId }) => {
const order = await myApi.getOrder(orderId);
return {
success: true,
display: "card",
components: {
card: {
title: `Order ${order.id}`,
fields: [{ label: "Status", value: order.status }],
},
},
};
},
});
// Pass tools to the assistant
useMasheev({ inboxId: "inb_123", tools: [checkOrder] });What are AI agent tools (function calling)?
Tools are functions you give the assistant so it can act as well as answer. During a conversation it decides when a tool is needed, calls it with validated arguments and uses the result to continue: looking up an order, booking a slot or updating a record.
In Masheev you define client tools with the clientTool helper, typed with Zod or JSON Schema. Their execute function runs in your app and can return text, a card or quick replies, with optional approval for sensitive actions. The agent can also use server-side actions and connected integrations on the backend.
How tools work
Typed with Zod or JSON Schema
Define a tool's name, description and parameters with Zod or plain JSON Schema. The assistant calls it with validated arguments.
Runs in your app
Your execute function runs in the browser. It can call your API, look up a record or book a slot, then return the result to the conversation.
Returns cards and quick replies
A result can appear as text, a structured card or quick-reply buttons, so people see the order or booking itself rather than a paragraph about it.
Approval before it runs
Set needsApproval on a tool and the person confirms before it runs. Use it for anything that changes data or costs money.
Server-side actions
Alongside client tools, the agent can use server-side actions and connected integrations, such as calendars, from the backend.
Results are data, not instructions
Tool results are sanitized and passed to the model as data, with size and rate limits, which guards against prompt injection.
Frequently asked questions
Give the assistant something to do
Define typed tools, decide which ones need approval, and let the assistant handle the lookups and bookings.
Card required. No charge if you cancel within 14 days. Available to businesses in the UK and US.