← All tool references

Construction · not_available

Fence Calculator

Estimate fence length, line posts, panels, and concrete from perimeter, gates, post spacing, and panel width.

Open public tool

Overview

Category
Construction
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/fence-calculator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/fence-calculator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

perimeter · number · required
Enter the total fence perimeter used in the calculation.
gate_count · number · optional
Enter the number of gates used in the calculation.
gate_width · number · optional
Enter the width per gate used in the calculation.
post_spacing · number · required
Enter the maximum post spacing used in the calculation.
panel_width · number · required
Enter the fence panel width used in the calculation.
concrete_per_post · number · optional
Enter the concrete per post used in the calculation.
waste_percent · number · required
Enter the material allowance used in the calculation.
{
    "type": "object",
    "properties": {
        "perimeter": {
            "type": "number",
            "description": "Enter the total fence perimeter used in the calculation.",
            "minimum": 0
        },
        "gate_count": {
            "type": "number",
            "description": "Enter the number of gates used in the calculation.",
            "minimum": 0
        },
        "gate_width": {
            "type": "number",
            "description": "Enter the width per gate used in the calculation.",
            "minimum": 0
        },
        "post_spacing": {
            "type": "number",
            "description": "Enter the maximum post spacing used in the calculation.",
            "minimum": 1
        },
        "panel_width": {
            "type": "number",
            "description": "Enter the fence panel width used in the calculation.",
            "minimum": 0.01000000000000000020816681711721685132943093776702880859375
        },
        "concrete_per_post": {
            "type": "number",
            "description": "Enter the concrete per post used in the calculation.",
            "minimum": 0
        },
        "waste_percent": {
            "type": "number",
            "description": "Enter the material allowance used in the calculation."
        }
    },
    "required": [
        "perimeter",
        "post_spacing",
        "panel_width",
        "waste_percent"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

fence_length · number
Net fence length produced by the calculation.
posts_needed · number
Estimated posts produced by the calculation.
panels_needed · number
Estimated panels produced by the calculation.
concrete_bags · number
Estimated concrete bags produced by the calculation.
{
    "type": "object",
    "properties": {
        "fence_length": {
            "type": "number",
            "description": "Net fence length produced by the calculation."
        },
        "posts_needed": {
            "type": "number",
            "description": "Estimated posts produced by the calculation."
        },
        "panels_needed": {
            "type": "number",
            "description": "Estimated panels produced by the calculation."
        },
        "concrete_bags": {
            "type": "number",
            "description": "Estimated concrete bags produced by the calculation."
        }
    },
    "additionalProperties": false
}

Fence Calculator example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/fence-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "perimeter": 200,
    "gate_count": 1,
    "gate_width": 4,
    "post_spacing": 8,
    "panel_width": 8,
    "concrete_per_post": 0.5,
    "waste_percent": 5
}'
{
    "ok": true,
    "data": {
        "slug": "fence-calculator",
        "result": {
            "values": {
                "fence_length": 196,
                "posts_needed": 28,
                "panels_needed": 26,
                "concrete_bags": 14
            },
            "display": {
                "display": "196"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.