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

# SemanticGate constants

> The limits and reserved names the SDK enforces on semantic gates.

The SDK checks semantic gates against the platform's limits when a tool is defined
and throws for anything the platform would refuse. These exports hold those limits.

```typescript
import {
  MAX_GATES,
  MAX_QUESTION_BYTES,
  MAX_CRITERIA_BYTES,
  MAX_ON_FAIL_BYTES,
  MAX_VISUAL_INPUT,
  RESERVED_FUNCTION_NAMES,
} from '@signalwire/sdk';
```

## Properties

**`MAX_GATES`** `number`

`8`. The most gates one function can carry.

---

**`MAX_QUESTION_BYTES`** `number`

`8192`. The longest gate `question`, in UTF-8 bytes.

---

**`MAX_CRITERIA_BYTES`** `number`

`2048`. The longest `criteria.true` or `criteria.false` (`trueMeans` or `falseMeans`), in
UTF-8 bytes.

---

**`MAX_ON_FAIL_BYTES`** `number`

`8192`. The largest `on_fail` output, measured as compact JSON in UTF-8 bytes.

---

**`MAX_VISUAL_INPUT`** `number`

`5`. The most caller video frames a gate may ask for with `visualInput`.

---

**`RESERVED_FUNCTION_NAMES`** `ReadonlySet<string>`

Hook and built-in function names that can't carry gates: `startup_hook`,
`hangup_hook`, `check_for_input`, `end_call`, `hangup`, `check_time`,
`wait_for_user`, `wait_seconds`, `adjust_response_latency`, `next_step`,
`change_context`, `gather_submit`, `get_visual_input`, `get_ideal_strategy`, and
`pause_conversation`.

---

## Examples

```typescript
import { MAX_GATES, RESERVED_FUNCTION_NAMES } from '@signalwire/sdk';

console.log(MAX_GATES); // 8
console.log(RESERVED_FUNCTION_NAMES.has('end_call')); // true
```