> 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.

# named_tools

> Find which tool names a piece of text mentions.

[render-warnings]: /docs/server-sdks/reference/python/agents/context-builder/render-warnings

Find which tool names a piece of text mentions, by the rule the
[`tool_named_but_not_offered`][render-warnings] warning uses:

* A name with an underscore, such as `place_order`, counts as a whole word
  anywhere.
* A one-word name, such as `help`, counts only in backticks or before `(`,
  since it's also an ordinary word.

```python
from signalwire.core.contexts import named_tools
```

## Parameters

**`text`** `str | None` — required

The text to search: a step's text, a prompt, or a tool result. `None` or an
empty string finds nothing.

---

**`tools`** `Iterable[str]` — required

The tool names to look for.

---

## Returns

`set[str]` -- The names found.

## Example

```python
from signalwire.core.contexts import named_tools

print(named_tools("Call place_order, then `help`.", ["place_order", "help", "lookup"]))
# {'place_order', 'help'}
```