Tools for agents: Exact ray-box intersection
Compute the exact forward-ray interval inside a closed axis-aligned 3D box.
Connect with MCP
{
"mcpServers": {
"super-agent-tools": {
"url": "https://app.getsupers.com/sites/agent-ray-box/mcp"
}
}
}Use this URL in any client supporting remote Streamable HTTP MCP. Calls return structured JSON; inputs are processed without persistence.
Call intersect_ray_box
Ray equation is origin+t*direction with t >= 0. Direction is nonzero and need not be normalized; t is not Euclidean distance. Box boundaries are included; equal min/max coordinates permit flat, line or point boxes. A tangent intersection returns a single-point interval. If the origin is in the closed box, interval start is 0 and entry_point is the origin, not the backward boundary crossing. Parallel components are handled without division by zero. A miss returns null interval and points; single_point is then false. Inputs are integers or quoted decimal/fraction strings; JSON floats and booleans are rejected. Results use exact rational strings without geometric epsilon. Axes and units must match; this does not transform oriented boxes or intersect arbitrary meshes.
Input and output schemas
{
"name": "intersect_ray_box",
"title": "Exact ray-box intersection",
"description": "Intersect origin+t*direction, t>=0, with a closed axis-aligned box. Return an exact interval and endpoint coordinates, including tangent and degenerate-box hits.",
"inputSchema": {
"properties": {
"origin": {
"maxItems": 3,
"minItems": 3,
"prefixItems": [
{
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
{
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
{
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
}
],
"title": "Origin",
"type": "array"
},
"direction": {
"maxItems": 3,
"minItems": 3,
"prefixItems": [
{
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
{
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
{
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
}
],
"title": "Direction",
"type": "array"
},
"box_min": {
"maxItems": 3,
"minItems": 3,
"prefixItems": [
{
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
{
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
{
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
}
],
"title": "Box Min",
"type": "array"
},
"box_max": {
"maxItems": 3,
"minItems": 3,
"prefixItems": [
{
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
{
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
{
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
}
],
"title": "Box Max",
"type": "array"
}
},
"required": [
"origin",
"direction",
"box_min",
"box_max"
],
"title": "intersect_ray_boxArguments",
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"title": "intersect_ray_boxDictOutput",
"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-ray-box/call
Content-Type: application/json
{
"origin": [
-2,
1,
1
],
"direction": [
2,
0,
0
],
"box_min": [
0,
0,
0
],
"box_max": [
3,
2,
2
]
}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.