---
title: ToolRouter — Agent Use Case Guide
description: Step-by-step guide for completing a task with a specific AI agent using ToolRouter.
url: https://toolrouter.com/tools/sunrise-sunset/use-cases/calculate-daylight-hours/openclaw
---
# How to Calculate Daylight Hours with OpenClaw

OpenClaw processes sunrise and sunset queries as automated data operations, returning precise times and complete twilight phase data in structured formats suitable for batch scheduling systems, solar energy forecasting pipelines, or construction site management platforms. It handles multi-location and multi-date queries efficiently in a single pass, making it the right tool for operational planning at scale where daylight availability drives scheduling decisions across many sites or dates.

## Setup

openclaw mcp add toolrouter -- npx -y toolrouter-mcp

## Steps

1. Connect ToolRouter: openclaw mcp add toolrouter -- npx -y toolrouter-mcp
2. Ask OpenClaw: "Get sunrise and sunset for this location today"
3. OpenClaw returns precise times
4. Calculate the total daylight from the results

## Example Prompt

```
How many daylight hours does Tokyo get today? Compare with next month.
```

## Tips

- Compare across dates to see how quickly day length changes
- Factor in twilight for usable outdoor light beyond sunrise-sunset
- Useful for travel planning and understanding seasonal patterns
