# Shading Device Calculator MCP

> Shading Device Calculator determines precise dimensions for horizontal louvers and vertical fins, helping architects guarantee thermal comfort standards are met. This MCP calculates minimum projections required based on solar angles, letting you validate if existing buildings meet specific cutoff requirements. It handles the complex geometry of sun path analysis so you don't have to do it by hand.

## Overview
- **Category:** construction
- **Price:** Free
- **Tags:** solar-geometry, shading, architecture, thermal-comfort, sun-position, engineering-tools

## Description

Designing a facade that blocks too much heat or lets in too little light is a constant headache. This MCP handles the physics and math behind solar shading devices. Instead of guessing dimensions, you calculate exactly what you need: the depth for horizontal louvers, or the width for vertical fins. The process starts by pinpointing the sun's exact altitude and azimuth at any location and time using your AI client. Then, you input that data to figure out the precise minimum projection needed to block unwanted sunlight. You can also run a check against an existing design to see if it actually complies with local building codes or target angles. Vinkius puts this powerful tool right in your catalog so your agent has access immediately, no setup required.

## Tools

### calculate_vertical_width
Computes the minimum width required for vertical fins based on solar geometry calculations.

### validate_compliance
Checks if a given shading device meets predefined architectural or energy compliance standards.

### calculate_horizontal_depth
Calculates the minimum projection depth needed for horizontal louver systems to block direct sunlight.

### get_solar_position
Determines the solar altitude and azimuth angle at a specific geographic location and time.

## Prompt Examples

**Prompt:** 
```
What is the sun's position at latitude 40.7128 on day 150 at 12:00?
```

**Response:** 
```
By calling `get_solar_position`, the tool will return the specific solar altitude and azimuth for that location and time.
```

**Prompt:** 
```
Calculate required depth for a horizontal louver at latitude 40, surface azimuth 180, solar altitude 45, solar azimuth 135, and cutoff angle 60.
```

**Response:** 
```
The `calculate_horizontal_depth` tool will compute the minimum projection depth needed to satisfy the 60-degree cutoff requirement.
```

**Prompt:** 
```
Check if a 0.5m depth louver is compliant with a 45 degree target angle.
```

**Response:** 
```
The `validate_compliance` tool will analyze the geometry and return whether the device meets the design threshold or if there is a failure margin.
```

## Capabilities

### Determine Solar Position
Calculates the sun's precise altitude and azimuth for any given latitude, date, and time.

### Calculate Horizontal Louver Depth
Determines the minimum projection depth needed for horizontal louver systems to achieve a set cutoff angle.

### Calculate Vertical Fin Width
Computes the required minimum width for vertical fins based on solar geometry requirements.

### Validate Building Compliance
Checks if a given shading device meets or fails to meet pre-set design criteria or target cutoff angles.

## Use Cases

### Determining Optimal Louvre Depth
A designer needs to block harsh afternoon sun on a west-facing facade. They use `get_solar_position` to get the western angle, then run that data through `calculate_horizontal_depth`. The agent returns the required louver depth in meters, which they include directly in the blueprint.

### Retrofitting an Old Building
The building owner wants to upgrade their facade but isn't sure if it meets modern energy codes. They use `validate_compliance` with the current dimensions and target angles. The result tells them immediately what needs fixing or confirms they pass inspection.

### Calculating Fin Requirements
An engineer is designing a curtain wall system for a tropical climate. After getting the solar position, they run `calculate_vertical_width` to ensure the vertical fins are wide enough to block glare from side angles.

### Comparing Design Options
An architect is comparing two louver designs (one shallow, one deep). They use `get_solar_position` and then feed the data into both `calculate_horizontal_depth` calls to quantify exactly which design provides better shading coverage.

## Benefits

- You get precise calculations. Instead of approximating, you calculate the exact depth needed using `calculate_horizontal_depth` to meet a specific cutoff angle.
- It checks existing structures against code. Use `validate_compliance` to quickly determine if an old facade passes or fails required solar standards.
- No more guessing sun angles. First, run `get_solar_position` to feed your agent the precise altitude and azimuth for any time of day.
- You nail vertical shading too. Need fin dimensions? `calculate_vertical_width` gives you the minimum width needed without complex trigonometry.
- It saves huge amounts of time. You skip manual geometry drawing and run calculations directly through your AI client.

## How It Works

The bottom line is you get accurate, calculated dimensions that meet architectural standards without running complex simulations.

1. First, tell your AI client the location and time. It uses that data to calculate the sun's exact position.
2. Next, input the solar angle data and your required cutoff target into the specific calculation tool (e.g., depth or width).
3. The MCP returns a concrete measurement—the minimum dimension needed, or a pass/fail compliance status.

## Frequently Asked Questions

**How do I find the sun's angle for my project using get_solar_position?**
You provide your AI client with the latitude, date, and time. The tool returns the specific solar altitude and azimuth angles needed to start all subsequent calculations.

**What is the difference between calculate_horizontal_depth and calculate_vertical_width?**
Horizontal depth measures how far out a louver needs to project. Vertical width determines the required minimum side-to-side size of vertical fins for shading.

**Can I use validate_compliance if my building is new?**
Yes, you can. While it's often used for retrofits, `validate_compliance` checks your proposed dimensions against any specified target angle or code requirements, regardless of the building's age.

**Do I need to run get_solar_position before calculating depth?**
Yes. The calculation tools require precise solar data (altitude and azimuth) as an input. Running `get_solar_position` first provides that essential, accurate starting point.

**What happens if I run `get_solar_position` with invalid latitude or longitude?**
The tool returns a specific error code and message. It won't crash; instead, it stops the calculation immediately so you know exactly which input parameter failed.

**Do I need to run `get_solar_position` before running `validate_compliance`?**
No, you don't have to. You provide all necessary geometry and target angles directly to the tool. The system handles checking that data against its internal solar models.

**What units does `calculate_horizontal_depth` return?**
The output is always returned in meters, representing the minimum required physical depth. This keeps the calculation consistent regardless of what unit system you use for inputs.

**Does `calculate_vertical_width` account for seasonal changes?**
It calculates the width based on the parameters you provide. You must input the precise solar altitude and azimuth for the specific season or time period you are designing for.

**What does the calculator determine?**
It calculates the minimum depth for horizontal louvers and the maximum width for vertical fins needed to block sunlight based on solar trigonometry.

**How do I use the compliance tool?**
Use `validate_compliance` by providing your current device dimensions, solar position, and target cutoff angle to check if the shading is effective.

**What inputs are required for solar position?**
You need the latitude of the site, the day of the year, and the time of day in HH:mm format.