Skip to main content
Glama

Simple House Planner

Window size calculator

calculate_window_size
Read-only

Use this when someone asks how big the windows of a room must be for daylight, ventilation or an egress window under building code. Calculates the window area a room needs for daylight and fresh air from its floor area, under a building rule: the smallest glass or window-opening area, the smallest area that opens, and the smallest total window size with frame for the window type and frame share. It gives the rule's emergency escape (egress) opening, and checks windows and an escape opening when they are given. Areas are in square meters. Rules: irc2021 (United States, R303.1 and R310), england (Approved Documents F and B), mbo (Germany: Musterbauordnung, NRW, Brandenburg), baybo (Bavaria), dm1975 (Italy), catalonia (Spain, Catalonia), portoAlegre (Brazil, Porto Alegre).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "area": "<area>",
      "rules": "<rules>"
    },
    "name": "calculate_window_size"
  }
}

Input Schema

NameRequiredDescriptionDefault
areaYesFloor area of the room, in square meters.
typeNoHow the windows open: a casement opens fully, hung and sliding windows open half, a fixed window does not open. Hung when missing.
frameNoShare of each window's area that is frame, not glass; 0.3 when missing.
rulesYesThe building rule of the country or region.
escapeNoThe escape window to check against the rule's emergency escape opening.
windowsNoWindows of one size to check against the rule.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly, non-destructive, closed-world), so the bar is lower; the description still adds real behavior by naming the three computed minimums, the egress opening, and the fact that supplied windows/escape objects are checked against the rule. It does not describe the response structure or what happens on a failed check, which is a moderate gap given there is no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The use case is correctly front-loaded, but the middle sentence is a dense run-on that repeatedly restates 'smallest ... area' and is hard to parse. The rule enumeration is useful but consumes a large share of the text, and no paragraph or list structure breaks up the block.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter code calculator with nested objects and no output schema, the description does most of the work: it names the jurisdictions, specifies units, and outlines what is computed and validated. The main shortfall is that the shape of the returned values (per-rule thresholds vs. pass/fail) is only implied.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the schema already documents area, type, frame, rules, windows and escape, including defaults (hung, 0.3) and units. The description only restates that areas are in square meters and references 'window type and frame share', adding little beyond the structured fields; the rule list duplicates the rules enum.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a concrete use case (window size for daylight, ventilation, egress under building code) and a specific verb-plus-resource ('Calculates the window area a room needs'). It enumerates the exact outputs (minimum glass area, minimum openable area, minimum total window size with frame, egress opening, and checks), which separates it cleanly from unrelated siblings like calculate_ramp or calculate_stairs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Use this when someone asks how big the windows of a room must be...' clause gives a clear triggering condition, including the egress-window case. It does not state exclusions or name an alternative tool, but the domain is narrow enough that ambiguity with siblings is low.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources