{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"rectangle"},"result":{"entity_type":"calculator","id":"rectangle","calculator_id":"rectangle","canonical_url":"https://tttkmbb.com/geometry/rectangle","name":"Rectangle Calculator","title":"Rectangle Calculator – Area, Perimeter and Diagonal from Length and Width","category":"geometry","category_name":"Geometry","tool_name":"calculate_rectangle_properties","featured_mcp_tool":false,"description":"Computes the area, perimeter and diagonal of a rectangle from its length and width. Lengths are unit-agnostic; the area is in the square of the input unit.","use_when":"You need the area, perimeter or diagonal of a rectangle or square (enter equal length and width).","do_not_use_when":"The shape is a box with depth (use rectangular-prism) or a slanted quadrilateral (use parallelogram or trapezoid).","inputs":[{"name":"length","label":"Length","type":"number","unit":"units","required":true,"exclusive_min":0,"description":"Length of the rectangle.","example":5},{"name":"width","label":"Width","type":"number","unit":"units","required":true,"exclusive_min":0,"description":"Width of the rectangle.","example":3}],"outputs":[{"name":"area","label":"Area","type":"number","unit":"units²","decimals":4,"description":"length × width."},{"name":"perimeter","label":"Perimeter","type":"number","unit":"units","decimals":4,"description":"2 × (length + width)."},{"name":"diagonal","label":"Diagonal","type":"number","unit":"units","decimals":4,"description":"√(length² + width²)."},{"name":"diagonal_angle_deg","label":"Diagonal angle","type":"number","unit":"degrees","decimals":4,"description":"Angle between the diagonal and the length side = atan(width / length)."}],"input_schema":{"type":"object","properties":{"length":{"description":"Length of the rectangle. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[5],"x-unit":"units"},"width":{"description":"Width of the rectangle. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[3],"x-unit":"units"}},"additionalProperties":false,"required":["length","width"]},"output_schema":{"type":"object","properties":{"area":{"description":"length × width. Unit: units².","type":"number","x-unit":"units²"},"perimeter":{"description":"2 × (length + width). Unit: units.","type":"number","x-unit":"units"},"diagonal":{"description":"√(length² + width²). Unit: units.","type":"number","x-unit":"units"},"diagonal_angle_deg":{"description":"Angle between the diagonal and the length side = atan(width / length). Unit: degrees.","type":"number","x-unit":"degrees"}}},"formula":"area = length × width; perimeter = 2 × (length + width); diagonal = √(length² + width²); diagonal_angle_deg = atan(width / length)","sources":[{"name":"Wikipedia – Rectangle","url":"https://en.wikipedia.org/wiki/Rectangle","type":"reference","retrieved_at":"2026-09-23"},{"name":"Wolfram MathWorld – Rectangle","url":"https://mathworld.wolfram.com/Rectangle.html","type":"reference","retrieved_at":"2026-09-23"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"5 by 3","inputs":{"length":5,"width":3},"expected":{"area":15,"perimeter":16,"diagonal":5.831,"diagonal_angle_deg":30.9638},"url":"https://tttkmbb.com/api/v1/calculate/rectangle?length=5&width=3"},{"name":"12 by 5","inputs":{"length":12,"width":5},"expected":{"area":60,"perimeter":34,"diagonal":13,"diagonal_angle_deg":22.6199},"url":"https://tttkmbb.com/api/v1/calculate/rectangle?length=12&width=5"}],"faq":[{"q":"Does it matter which side is the length?","a":"No for area, perimeter and diagonal. Only diagonal_angle_deg is measured from the side entered as length."},{"q":"How do I use it for a square?","a":"Enter the same value for length and width; the diagonal is then side × √2 and the diagonal angle is 45°."}],"tags":["rectangle","area of a rectangle","perimeter","diagonal","square"],"related":[{"calculator_id":"rectangular-prism","reason":"Add a height to get a box's volume and surface area."},{"calculator_id":"parallelogram","reason":"Quadrilateral with slanted sides."},{"calculator_id":"flooring","reason":"Estimate flooring material for a rectangular room."}],"links":{"html":"https://tttkmbb.com/geometry/rectangle","markdown":"https://tttkmbb.com/geometry/rectangle.md","json":"https://tttkmbb.com/geometry/rectangle.json","api":"https://tttkmbb.com/api/v1/calculate/rectangle","schema":"https://tttkmbb.com/api/v1/calculators/rectangle","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:23:50Z","next_actions":[{"tool":"run_calculator","calculator_id":"rectangle","reason":"Run Rectangle Calculator with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/geometry/rectangle.md"}}