Prerequisites
- An agent to tag tools into, from Agent builder
- The API you want to call, and a key for it if it needs one
Where tools live
Tools appears at two scopes, and they are not the same view. The selector at the top of the sidebar decides which one you are on. It reads All agents for the whole organization, or the agent’s name when you are inside one. Switching it leaves you on Tools. At All agents, under Resources, you get four tabs:Three kinds of tool
Which one you want depends on what is on the other end.Webhook
Calls an HTTP endpoint you already have. You supply the request, and you describe what comes back. This is the common case. Start here unless you know you need one of the other two.Custom code
Runs code you write, for the cases a single HTTP call cannot cover: reshaping a response, calling two services and combining them, or a calculation the agent should not be doing in its head. This is not the custom code node you place inside a pathway. Same name, different thing: a tool is called from a prompt, a node is a step inside a pathway.Integration
Talks to a service you have connected, like a CRM. Pick the connection and the action, and the fields come from the service rather than from you. You connect an account once with Add connection, under Connections, and then build as many tools on it as you need. One CRM connection can power a tool that creates a contact, another that looks one up, and a third that logs a call. The integration builder also offers New connection at the top of its connection list, which opens the same flow without leaving the tool. Bland’s own actions need no connection. Ending a call, transferring one, pressing a button and sending an SMS are integration tools like any other, but they act on the call the agent is already in, so there is no account to connect. That is why End Call sits in your tool list carrying an icon of its own.Build a webhook tool
From inside your agent, open Tools, then Create tool, and choose Webhook. If you already have a workingcurl, choose Import from cURL instead, in the same list. Paste the command and it opens the builder with the request filled in.
Name it
@ in a prompt, so make it the thing it does. Check calendar reads better in a prompt than GET /availability.Describe when to use it
Look up open appointment slots for a given day. Use this when the caller asks what times are available, before offering any specific time.A vague description is the most common cause of a tool firing at the wrong moment.Agent speech, directly below it, is what the agent says out loud while the tool runs. “One moment while I look that up” costs nothing and is the difference between a pause and dead air.
Point it at your endpoint
{{date}}, {{phone}}.The tabs under the URL are Query, Authorization, Headers and Body. Query mirrors whatever is already in the URL, and Body is not there at all until you pick a method that has one.The method list offers five verbs. Webhook tools run GET and POST. Pick one of the other three and the tool tests fine and then refuses to save, with a message that says only Failed to create tool. The reason is the method.For an API key, do not type it here. Reference a secret, and create it before you reach the test step.Say which variables the agent fills in
Declare what comes back
ok, message and data. The data row has a chevron: expand it for the three below.ok and message come pre-checked. The rest is yours to choose, and the rows below the table are yours to write: give one a name and a JSONPath and you can pull a single field straight out of the response body.The builder lists these rest_api_get_* paths whatever method you pick. A POST tool returns the same three fields named rest_api_post_*. So on a POST tool, take ok and message now. Save it, reopen, and check the rest_api_post_* rows then.Keep ok checked. A failed call returns ok and message and nothing else, so every path under data comes back empty. ok is the only signal that the call did not work.Each row shows its name wrapped as {{output.name}}. That is the table’s label, not the reference. What you write in a prompt is the bare name, {{name}}.Test it
Store credentials as secrets
Do not paste an API key into a tool. Put it in Secrets and reference it. Secrets live at All agents, under Tools, on the Secrets tab. Add Secret creates one, and the value is never shown again after you save it. Creating a secret needs the owner, admin or operator role. Without one, Add Secret is visible but disabled. The same secrets under Settings, in Developer, sit behind a page only an owner or admin can open. There are two kinds, and each row on the tab is labelled with which it is. Static is a value you paste in, like an API key. It changes only when you change it. Refresh is a value Bland fetches on a schedule, so the agent never holds an expired token mid-call. You give it a URL, a method, headers or body, how often to refresh, and the path to the value in the response. The interval runs from 10 minutes to 24 hours. Three ways to reference one. The Authorization tab starts on No Auth, and the secret picker only appears once you choose Bearer Token or API Key. Choose a secret there and the builder stores a reference to it. API Key adds a Header name field, which falls back toX-API-Key if you leave it blank.
The picker also has a Create New Secret link, which opens the same dialog without leaving the tool. It stays clickable without the role, and the server refuses the save.
In a header, paste the reference. Every row on the Secrets tab shows its own reference beside the name, with a button that copies it. Copy it rather than typing it: the copied reference points at the secret by id, so a rename leaves every header working.
In a body field, the copied reference does not work. Write {{secret.NAME}} instead, using the secret’s name. Headers resolve both forms. Bodies resolve the name form only: an id reference reaches your endpoint as the literal text {{secret.id.…}}. Nothing flags it, and the builder’s test passes, because the test takes a different path from a real call.
The name form is the one a rename breaks, so a secret referenced from a body is worth renaming carefully.
Secrets are organization-wide. Store one and every agent can use it. Rotate the value and every tool that references it follows.
Tag a tool into a prompt
Building a tool does not give it to an agent. Tag it. In the agent’s Prompt, type@ and pick the tool by name. The Tool references section below the prompt then lists it.
Tools attach per prompt, not per agent. A tool tagged in the agent’s prompt is available while the conversation is on the agent, and it does not follow the agent into a pathway, a branch of the agent’s behavior with instructions of its own. If booking lives in its own pathway, tag the calendar tool there too.
The check is Tool references itself. Only tagged tools appear there, so the list is the attachment. A tool you built that is missing from it is tagged in no prompt and will never be called.
Knowledge references, directly below it, is not that kind of list. A source can be attached without being tagged, so what it shows is not the whole set. See Knowledge.
Watch how tools perform
Analytics shows call volume and failure rate per tool. The number worth watching is the failure rate. A tool that fails quietly leaves the agent improvising in the middle of a call, and the caller hears an agent that has lost the thread rather than an error.Common failures
The agent never calls the tool
The agent never calls the tool
It works on the agent but not inside a pathway
It works on the agent but not inside a pathway
You edited a tool and the agent still uses the old version
You edited a tool and the agent still uses the old version
The tool fires at the wrong moment
The tool fires at the wrong moment
The agent calls it but ignores the answer
The agent calls it but ignores the answer
The endpoint returns 401 or 403
The endpoint returns 401 or 403
The call times out
The call times out