> This page is for Server SDKs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# set_unavailable_function_response

> Set what the model is told when it calls a tool it can't use right now.

[ref-agentbase]: /docs/server-sdks/reference/python/agents/agent-base

[ai-params]: /docs/swml/reference/calling/ai/params

[set-functions]: /docs/server-sdks/reference/python/agents/context-builder/step/set-functions

Set what the model is told when it calls a tool it can't use right now, such as one
the current step's [function list][set-functions] doesn't offer, or one the agent
doesn't have. Without it, the platform says nothing ran, which steps offer the tool,
and which tools are available now.

The text can use these variables:

* `${function}` -- the tool's name.
* `${tools}` -- the tools the request offered, comma-separated.
* `${steps}` -- the current context's steps whose functions include the tool; empty
  for a name the agent doesn't have.

Sets the `unavailable_function_response` [AI parameter][ai-params].

## Parameters

**`text`** `str` — required

The text the model gets.

---

## Returns

[`AgentBase`][ref-agentbase] -- Self for method chaining.

## Raises

`ValueError` if `text` is empty or isn't a string.

## Example

```python {5-7}
from signalwire import AgentBase

agent = AgentBase(name="guide", route="/guide")
agent.prompt_add_section("Role", "You help callers find their way.")
agent.set_unavailable_function_response(
    "${function} isn't available here. Tools you have: ${tools}."
)

agent.serve()
```