Tools for agents: Exact point-to-plane projection

Project 3D points perpendicularly onto an infinite plane with exact coordinates, squared distances and oriented side labels.

Connect with MCP

{
  "mcpServers": {
    "super-agent-tools": {
      "url": "https://app.getsupers.com/sites/agent-plane-project/mcp"
    }
  }
}
Streamable HTTP · No API key · Stateless

Use this URL in any client supporting remote Streamable HTTP MCP. Calls return structured JSON; inputs are processed without persistence.

Call project_points_to_plane

Plane equation is dot(normal, point-plane_point)=0. The normal must be nonzero but need not be normalized. Inputs are integers or quoted finite decimal/fraction strings; JSON floats and booleans are rejected. Each output preserves input order and index. displacement is projected minus original point. plane_residual is the original point equation value, not signed Euclidean distance. Positive and negative side labels follow the supplied normal direction. squared_distance uses squared coordinate units and avoids irrational square-root rounding. Multiplying the normal by a positive nonzero factor preserves projection and side; a negative factor reverses side only. Empty point lists are allowed. The target is an infinite plane, not a bounded polygon, mesh surface, perspective camera projection or coordinate-system conversion. All coordinates must use the same units and Cartesian frame.

Input and output schemas
{
  "name": "project_points_to_plane",
  "title": "Exact point-to-plane projection",
  "description": "Project rational 3D points onto the infinite plane through plane_point with nonzero normal. Return exact projections, displacement, squared distance and oriented side.",
  "inputSchema": {
    "properties": {
      "points": {
        "items": {
          "maxItems": 3,
          "minItems": 3,
          "prefixItems": [
            {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ]
            },
            {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ]
            },
            {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ]
            }
          ],
          "type": "array"
        },
        "title": "Points",
        "type": "array"
      },
      "plane_point": {
        "maxItems": 3,
        "minItems": 3,
        "prefixItems": [
          {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          },
          {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          },
          {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          }
        ],
        "title": "Plane Point",
        "type": "array"
      },
      "normal": {
        "maxItems": 3,
        "minItems": 3,
        "prefixItems": [
          {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          },
          {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          },
          {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          }
        ],
        "title": "Normal",
        "type": "array"
      }
    },
    "required": [
      "points",
      "plane_point",
      "normal"
    ],
    "title": "project_points_to_planeArguments",
    "type": "object"
  },
  "outputSchema": {
    "additionalProperties": true,
    "title": "project_points_to_planeDictOutput",
    "type": "object"
  },
  "icons": null,
  "annotations": {
    "title": null,
    "readOnlyHint": true,
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": false
  },
  "meta": null,
  "execution": null
}

Run the example to see the actual result.

HTTP alternative

POST https://app.getsupers.com/sites/agent-plane-project/call
Content-Type: application/json

{
  "points": [
    [
      3,
      0,
      0
    ],
    [
      0,
      0,
      0
    ],
    [
      1,
      1,
      1
    ]
  ],
  "plane_point": [
    1,
    0,
    0
  ],
  "normal": [
    1,
    1,
    1
  ]
}

The HTTP and MCP interfaces execute the same implementation. Validation errors are returned explicitly. See the tool notes above for its supported inputs and behavior.

Exact plane projection: normal component, scaling and squared distance

Read the explanation

The saved example defines the infinite plane through one, zero, zero with normal one, one, one. Its equation is x plus y plus z equals one. For the point three, zero, zero, subtract the plane point and dot with the normal: the residual is two. The squared normal length is three, so subtract two thirds of the normal from the original point. The projection becomes seven thirds, minus two thirds, minus two thirds. Its coordinates sum to one, confirming it lies on the plane. The displacement is projected minus original, or minus two thirds in every component. In the normal cross-section shown here, the perpendicular distance is two over square root three; the line uses one hundred forty pixels per coordinate unit. This is a derivation from saved arguments, not a remote service result. The normal need not have length one. Doubling it to two, two, two doubles the residual from two to four and multiplies its squared length from three to twelve. The coefficient becomes one third, and multiplying that by the doubled normal gives the same two-thirds correction in each coordinate. Reversing the normal changes the residual sign and the normal direction together, again preserving the projection. It reverses only the positive or negative side label. The residual itself is not signed Euclidean distance: for the original normal, residual two corresponds to distance two over square root three. A zero normal is invalid because there is no perpendicular direction and the denominator vanishes. All vectors must share the same Cartesian frame and coordinate units. Compare the other saved points. The origin has residual minus one and projects to one third in each coordinate, with positive displacement and negative side. Its squared distance is one third. The point one, one, one has residual two and projects to one third in every coordinate as well; its squared distance is four thirds and its side is positive. The bars use three hundred pixels per squared coordinate unit, producing lengths one hundred and four hundred. Squared distance preserves exact rational values without rounding an irrational square root. The documented input accepts integers and quoted finite decimal or fraction strings, and rejects JSON floats and booleans. Empty point lists are allowed and output order follows input order. This is an infinite-plane projection, not a bounded face, mesh nearest point, camera perspective projection or coordinate conversion. The missing shared app script means this offline preview verifies input preservation, not actual HTTP or MCP execution.

Exact Point-to-Plane Projection Mathematics and Implementation

How does the project_points_to_plane tool compute orthogonal projections and orientation without floating-point rounding?

The tool implements perpendicular projection onto an infinite flat plane defined by a reference anchor point and an unnormalized normal vector. For each point, it evaluates the scalar plane residual by taking the dot product of the normal with the point's offset from the anchor. It scales the normal vector by the ratio of the residual to the normal's squared length, subtracting this displacement vector from the input point. Because all calculations are executed using exact rational arithmetic, coordinates, squared distances, and half-space side labels remain exact fractions or integers without floating-point accumulation.

The tool models an unbounded geometric plane, not finite polygonal facets, meshes, or clipped boundaries. Raw JSON floating-point decimals and boolean flags are rejected by the strict parser; inputs must be integers or quoted rational strings (e.g., '1/3' or '0.25'). The plane_residual field represents the unnormalized scalar dot product n · (p - a), which equals Euclidean signed distance only when the normal vector has unit Euclidean length. True Euclidean distance is not returned directly to prevent introducing irrational square roots.

Try a worked example

Using the initial form arguments with plane_point [1, 0, 0] and normal [1, 1, 1], clicking 'Run tool' evaluates the points [[3, 0, 0], [0, 0, 0], [1, 1, 1]]. For the first point [3, 0, 0], the offset is [2, 0, 0] and normal squared length is 3. The dot product yields residual 2, producing a displacement of [-2/3, -2/3, -2/3] and exact projected coordinates ['7/3', '-2/3', '-2/3'] with squared distance '4/3' and side 'positive'. The structured result pre block updates to display these exact rational string outputs.

Vector Projection Mechanics

An infinite plane satisfies dot(n, x - a) = 0, where n is a nonzero normal vector and a is a known point on the plane. For any test point p, the scalar quantity residual = dot(n, p - a) measures the unnormalized directional offset from the plane. The orthogonal projection onto the plane equals p - (residual / dot(n, n)) * n.

The displacement vector is defined as projected - p = -(residual / dot(n, n)) * n. Multiplying the normal by any positive scalar factor leaves the projection, displacement, and half-space side unchanged, whereas multiplying by a negative scalar reverses the oriented side classification.

Exact Rational Representation

The Python implementation parses every coordinate into a Python Fraction. The squared distance is computed as residual^2 / dot(n, n). By outputting squared distance rather than Euclidean distance, the service avoids non-terminating decimal approximations and square root irrationality.