***

title: toggleFunctions
slug: /reference/typescript/agents/function-result/toggle-functions
description: Enable or disable specific SWAIG functions at runtime.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[functionresult]: /docs/server-sdks/reference/typescript/agents/function-result

Enable or disable specific SWAIG functions at runtime. This lets you control
which tools are available to the AI at different points in the conversation
(e.g., enabling payment functions only after identity verification).

## **Parameters**

<ParamField path="toggles" type={"{ function: string; active: boolean }[]"} required={true} toc={true}>
  Array of toggle objects. Each object must contain:

  * `"function"` — name of the SWAIG function to toggle
  * `"active"` — `true` to enable, `false` to disable
</ParamField>

## **Returns**

[`FunctionResult`][functionresult] -- `this`, for chaining.

## **Example**

```typescript {4}
import { FunctionResult } from '@signalwire/sdk';

const result = new FunctionResult()
  .toggleFunctions([
    { function: 'transfer_call', active: false },
    { function: 'check_balance', active: true },
  ]);
```