> ## 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 - check_hours

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

The `check_hours` tool checks whether the contact center is currently within business hours.

## When to use

Use `check_hours` before you transfer to a human agent, so you can offer a callback or a message outside business hours instead of sending the caller to an unstaffed queue.

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:
  check_hours(agentId: string, hoursId: string) -> boolean
```

## Parameters

| Parameter | Required | Description |
| - | - | - |
| `agentId` | Yes | The agent identifier. |
| `hoursId` | Yes | The ID of the business-hours configuration to check. |

## Returns

A boolean: `true` when the contact center is open, `false` when it is closed. Invalid input returns the error code `INVALID_INPUT`.

## Example

```yaml theme={null}
FLOW:
  check_open:
    CALL:
      check_hours(agentId: "support_bot", hoursId: "weekday_hours")
    ON_RESULT:
      open: hand_to_human
      closed: after_hours_message
```

<Note>
  The `ON_RESULT` shape above is illustrative. Use the result-handling form that your flow already uses for boolean results.
</Note>


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