> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-agentplatform-dev.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Inbuilt tool - set_queue

<Badge icon="arrow-left" color="gray">[Back to Inbuilt tools](/agent-platform/inbuilt-tools/index#available-tools)</Badge>

The `set_queue` tool validates a routing queue with the contact center, so you can confirm that a queue exists before you route a conversation to it.

## When to use

Use `set_queue` when the target queue is decided at runtime, for example from the caller's intent or language, and you want to confirm that it is valid before calling `transfer_to_agent` with that `queueId`.

The tool requires Kore SmartAssist agent transfer to be configured for the project. If it is not configured, the call fails.

## Declare the tool

```yaml theme={null}
TOOLS:
  set_queue(agentId: string, queueId: string) -> boolean
```

## Parameters

| Parameter | Required | Description |
| - | - | - |
| `agentId` | Yes | The agent identifier. |
| `queueId` | Yes | The queue to validate. |

## Returns

A boolean: `true` when the queue is valid, `false` otherwise. Invalid input returns the error code `INVALID_INPUT`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.