Skip to main content
Glama

Simple House Planner

Wall framing calculator

calculate_wall_framing
Read-only

Use this when someone plans a stud wall and asks how many studs, plates or headers they need. Lays out one straight wood stud wall and counts its lumber: the stud length (height less the bottom plate and the top plates), a stud at each end and studs on centers measured from the left end, an extra stud beside the end stud at each corner, two studs at each meeting wall, and for each door and window king studs (exterior walls: IRC Table R602.7.5, 1 up to a 4 ft span, 2 up to 8 ft, 3 up to 14 ft, 4 up to 18 ft; interior walls: 1), jack studs, a header and cripples on the layout above it (none above a flat header with 24 in or less to the top plate, IRC R602.7.4); windows also get a flat sill and cripples under it. Doors, windows and meeting walls are spread evenly along the wall, doors and windows in turn. It returns the counts of each kind, the pieces to cut (jacks, cripples, header boards and sills with their lengths), the studs (full-height studs plus the studs the jacks and cripples are cut from), the studs to buy with spares (10 % unless given), the plates in millimeters (the length once for the bottom plate and once for each top plate, plus the sills and a flat header) and the boards of the given length, the wall and rough-opening areas in square meters, the sheets for one face less the openings without waste, and every piece with its place in the wall from the lower left corner. Lumber sizes follow PS 20 (1 1/2 in thick; 2×8 7 1/4 in deep). It does not size headers or jack studs; IRC Table R602.7(1) does for exterior bearing walls.

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": {
      "length": "<length>",
      "height": "<height>",
      "spacing": "<spacing>",
      "stock": "<stock>"
    },
    "name": "calculate_wall_framing"
  }
}

Input Schema

NameRequiredDescriptionDefault
sillNoHeight of the bottom of a window's rough opening above the bottom of the frame; 876.3 (34 1/2 in) when left out, in millimeters.
doorsNoNumber of doors; none when left out.
jacksNoJack studs at each side of an opening, 1 or 2; 1 when left out.
sheetNoSheet that covers one face: 4x8, 4x10 and 4x12 ft, 1200x2400 and 1250x2000 mm; 4x8 when left out.
spareNoPercent of studs added as spares; 10 when left out.
stockYesLength of the boards bought for the plates, such as 4876.8 (16 ft), in millimeters.
headerNoflat: one flat 2×4, for nonbearing walls (IRC R602.7.4, openings up to 8 ft); 2x6, 2x8, 2x10, 2x12: two boards on edge. 2x8 when left out.
heightYesHeight of the frame, from the bottom of the bottom plate to the top of the top plate, in millimeters.
lengthYesLength of the wall, in millimeters.
cornersNoEnds of the wall at a corner, 0 to 2; each adds a stud beside the end stud. 0 when left out.
meetingNoWalls that butt into this wall between its ends; each adds a stud at both sides. None when left out.
spacingYesStud spacing on center, such as 406.4 (16 in), 609.6 (24 in), 400 or 600, in millimeters.
windowsNoNumber of windows; none when left out.
exteriorNoTrue for an exterior wall, whose king studs follow IRC Table R602.7.5; false for an interior wall, with one king stud at each side. True when left out.
doorWidthNoWidth of a door's rough opening; 965.2 (38 in, for a 36 in door) when left out, in millimeters.
thicknessNoThickness of the lumber; 38.1 (1 1/2 in) when left out, in millimeters.
topPlatesNoTop plates, 1 or 2; 2 when left out.
doorHeightNoHeight of a door's rough opening; 2095.5 (82 1/2 in, for an 80 in door) when left out, in millimeters.
windowWidthNoWidth of a window's rough opening; 914.4 (36 in) when left out, in millimeters.
windowHeightNoHeight of a window's rough opening; 1219.2 (48 in) when left out, in millimeters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already establish that this is a safe, read-only, closed-world calculation, and the description adds substantial behavioral context beyond them. It explains the framing assumptions, the stud/opening layout rules, the IRC table references, the output categories, and the explicit limitation that header and jack sizing are out of scope.

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 description is front-loaded with the use case and avoids obvious filler, but it is a single dense paragraph with long semicolon-separated clauses. For a 20-parameter calculator some length is justified, yet the structure could be much easier to scan.

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

Completeness5/5

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

There is no output schema, so the description must explain what is returned, and it does so extensively: counts, cut pieces, studs to buy with spares, plates, board counts, areas, sheets, and piece placement. Given the tool's complexity, annotations, and rich input schema, an agent has enough context to invoke it correctly.

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

Parameters4/5

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

Schema coverage is already 100%, so the schema carries the baseline parameter documentation. The description still adds useful meaning by explaining how corners add an extra stud, how meeting walls add two studs, how openings are spread evenly, and how exterior versus interior walls affect king stud counts.

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 states a specific verb and resource: it lays out one straight wood stud wall and counts its lumber. It also scopes the output to studs, plates, headers, jacks, cripples, sills, sheets, and areas, making it clearly distinguishable from sibling calculators such as drywall or concrete.

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?

It gives a clear when-to-use trigger: 'Use this when someone plans a stud wall and asks how many studs, plates or headers they need.' It also states an important exclusion, that it does not size headers or jack studs, but it does not name any alternative tool or direct the agent elsewhere for that sizing.

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