Interval contains
interval_contains · version 1.0.0 · Numbers & math · free, no key needed
Test whether a numeric interval contains a point or interval.
Use when you need to: interval contains.
Supported
- interval contains
Not supported
- filesystem access
- network access
Behavior
- Deterministic pure computation over the supplied JSON input.
- How requests are recorded is described in the privacy policy: https://computefirst.net/privacy.
Input
interval(object, required)target(any JSON value, required)
Output
- object
Limits
- max input bytes: 262144
Example
Request input:
{
"interval": {
"start": 1,
"end": 5
},
"target": 3
}
Response:
{
"result": {
"contains": true
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "interval_contains",
"version": "1.0.0",
"input": {
"interval": {
"start": 1,
"end": 5
},
"target": 3
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/interval_contains/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"interval":{"start":1,"end":5},"target":3}'
The machine-readable contract is at /v1/tools/interval_contains/versions/1.0.0.
CLI
node cli.mjs run interval_contains 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Interval difference: Compute the portion of interval a outside interval b.
- Interval intersection: Compute the closed intersection of two numeric intervals.
- Interval overlap: Test whether two numeric intervals overlap.
- Interval union: Merge overlapping or adjacent numeric intervals.
- Angle DMS convert: Convert a signed integer angle between degrees, arcminutes, and arcseconds as an exact rational.
- Array integer adjacent diff: Replace an array of canonical integer strings with consecutive first differences.