package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.waterr.ai/v1/custom-functions"
payload := strings.NewReader("{\n \"name\": \"lookup_account\",\n \"description\": \"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.\",\n \"parameters_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"The participant's account ID (e.g. cus_XXXX).\"\n }\n },\n \"required\": [\n \"account_id\"\n ]\n },\n \"execution_mode\": \"webhook\",\n \"webhook_url\": \"https://your-app.com/waterr/tools/lookup_account\",\n \"webhook_secret\": \"whsec_8f2c9e7b5d4a3e1c2f5d8b6e9a4c7f1e3b6d8a2c5e7f9b1d4a6c8e2f5b7d9a3c\",\n \"timeout_ms\": 8000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.waterr.ai/v1/custom-functions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"lookup_account\",\n \"description\": \"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.\",\n \"parameters_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"The participant's account ID (e.g. cus_XXXX).\"\n }\n },\n \"required\": [\n \"account_id\"\n ]\n },\n \"execution_mode\": \"webhook\",\n \"webhook_url\": \"https://your-app.com/waterr/tools/lookup_account\",\n \"webhook_secret\": \"whsec_8f2c9e7b5d4a3e1c2f5d8b6e9a4c7f1e3b6d8a2c5e7f9b1d4a6c8e2f5b7d9a3c\",\n \"timeout_ms\": 8000\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.waterr.ai/v1/custom-functions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"lookup_account\",\n \"description\": \"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.\",\n \"parameters_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"The participant's account ID (e.g. cus_XXXX).\"\n }\n },\n \"required\": [\n \"account_id\"\n ]\n },\n \"execution_mode\": \"webhook\",\n \"webhook_url\": \"https://your-app.com/waterr/tools/lookup_account\",\n \"webhook_secret\": \"whsec_8f2c9e7b5d4a3e1c2f5d8b6e9a4c7f1e3b6d8a2c5e7f9b1d4a6c8e2f5b7d9a3c\",\n \"timeout_ms\": 8000\n}"
response = http.request(request)
puts response.read_body
{ "data": { "id": "4f8a6c50-9d3b-4c1f-9c0a-7a3b6e2d1f10", "membership_id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "name": "lookup_account", "description": "Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.", "parameters_schema": { "type": "object", "properties": { "account_id": { "type": "string" } }, "required": [ "account_id" ] }, "execution_mode": "webhook", "webhook_url": "https://your-app.com/waterr/tools/lookup_account", "has_webhook_secret": true, "timeout_ms": 8000, "tool_spec": { "type": "function", "function": { "name": "lookup_account", "description": "Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.", "parameters": { "type": "object", "properties": { "account_id": { "type": "string" } }, "required": [ "account_id" ] } } }, "created_at": "2026-06-18T12:34:56.000Z", "updated_at": "2026-06-18T12:34:56.000Z" }}
{
"message": "Invalid payload",
"errors": [
"name must be a string matching ^[a-zA-Z0-9_-]{1,64}$ (OpenAI tool-name rule)",
"webhook_url is required when execution_mode='webhook' (the default)"
]
}
{
"message": "A custom function with that name already exists on this account"
}
Tools
Create a tool definition
Register a tool on your account. Define once, then attach to any number of scenarios with Attach a tool to a scenario. Editing the definition later (Update a tool) propagates to every attached scenario instantly.
POST
/
custom-functions
Create a tool
curl --request POST \ --url https://api.waterr.ai/v1/custom-functions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data @- <<EOF{ "name": "lookup_account", "description": "Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.", "parameters_schema": { "type": "object", "properties": { "account_id": { "type": "string", "description": "The participant's account ID (e.g. cus_XXXX)." } }, "required": [ "account_id" ] }, "execution_mode": "webhook", "webhook_url": "https://your-app.com/waterr/tools/lookup_account", "webhook_secret": "whsec_8f2c9e7b5d4a3e1c2f5d8b6e9a4c7f1e3b6d8a2c5e7f9b1d4a6c8e2f5b7d9a3c", "timeout_ms": 8000}EOF
import requests
url = "https://api.waterr.ai/v1/custom-functions"
payload = {
"name": "lookup_account",
"description": "Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.",
"parameters_schema": {
"type": "object",
"properties": { "account_id": {
"type": "string",
"description": "The participant's account ID (e.g. cus_XXXX)."
} },
"required": ["account_id"]
},
"execution_mode": "webhook",
"webhook_url": "https://your-app.com/waterr/tools/lookup_account",
"webhook_secret": "whsec_8f2c9e7b5d4a3e1c2f5d8b6e9a4c7f1e3b6d8a2c5e7f9b1d4a6c8e2f5b7d9a3c",
"timeout_ms": 8000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'lookup_account',
description: 'Fetch the participant\'s CRM record so you can reference their plan, MRR, and last contact date.',
parameters_schema: {
type: 'object',
properties: {
account_id: {type: 'string', description: 'The participant\'s account ID (e.g. cus_XXXX).'}
},
required: ['account_id']
},
execution_mode: 'webhook',
webhook_url: 'https://your-app.com/waterr/tools/lookup_account',
webhook_secret: 'whsec_8f2c9e7b5d4a3e1c2f5d8b6e9a4c7f1e3b6d8a2c5e7f9b1d4a6c8e2f5b7d9a3c',
timeout_ms: 8000
})
};
fetch('https://api.waterr.ai/v1/custom-functions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.waterr.ai/v1/custom-functions"
payload := strings.NewReader("{\n \"name\": \"lookup_account\",\n \"description\": \"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.\",\n \"parameters_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"The participant's account ID (e.g. cus_XXXX).\"\n }\n },\n \"required\": [\n \"account_id\"\n ]\n },\n \"execution_mode\": \"webhook\",\n \"webhook_url\": \"https://your-app.com/waterr/tools/lookup_account\",\n \"webhook_secret\": \"whsec_8f2c9e7b5d4a3e1c2f5d8b6e9a4c7f1e3b6d8a2c5e7f9b1d4a6c8e2f5b7d9a3c\",\n \"timeout_ms\": 8000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.waterr.ai/v1/custom-functions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"lookup_account\",\n \"description\": \"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.\",\n \"parameters_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"The participant's account ID (e.g. cus_XXXX).\"\n }\n },\n \"required\": [\n \"account_id\"\n ]\n },\n \"execution_mode\": \"webhook\",\n \"webhook_url\": \"https://your-app.com/waterr/tools/lookup_account\",\n \"webhook_secret\": \"whsec_8f2c9e7b5d4a3e1c2f5d8b6e9a4c7f1e3b6d8a2c5e7f9b1d4a6c8e2f5b7d9a3c\",\n \"timeout_ms\": 8000\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.waterr.ai/v1/custom-functions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"lookup_account\",\n \"description\": \"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.\",\n \"parameters_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"The participant's account ID (e.g. cus_XXXX).\"\n }\n },\n \"required\": [\n \"account_id\"\n ]\n },\n \"execution_mode\": \"webhook\",\n \"webhook_url\": \"https://your-app.com/waterr/tools/lookup_account\",\n \"webhook_secret\": \"whsec_8f2c9e7b5d4a3e1c2f5d8b6e9a4c7f1e3b6d8a2c5e7f9b1d4a6c8e2f5b7d9a3c\",\n \"timeout_ms\": 8000\n}"
response = http.request(request)
puts response.read_body
{ "data": { "id": "4f8a6c50-9d3b-4c1f-9c0a-7a3b6e2d1f10", "membership_id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "name": "lookup_account", "description": "Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.", "parameters_schema": { "type": "object", "properties": { "account_id": { "type": "string" } }, "required": [ "account_id" ] }, "execution_mode": "webhook", "webhook_url": "https://your-app.com/waterr/tools/lookup_account", "has_webhook_secret": true, "timeout_ms": 8000, "tool_spec": { "type": "function", "function": { "name": "lookup_account", "description": "Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.", "parameters": { "type": "object", "properties": { "account_id": { "type": "string" } }, "required": [ "account_id" ] } } }, "created_at": "2026-06-18T12:34:56.000Z", "updated_at": "2026-06-18T12:34:56.000Z" }}
{
"message": "Invalid payload",
"errors": [
"name must be a string matching ^[a-zA-Z0-9_-]{1,64}$ (OpenAI tool-name rule)",
"webhook_url is required when execution_mode='webhook' (the default)"
]
}
{
"message": "A custom function with that name already exists on this account"
}
A tool the LLM can call mid-meeting. Defined once on your account, attached to one or more scenarios.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Waterr.ai","colors":{"primary":"#2563EB","light":"#60A5FA","dark":"#1D4ED8"},"logo":{"light":"https://mintcdn.com/waterr/BNJBdkg3zY1H6whp/logo/header-logo-light.png?fit=max\u0026auto=format\u0026n=BNJBdkg3zY1H6whp\u0026q=85\u0026s=d56ffed321f9f4cb446acc732ed80c98","dark":"https://mintcdn.com/waterr/BNJBdkg3zY1H6whp/logo/header-logo-dark.png?fit=max\u0026auto=format\u0026n=BNJBdkg3zY1H6whp\u0026q=85\u0026s=cdf2a974c5fc6e2dc9193b11d6ec9333","href":"https://waterr.ai"},"favicon":"https://mintcdn.com/waterr/BNJBdkg3zY1H6whp/favicon.png?fit=max\u0026auto=format\u0026n=BNJBdkg3zY1H6whp\u0026q=85\u0026s=32a4b61a9ab75ad93a0b27188033fba7","api":{"openapi":["openapi.yaml"],"playground":{"display":"interactive"}},"appearance":{"default":"light"},"background":{"color":{"dark":"#1A1A18"}},"navbar":{"links":[{"href":"https://waterr.ai","label":"Homepage"},{"icon":"github","href":"https://github.com/waterrai","label":"GitHub"}],"primary":{"type":"button","label":"Playground","href":"https://waterr.ai/auth"}},"footer":{"socials":{"x":"https://x.com/waterr_ai","linkedin":"https://www.linkedin.com/company/waterrai"}},"fonts":{"family":"Inter","weight":400,"source":"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800\u0026display=swap","format":"woff2"},"styling":{"latex":true},"navigation":{"global":{},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"waterr","hasAudioNarration":false,"actualSubdomain":"waterr","customDomains":["docs.waterr.ai"],"gitSource":{"type":"github","owner":"thinkharshh","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad3ad1e9d6722b31b0346b6","collectionId":"be67fcb1-c2fa-4a97-a080-7c4d12f57f6e","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad3ad1e9d6722b31b0346b6"},"entitlements":{},"buildId":"6ad3ad1e9d6722b31b0346b6","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"default","tag":"API Reference","count":105},{"language":"default","tag":"Help Center","count":33},{"language":"default","tag":"Capabilities","count":15},{"language":"default","tag":"Getting Started","count":11},{"language":"default","tag":"Tools","count":11},{"language":"default","tag":"Guardrails","count":10},{"language":"default","tag":"Meeting Skills","count":10},{"language":"default","tag":"Meetings","count":9},{"language":"default","tag":"Memory","count":9},{"language":"default","tag":"Avatars","count":7}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--plusone-font:\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\",\n Roboto, \"Helvetica Neue\", Arial, sans-serif;--section-heading-color:#111827;--section-rule-color:rgba(17, 24, 39, 0.08)}:root.dark{--section-heading-color:#f3f4f6;--section-rule-color:rgba(255, 255, 255, 0.08)}body,button,html,input,select,textarea{font-family:var(--plusone-font)!important}#navigation-items .sidebar-group-header{gap:.625rem!important;margin-bottom:.5rem!important;color:var(--section-heading-color)!important}#navigation-items .sidebar-group-header .sidebar-title,#navigation-items .sidebar-group-header .sidebar-title *{font-size:.875rem!important;font-weight:600!important;line-height:1.25rem!important;letter-spacing:-.005em}#navigation-items .sidebar-group-header .sidebar-group-icon{width:1rem!important;height:1rem!important}#navigation-items>div+div{margin-top:1.25rem!important;padding-top:1.25rem;border-top:1px solid var(--section-rule-color)}"}],"page":{"pagePath":"api-reference/endpoint/post-custom-functions","slug":"/api-reference/endpoint/post-custom-functions","pageMetadata":{"title":"Create a tool definition","openapi":"POST /custom-functions","description":"Register a tool on your account. Define once, then attach to any number of scenarios with [`Attach a tool to a scenario`](#tag/Scenario-Tools/operation/AttachToolToScenario). Editing the definition later ([`Update a tool`](#tag/Tools/operation/UpdateTool)) propagates to every attached scenario instantly.","href":"/api-reference/endpoint/post-custom-functions"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Register a tool on your account. Define once, then attach to any number of scenarios with \", _jsx(_components.a, {\n href: \"#tag/Scenario-Tools/operation/AttachToolToScenario\",\n children: _jsx(_components.code, {\n children: \"Attach a tool to a scenario\"\n })\n }), \". Editing the definition later (\", _jsx(_components.a, {\n href: \"#tag/Tools/operation/UpdateTool\",\n children: _jsx(_components.code, {\n children: \"Update a tool\"\n })\n }), \") propagates to every attached scenario instantly.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a tool definition","openapi":"POST /custom-functions","description":"Register a tool on your account. Define once, then attach to any number of scenarios with [`Attach a tool to a scenario`](#tag/Scenario-Tools/operation/AttachToolToScenario). Editing the definition later ([`Update a tool`](#tag/Tools/operation/UpdateTool)) propagates to every attached scenario instantly.","href":"/api-reference/endpoint/post-custom-functions"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"CreateTool","summary":"Create a tool","description":"Register a tool on your account. Define once, then attach to any number of scenarios with [`Attach a tool to a scenario`](#tag/Scenario-Tools/operation/AttachToolToScenario). Editing the definition later ([`Update a tool`](#tag/Tools/operation/UpdateTool)) propagates to every attached scenario instantly.","tags":["Tools"],"security":["b4562bb8-250a-4069-964b-0bf1382c0167"],"requestBody":"71c9c625-55df-4c28-a8f4-a2376e456080","responses":{"201":"941d6d24-7baa-453a-9e3c-8888092c12ad","400":"60c6d394-3e11-439c-a981-da2adf6d3d05","401":"0a67d246-14ad-4b86-9c02-d5e6db9f3be9","409":"119f8e70-d982-484e-87e7-fa673ef1c1bb","500":"b0ab69eb-31c1-48d2-98eb-a62b25c818d0"},"method":"post","type":"path","servers":["284a7c97-227c-464e-b509-1fc6a1c58859"],"path":"/custom-functions","baseUrlOptions":["https://api.waterr.ai/v1"],"title":"Create a tool","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","description"],"properties":{"name":{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]{1,64}$","description":"Function name the LLM calls. Letters, digits, `_`, `-`. Max 64. Unique per account.","example":"lookup_account","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"description":{"type":"string","description":"One-sentence prompt the LLM reads to decide when to call this tool.","example":"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.","isRequired":true,"uniqueKey":"description","typeLabel":"string"},"parameters_schema":{"type":"object","description":"JSON Schema for the arguments. Top-level `type` must be `\"object\"`.","default":{"type":"object","properties":{},"required":[]},"example":{"type":"object","properties":{"account_id":{"type":"string","description":"The participant's account ID (e.g. cus_XXXX)."}},"required":["account_id"]},"uniqueKey":"parameters_schema","typeLabel":"object"},"execution_mode":{"type":"string","enum":["webhook","client"],"default":"webhook","description":"`webhook` — we POST the call to `webhook_url`. `client` — your frontend handles it.","example":"webhook","uniqueKey":"execution_mode","typeLabel":"enum\u003cstring>"},"webhook_url":{"type":"string","format":"uri","description":"HTTP(S) endpoint for tool calls. Required when `execution_mode = \"webhook\"`.","example":"https://your-app.com/waterr/tools/lookup_account","uniqueKey":"webhook_url","typeLabel":"string\u003curi>"},"webhook_secret":{"type":"string","description":"HMAC-SHA256 secret. Signs every webhook request as `X-Waterr-Signature: sha256=\u003chex>`. Never returned after creation.","example":"whsec_8f2c9e7b5d4a3e1c2f5d8b6e9a4c7f1e3b6d8a2c5e7f9b1d4a6c8e2f5b7d9a3c","uniqueKey":"webhook_secret","typeLabel":"string"},"timeout_ms":{"type":"integer","minimum":1000,"maximum":30000,"default":10000,"description":"Webhook response timeout in ms. Range 1000–30000.","example":8000,"uniqueKey":"timeout_ms","typeLabel":"integer"},"on_call":{"type":"string","enum":["generate_filler","static_filler","silent","passthrough"],"default":"silent","description":"What the persona does while the tool runs. See [Conversational modes](/api-reference/custom-functions#conversational-modes).","example":"static_filler","uniqueKey":"on_call","typeLabel":"enum\u003cstring>"},"static_filler":{"type":"string","description":"Phrase to speak during the tool call. **Required** when `on_call = \"static_filler\"`, **forbidden** otherwise.","example":"Sure, let me grab that for you.","uniqueKey":"static_filler","typeLabel":"string"},"on_resolve":{"type":"string","enum":["generate_response","response_in_result","add_to_context","fire_and_forget"],"default":"generate_response","description":"What to do with the result after the tool returns.","example":"generate_response","uniqueKey":"on_resolve","typeLabel":"enum\u003cstring>"}},"uniqueKey":"","typeLabel":"object"},"example":{"name":"lookup_account","description":"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.","parameters_schema":{"type":"object","properties":{"account_id":{"type":"string","description":"The participant's account ID (e.g. cus_XXXX)."}},"required":["account_id"]},"execution_mode":"webhook","webhook_url":"https://your-app.com/waterr/tools/lookup_account","webhook_secret":"whsec_8f2c9e7b5d4a3e1c2f5d8b6e9a4c7f1e3b6d8a2c5e7f9b1d4a6c8e2f5b7d9a3c","timeout_ms":8000},"examples":{"Example":{"title":"Example","value":{"name":"lookup_account","description":"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.","parameters_schema":{"type":"object","properties":{"account_id":{"type":"string","description":"The participant's account ID (e.g. cus_XXXX)."}},"required":["account_id"]},"execution_mode":"webhook","webhook_url":"https://your-app.com/waterr/tools/lookup_account","webhook_secret":"whsec_8f2c9e7b5d4a3e1c2f5d8b6e9a4c7f1e3b6d8a2c5e7f9b1d4a6c8e2f5b7d9a3c","timeout_ms":8000}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"941d6d24-7baa-453a-9e3c-8888092c12ad":{"description":"Tool created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"A tool the LLM can call mid-meeting. Defined once on your account, attached to one or more scenarios.","required":["id","name","description","parameters_schema","execution_mode","has_webhook_secret","timeout_ms","tool_spec"],"properties":{"id":{"type":"string","format":"uuid","description":"Tool UUID. Generated by the server.","example":"4f8a6c50-9d3b-4c1f-9c0a-7a3b6e2d1f10","isRequired":true,"uniqueKey":"data.id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]{1,64}$","description":"Function name the LLM calls. Letters, digits, `_`, `-`. Max 64. Unique per account.","example":"lookup_account","isRequired":true,"uniqueKey":"data.name","typeLabel":"string"},"description":{"type":"string","description":"One-sentence prompt that tells the LLM when to call this tool. Shown verbatim to the model.","example":"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.","isRequired":true,"uniqueKey":"data.description","typeLabel":"string"},"parameters_schema":{"type":"object","description":"JSON Schema for the arguments. Top-level type must be `\"object\"`.","default":{"type":"object","properties":{},"required":[]},"example":{"type":"object","properties":{"account_id":{"type":"string","description":"The participant's account ID (e.g. cus_XXXX)."}},"required":["account_id"]},"isRequired":true,"uniqueKey":"data.parameters_schema","typeLabel":"object"},"execution_mode":{"type":"string","enum":["webhook","client"],"default":"webhook","description":"`webhook` — we POST the call to `webhook_url` and use the response. `client` — your frontend handles the call.","example":"webhook","isRequired":true,"uniqueKey":"data.execution_mode","typeLabel":"enum\u003cstring>"},"has_webhook_secret":{"type":"boolean","description":"True if a signing secret is set. The secret itself is never returned — only this flag.","example":true,"isRequired":true,"uniqueKey":"data.has_webhook_secret","typeLabel":"boolean"},"timeout_ms":{"type":"integer","minimum":1000,"maximum":30000,"default":10000,"description":"Max wait for your webhook to respond, in ms. Range 1000–30000.","example":8000,"isRequired":true,"uniqueKey":"data.timeout_ms","typeLabel":"integer"},"tool_spec":{"type":"object","description":"Read-only. The OpenAI-shaped spec the LLM sees: `{ type, function: { name, description, parameters } }`.","example":{"type":"function","function":{"name":"lookup_account","description":"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.","parameters":{"type":"object","properties":{"account_id":{"type":"string"}},"required":["account_id"]}}},"isRequired":true,"uniqueKey":"data.tool_spec","typeLabel":"object"},"membership_id":{"type":"string","format":"uuid","description":"Account that owns the tool.","example":"a1b2c3d4-e5f6-7890-abcd-ef0123456789","uniqueKey":"data.membership_id","typeLabel":"string\u003cuuid>"},"webhook_url":{"oneOf":[{"type":"string","format":"uri","description":"Where we POST the tool call. Required when `execution_mode = \"webhook\"`.","example":"https://your-app.com/waterr/tools/lookup_account","uniqueKey":"data.webhook_url.oneOf.0","typeLabel":"string\u003curi>"},{"type":"null","format":"uri","description":"Where we POST the tool call. Required when `execution_mode = \"webhook\"`.","example":"https://your-app.com/waterr/tools/lookup_account","uniqueKey":"data.webhook_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.webhook_url","typeLabel":"string\u003curi> | null"},"on_call":{"type":"string","enum":["generate_filler","static_filler","silent","passthrough"],"default":"silent","description":"What the persona does WHILE the tool runs. `silent` (default) — go quiet. `static_filler` — speak the exact `static_filler` phrase. `generate_filler` — pick from a generic pool (\"let me check on that\"). `passthrough` — silent + skip LLM follow-up on the result.","example":"static_filler","uniqueKey":"data.on_call","typeLabel":"enum\u003cstring>"},"static_filler":{"oneOf":[{"type":"string","description":"Phrase the persona speaks while the tool runs. Required when `on_call = \"static_filler\"`. Must be null otherwise.","example":"Sure, let me grab that for you.","uniqueKey":"data.static_filler.oneOf.0","typeLabel":"string"},{"type":"null","description":"Phrase the persona speaks while the tool runs. Required when `on_call = \"static_filler\"`. Must be null otherwise.","example":"Sure, let me grab that for you.","uniqueKey":"data.static_filler.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.static_filler","typeLabel":"string | null"},"on_resolve":{"type":"string","enum":["generate_response","response_in_result","add_to_context","fire_and_forget"],"default":"generate_response","description":"What to do with the tool result AFTER it returns. `generate_response` (default) — feed to LLM, persona speaks about it. `add_to_context` — stash silently, no follow-up turn. `response_in_result` — speak the result verbatim (Gemini Live: degrades to add_to_context). `fire_and_forget` — don't wait for the result at all.","example":"generate_response","uniqueKey":"data.on_resolve","typeLabel":"enum\u003cstring>"},"created_at":{"type":"string","format":"date-time","example":"2026-06-18T12:34:56.000Z","uniqueKey":"data.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","example":"2026-06-18T12:34:56.000Z","uniqueKey":"data.updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"data":{"id":"4f8a6c50-9d3b-4c1f-9c0a-7a3b6e2d1f10","membership_id":"a1b2c3d4-e5f6-7890-abcd-ef0123456789","name":"lookup_account","description":"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.","parameters_schema":{"type":"object","properties":{"account_id":{"type":"string"}},"required":["account_id"]},"execution_mode":"webhook","webhook_url":"https://your-app.com/waterr/tools/lookup_account","has_webhook_secret":true,"timeout_ms":8000,"tool_spec":{"type":"function","function":{"name":"lookup_account","description":"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.","parameters":{"type":"object","properties":{"account_id":{"type":"string"}},"required":["account_id"]}}},"created_at":"2026-06-18T12:34:56.000Z","updated_at":"2026-06-18T12:34:56.000Z"}},"examples":{"Example":{"title":"Example","value":{"data":{"id":"4f8a6c50-9d3b-4c1f-9c0a-7a3b6e2d1f10","membership_id":"a1b2c3d4-e5f6-7890-abcd-ef0123456789","name":"lookup_account","description":"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.","parameters_schema":{"type":"object","properties":{"account_id":{"type":"string"}},"required":["account_id"]},"execution_mode":"webhook","webhook_url":"https://your-app.com/waterr/tools/lookup_account","has_webhook_secret":true,"timeout_ms":8000,"tool_spec":{"type":"function","function":{"name":"lookup_account","description":"Fetch the participant's CRM record so you can reference their plan, MRR, and last contact date.","parameters":{"type":"object","properties":{"account_id":{"type":"string"}},"required":["account_id"]}}},"created_at":"2026-06-18T12:34:56.000Z","updated_at":"2026-06-18T12:34:56.000Z"}}}},"exampleType":"examples"}},"exampleType":"examples"},"60c6d394-3e11-439c-a981-da2adf6d3d05":{"description":"Invalid payload — name doesn't match the pattern, `parameters_schema.type` isn't `\"object\"`, `webhook_url` is missing for webhook mode, or `timeout_ms` is out of range. Response body lists every error.","content":{"application/json":{"example":{"message":"Invalid payload","errors":["name must be a string matching ^[a-zA-Z0-9_-]{1,64}$ (OpenAI tool-name rule)","webhook_url is required when execution_mode='webhook' (the default)"]},"examples":{"Example":{"title":"Example","value":{"message":"Invalid payload","errors":["name must be a string matching ^[a-zA-Z0-9_-]{1,64}$ (OpenAI tool-name rule)","webhook_url is required when execution_mode='webhook' (the default)"]}}},"exampleType":"examples"}},"exampleType":"examples"},"0a67d246-14ad-4b86-9c02-d5e6db9f3be9":{"description":"Unauthorized — missing or invalid API key.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"119f8e70-d982-484e-87e7-fa673ef1c1bb":{"description":"A tool with this name already exists on this account.","content":{"application/json":{"example":{"message":"A custom function with that name already exists on this account"},"examples":{"Example":{"title":"Example","value":{"message":"A custom function with that name already exists on this account"}}},"exampleType":"examples"}},"exampleType":"examples"},"b0ab69eb-31c1-48d2-98eb-a62b25c818d0":{"description":"Server error.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"b4562bb8-250a-4069-964b-0bf1382c0167":{"apiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"wai_...","description":"API key from waterr.ai/settings?tab=api-keys. Send as `Authorization: Bearer wai_\u003cyour_key>`.","scopes":[],"schemeName":"apiKeyAuth"}}},"servers":{"284a7c97-227c-464e-b509-1fc6a1c58859":{"url":"https://api.waterr.ai/v1","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"wai_...","description":"API key from waterr.ai/settings?tab=api-keys. Send as `Authorization: Bearer wai_\u003cyour_key>`.","scopes":[],"schemeName":"apiKeyAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key from waterr.ai/settings?tab=api-keys. Send as `Authorization: Bearer wai_\u003cyour_key>`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"apiKeyAuth","name":"Authorization"}],"title":"apiKeyAuth"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"waterr","siteName":"Waterr.ai","title":"Create a tool definition - Waterr.ai","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-06-30T12:30:52.175Z","originalFileLocation":"api-reference/endpoint/post-custom-functions.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Register a tool on your account. Define once, then attach to any number of scenarios with Attach a tool to a scenario. Editing the definition later (Update a tool) propagates to every attached scenario instantly.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Waterr.ai\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/waterr/JvejXbdPqRoVl46G/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/waterr/JvejXbdPqRoVl46G/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/waterr/JvejXbdPqRoVl46G/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/waterr/JvejXbdPqRoVl46G/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/waterr/JvejXbdPqRoVl46G/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/waterr/JvejXbdPqRoVl46G/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/waterr/JvejXbdPqRoVl46G/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/waterr/JvejXbdPqRoVl46G/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/waterr/JvejXbdPqRoVl46G/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a tool definition - Waterr.ai\">\u003cmeta data-mint-head property=\"og:description\" content=\"Register a tool on your account. Define once, then attach to any number of scenarios with Attach a tool to a scenario. Editing the definition later (Update a tool) propagates to every attached scenario instantly.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Waterr.ai\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.waterr.ai/api-reference/endpoint/post-custom-functions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://waterr.mintlify.app/_mintlify/api/og/v2?division=Tools\u0026amp;title=Create+a+tool+definition\u0026amp;description=Register+a+tool+on+your+account.+Define+once%2C+then+attach+to+any+number+of+scenarios+with+%5B%60Attach+a+tool+to+a+scenario%60%5D%28%23tag%2FScenario-Tools%2Foperation%2FAttachTo\u0026amp;theme=35640f470f5aebf3ff485362\u0026amp;signature=d7ab3285a212dcaccf931f29a7e9c3d010f073305ce95d53ac76e2472018c2f4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a tool definition - Waterr.ai\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Register a tool on your account. Define once, then attach to any number of scenarios with Attach a tool to a scenario. Editing the definition later (Update a tool) propagates to every attached scenario instantly.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://waterr.mintlify.app/_mintlify/api/og/v2?division=Tools\u0026amp;title=Create+a+tool+definition\u0026amp;description=Register+a+tool+on+your+account.+Define+once%2C+then+attach+to+any+number+of+scenarios+with+%5B%60Attach+a+tool+to+a+scenario%60%5D%28%23tag%2FScenario-Tools%2Foperation%2FAttachTo\u0026amp;theme=35640f470f5aebf3ff485362\u0026amp;signature=d7ab3285a212dcaccf931f29a7e9c3d010f073305ce95d53ac76e2472018c2f4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/waterr/JvejXbdPqRoVl46G/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Waterr.ai\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563EB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.waterr.ai/api-reference/endpoint/post-custom-functions\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/post-custom-functions.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.waterr.ai/#organization\",\"name\":\"Waterr.ai\",\"url\":\"https://docs.waterr.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/waterr/BNJBdkg3zY1H6whp/logo/header-logo-light.png?fit=max\u0026auto=format\u0026n=BNJBdkg3zY1H6whp\u0026q=85\u0026s=d56ffed321f9f4cb446acc732ed80c98\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.waterr.ai#website\",\"name\":\"Waterr.ai\",\"url\":\"https://docs.waterr.ai\",\"publisher\":{\"@id\":\"https://docs.waterr.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.waterr.ai/api-reference/endpoint/post-custom-functions#webpage\",\"url\":\"https://docs.waterr.ai/api-reference/endpoint/post-custom-functions\",\"name\":\"Create a tool definition\",\"description\":\"Register a tool on your account. Define once, then attach to any number of scenarios with Attach a tool to a scenario. Editing the definition later (Update a tool) propagates to every attached scenario instantly.\",\"dateModified\":\"2026-06-30T12:30:52.175Z\",\"isPartOf\":{\"@id\":\"https://docs.waterr.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.waterr.ai/api-reference/endpoint/post-custom-functions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.waterr.ai/api-reference/endpoint/post-custom-functions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tools\",\"item\":\"https://docs.waterr.ai/api-reference/custom-functions\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a tool definition\",\"item\":\"https://docs.waterr.ai/api-reference/endpoint/post-custom-functions\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.waterr.ai/api-reference/endpoint/post-custom-functions#apireference\",\"headline\":\"Create a tool definition\",\"name\":\"Create a tool definition\",\"description\":\"Register a tool on your account. Define once, then attach to any number of scenarios with Attach a tool to a scenario. Editing the definition later (Update a tool) propagates to every attached scenario instantly.\",\"url\":\"https://docs.waterr.ai/api-reference/endpoint/post-custom-functions\",\"mainEntityOfPage\":{\"@id\":\"https://docs.waterr.ai/api-reference/endpoint/post-custom-functions#webpage\"},\"dateModified\":\"2026-06-30T12:30:52.175Z\",\"publisher\":{\"@id\":\"https://docs.waterr.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.waterr.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Waterr.ai\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Waterr.ai","nav":{"global":{},"tabs":[{"tab":"Help Center","icon":"life-ring","pages":[{"title":"Help Center","href":"/overview"}]},{"tab":"API Reference","icon":"code","groups":[{"group":"Getting Started","icon":"flag","pages":[{"title":"Introduction","icon":"house","href":"/api-reference/introduction"},{"title":"Quick Start","icon":"rocket","href":"/api-reference/quickstart"},{"title":"Authentication","icon":"key","href":"/api-reference/authentication"},{"title":"Session Lifecycle","icon":"arrows-rotate","href":"/api-reference/session-lifecycle"},{"title":"Errors","icon":"triangle-exclamation","href":"/api-reference/errors"},{"title":"Rate limits","icon":"gauge","href":"/api-reference/rate-limits"},{"title":"Billing and credits","icon":"credit-card","href":"/api-reference/billing"},{"title":"Pagination","icon":"list","href":"/api-reference/pagination"},{"title":"Idempotency","icon":"fingerprint","href":"/api-reference/idempotency"},{"title":"Versioning","icon":"code-branch","href":"/api-reference/versioning"},{"title":"Changelog","icon":"clock-rotate-left","href":"/api-reference/changelog"}]},{"group":"Meetings","icon":"video","pages":[{"title":"Create a new meeting","openapi":"POST /meetings","href":"/api-reference/endpoint/post-meetings"},{"title":"Get a meeting by ID","openapi":"GET /meetings/{id}","href":"/api-reference/endpoint/get-meetings-id"},{"title":"Get all meetings","openapi":"GET /meetings","href":"/api-reference/endpoint/get-meetings"},{"title":"End a meeting","openapi":"PUT /meetings/{meetingId}/end","href":"/api-reference/endpoint/put-meetings-meetingid-end"},{"title":"Update a meeting","openapi":"PUT /meetings/{meetingId}","href":"/api-reference/endpoint/put-meetings-meetingid"},{"title":"Delete a meeting","openapi":"DELETE /meetings/{meetingId}","href":"/api-reference/endpoint/delete-meetings-meetingid"},{"title":"Submit post-call feedback","openapi":"POST /meetings/{meetingId}/feedback","href":"/api-reference/endpoint/post-meetings-meetingid-feedback"},{"title":"Read post-call feedback","openapi":"GET /meetings/{meetingId}/feedback","href":"/api-reference/endpoint/get-meetings-meetingid-feedback"},{"title":"Feedback catalogue","openapi":"GET /meetings/feedback/catalog","href":"/api-reference/endpoint/get-meetings-feedback-catalog"}]},{"group":"Personas","icon":"user","pages":[{"title":"Create a new persona","openapi":"POST /personas","href":"/api-reference/endpoint/post-personas"},{"title":"Get a persona by ID","openapi":"GET /personas/{id}","href":"/api-reference/endpoint/get-personas-id"},{"title":"Get all personas","openapi":"GET /personas","href":"/api-reference/endpoint/get-personas"},{"title":"Update a persona","openapi":"PUT /personas/{id}","href":"/api-reference/endpoint/put-personas-id"},{"title":"Delete a persona","openapi":"DELETE /personas/{id}","href":"/api-reference/endpoint/delete-personas-id"}]},{"group":"Scenarios","icon":"diagram-project","pages":[{"title":"Create a new scenario","openapi":"POST /scenarios","href":"/api-reference/endpoint/post-scenarios"},{"title":"Get all scenarios","openapi":"GET /scenarios","href":"/api-reference/endpoint/get-scenarios"},{"title":"Update a scenario","openapi":"PUT /scenarios/{id}","href":"/api-reference/endpoint/put-scenarios-id"},{"title":"Delete a scenario","openapi":"DELETE /scenarios/{id}","href":"/api-reference/endpoint/delete-scenarios-id"},{"title":"Export a scenario as JSON","openapi":"GET /scenarios/{id}/export","href":"/api-reference/endpoint/get-scenarios-id-export"},{"title":"Get all meetings for all scenarios of a user","openapi":"GET /scenarios/membership/{membershipId}/meetings","href":"/api-reference/endpoint/get-scenarios-membership-membershipid-meetings"}]},{"group":"Embed Scenario","icon":"window-maximize","pages":[{"title":"Embed API","icon":"window-maximize","href":"/api-reference/embed-tokens"},{"title":"Live Website Events","icon":"bolt","tag":"BETA","href":"/api-reference/live-website-events"},{"title":"Page Tools","icon":"arrow-pointer","tag":"BETA","href":"/api-reference/page-tools"}]},{"group":"Memory","icon":"database","pages":[{"title":"Memories","icon":"database","href":"/api-reference/memories"},{"title":"Add memories","openapi":"POST /memories","href":"/api-reference/endpoint/post-memories"},{"title":"List memories under a tag","openapi":"GET /memories","href":"/api-reference/endpoint/get-memories"},{"title":"List memory containers","openapi":"GET /memories/tags","href":"/api-reference/endpoint/get-memories-tags"},{"title":"Get a memory container","openapi":"GET /memories/tags/{tag}","href":"/api-reference/endpoint/get-memories-tags-tag"},{"title":"Get a memory","openapi":"GET /memories/{id}","href":"/api-reference/endpoint/get-memories-id"},{"title":"Update a memory","openapi":"PATCH /memories/{id}","href":"/api-reference/endpoint/patch-memories-id"},{"title":"Delete a memory","openapi":"DELETE /memories/{id}","href":"/api-reference/endpoint/delete-memories-id"},{"title":"Delete a memory container","openapi":"DELETE /memories/tags/{tag}","href":"/api-reference/endpoint/delete-memories-tags-tag"}]},{"group":"Post-Meeting Data","icon":"chart-line","pages":[{"title":"Get analysis by meeting ID","openapi":"GET /analyses/meeting/{meetingId}","href":"/api-reference/endpoint/get-analyses-meeting-meetingid"},{"title":"Get an analysis by ID","openapi":"GET /analyses/{id}","href":"/api-reference/endpoint/get-analyses-id"},{"title":"Trigger manual analysis for a meeting","openapi":"POST /analyses/trigger/{meetingId}","href":"/api-reference/endpoint/post-analyses-trigger-meetingid"},{"title":"Get transcripts by meeting ID","openapi":"GET /transcripts/meeting/{meetingId}","href":"/api-reference/endpoint/get-transcripts-meeting-meetingid"},{"title":"Get a transcript by ID","openapi":"GET /transcripts/{id}","href":"/api-reference/endpoint/get-transcripts-id"},{"title":"Get recording CloudFront URL with thumbnail by Daily meeting ID","openapi":"GET /recordings/url-with-thumbnail/{meetingId}","href":"/api-reference/endpoint/get-recordings-url-with-thumbnail-meetingid"},{"title":"Get recordings by meeting ID","openapi":"GET /recordings/meeting/{meetingId}","href":"/api-reference/endpoint/get-recordings-meeting-meetingid"}]},{"group":"Goals","icon":"bullseye","pages":[{"title":"Create a new goal","openapi":"POST /goals","href":"/api-reference/endpoint/post-goals"},{"title":"Get all goals","openapi":"GET /goals","href":"/api-reference/endpoint/get-goals"},{"title":"Update a goal","openapi":"PUT /goals/{id}","href":"/api-reference/endpoint/put-goals-id"},{"title":"Delete a goal","openapi":"DELETE /goals/{id}","href":"/api-reference/endpoint/delete-goals-id"}]},{"group":"Avatars","icon":"image","pages":[{"title":"Avatars","icon":"image","href":"/api-reference/avatars"},{"title":"List avatars","openapi":"GET /avatars","href":"/api-reference/endpoint/get-avatars"},{"title":"Get an avatar","openapi":"GET /avatars/{id}","href":"/api-reference/endpoint/get-avatars-id"},{"title":"Create an avatar","openapi":"POST /avatars","href":"/api-reference/endpoint/post-avatars"},{"title":"Delete an avatar","openapi":"DELETE /avatars/{id}","href":"/api-reference/endpoint/delete-avatars-id"},{"title":"Set a persona's avatar","openapi":"PUT /personas/{id}/avatar","href":"/api-reference/endpoint/put-personas-id-avatar"},{"title":"Clear a persona's avatar","openapi":"DELETE /personas/{id}/avatar","href":"/api-reference/endpoint/delete-personas-id-avatar"}]},{"group":"Voices","icon":"microphone","pages":[{"title":"List available voices","openapi":"GET /voices","href":"/api-reference/endpoint/get-voices"},{"title":"Voice attributions","icon":"scale-balanced","href":"/api-reference/voice-attributions"}]},{"group":"Tools","icon":"screwdriver-wrench","pages":[{"title":"Tools (Custom Functions)","icon":"code","href":"/api-reference/custom-functions"},{"title":"Screen Apps","icon":"app-window","href":"/api-reference/screen-apps"},{"title":"List tool definitions","openapi":"GET /custom-functions","description":"Return every tool on your account, oldest first.","href":"/api-reference/endpoint/get-custom-functions"},{"title":"Create a tool definition","openapi":"POST /custom-functions","href":"/api-reference/endpoint/post-custom-functions"},{"title":"Get a tool definition","openapi":"GET /custom-functions/{id}","description":"Fetch one tool definition by ID.","href":"/api-reference/endpoint/get-custom-functions-id"},{"title":"Update a tool definition","openapi":"PATCH /custom-functions/{id}","href":"/api-reference/endpoint/patch-custom-functions-id"},{"title":"Delete a tool definition","openapi":"DELETE /custom-functions/{id}","href":"/api-reference/endpoint/delete-custom-functions-id"},{"title":"List tools attached to a scenario","openapi":"GET /scenarios/{scenarioId}/custom-functions","href":"/api-reference/endpoint/get-scenarios-scenarioid-custom-functions"},{"title":"Attach a tool to a scenario","openapi":"POST /scenarios/{scenarioId}/custom-functions/{id}/attach","href":"/api-reference/endpoint/post-scenarios-scenarioid-custom-functions-id-attach"},{"title":"Update a scenario-tool attachment","openapi":"PATCH /scenarios/{scenarioId}/custom-functions/{id}","href":"/api-reference/endpoint/patch-scenarios-scenarioid-custom-functions-id"},{"title":"Detach a tool from a scenario","openapi":"DELETE /scenarios/{scenarioId}/custom-functions/{id}","href":"/api-reference/endpoint/delete-scenarios-scenarioid-custom-functions-id"}]},{"group":"Guardrails","icon":"shield-halved","pages":[{"title":"Guardrails","icon":"shield-halved","href":"/api-reference/guardrails"},{"title":"List guardrails","openapi":"GET /guardrails","href":"/api-reference/endpoint/get-guardrails"},{"title":"Create a guardrail","openapi":"POST /guardrails","href":"/api-reference/endpoint/post-guardrails"},{"title":"Get a guardrail","openapi":"GET /guardrails/{id}","href":"/api-reference/endpoint/get-guardrails-id"},{"title":"Update a guardrail","openapi":"PATCH /guardrails/{id}","href":"/api-reference/endpoint/patch-guardrails-id"},{"title":"Delete a guardrail","openapi":"DELETE /guardrails/{id}","href":"/api-reference/endpoint/delete-guardrails-id"},{"title":"List guardrails attached to a scenario","openapi":"GET /scenarios/{scenarioId}/guardrails","href":"/api-reference/endpoint/get-scenarios-scenarioid-guardrails"},{"title":"Attach a guardrail to a scenario","openapi":"POST /scenarios/{scenarioId}/guardrails/{id}/attach","href":"/api-reference/endpoint/post-scenarios-scenarioid-guardrails-id-attach"},{"title":"Update a scenario-guardrail attachment","openapi":"PATCH /scenarios/{scenarioId}/guardrails/{id}","href":"/api-reference/endpoint/patch-scenarios-scenarioid-guardrails-id"},{"title":"Detach a guardrail from a scenario","openapi":"DELETE /scenarios/{scenarioId}/guardrails/{id}","href":"/api-reference/endpoint/delete-scenarios-scenarioid-guardrails-id"}]},{"group":"Meeting Skills","icon":"puzzle-piece","pages":[{"title":"Meeting Skills","icon":"puzzle-piece","href":"/api-reference/skills"},{"title":"List skills","openapi":"GET /skills","href":"/api-reference/endpoint/get-skills"},{"title":"Create a skill","openapi":"POST /skills","href":"/api-reference/endpoint/post-skills"},{"title":"Get a skill","openapi":"GET /skills/{id}","href":"/api-reference/endpoint/get-skills-id"},{"title":"Update a skill","openapi":"PATCH /skills/{id}","href":"/api-reference/endpoint/patch-skills-id"},{"title":"Delete a skill","openapi":"DELETE /skills/{id}","href":"/api-reference/endpoint/delete-skills-id"},{"title":"List skills attached to a scenario","openapi":"GET /scenarios/{scenarioId}/skills","href":"/api-reference/endpoint/get-scenarios-scenarioid-skills"},{"title":"Attach a skill to a scenario","openapi":"POST /scenarios/{scenarioId}/skills/{id}/attach","href":"/api-reference/endpoint/post-scenarios-scenarioid-skills-id-attach"},{"title":"Update a scenario-skill attachment","openapi":"PATCH /scenarios/{scenarioId}/skills/{id}","href":"/api-reference/endpoint/patch-scenarios-scenarioid-skills-id"},{"title":"Detach a skill from a scenario","openapi":"DELETE /scenarios/{scenarioId}/skills/{id}","href":"/api-reference/endpoint/delete-scenarios-scenarioid-skills-id"}]},{"group":"Users","icon":"users","pages":[{"title":"Get a user by ID","openapi":"GET /users/{userId}","href":"/api-reference/endpoint/get-users-userid"},{"title":"Update a user","openapi":"PUT /users/{userId}","href":"/api-reference/endpoint/put-users-userid"}]},{"group":"Guides","icon":"book-open","pages":[{"title":"Prompting Guide","icon":"lightbulb","href":"/api-reference/prompting-guide"},{"title":"Examples","icon":"flask","href":"/api-reference/examples"},{"title":"Observability \u0026 Tracing","icon":"chart-line","href":"/api-reference/observability"}]},{"group":"Integrations","icon":"plug","pages":[{"title":"Bring Your Own Agent","icon":"robot","href":"/api-reference/bring-your-own-agent"},{"title":"LangChain","icon":"link","href":"/api-reference/langchain"},{"title":"MCP Server","icon":"plug","href":"/api-reference/mcp"},{"title":"Webhooks","icon":"webhook","href":"/api-reference/webhooks"}]},{"group":"Agent Skills","icon":"robot","pages":[{"title":"Claude Code Skill","icon":"terminal","href":"/skills/claude-code"},{"title":"Codex Skill","icon":"code","href":"/skills/codex"}]}]}]},"title":"Create a tool definition - Waterr.ai","buildId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","deploymentId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BRm_l__d.js","utils-f1l1Oc-G.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BlhqDhJO.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DHCB7rsC.js","snippetPresets-CYXLx6Hv.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-B78P2dEq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C4YLPVAh.js","shallow-vlLnTDkQ.js","getApiPlaygroundDisplay-D_98hhvf.js","CodeSnippet-DtnZHGqq.js","CodeSnippets-CLFb8KJt.js","Page-kQh739Uz.js","getPastedJson-Cq-zlbnU.js","icon-sN3t983t.js","MethodPill-P_YQ2s09.js","DuplicateIcon-BVzyNsGJ.js","createIcon-B3jqgqC6.js","DynamicMarkdown-Crwq6WG_.js","SectionHeading-C7pGS2Bb.js","axios-vUo_bRtp.js","Markdown-BuPH8yuW.js","clsx-CCOYKgaU.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BnkC_6oA.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BM4S31-f.js"]}