{"openapi":"3.1.0","info":{"title":"natural-date-parse","version":"0.1.0","description":"Finds every date, time, range and period in text and resolves each to an ISO 8601 value with UTC offset plus a start/end span in an IANA timezone, relative to a reference instant. Reports matched text, index, ambiguity flags and confidence.","x-guidance":"Natural Date Parse turns phrases like \"next Friday 3pm\", \"end of Q3\" or \"Aug 1 to Aug 5\" into ISO 8601 dates with a start/end span, resolved in an IANA timezone (DST-correct offsets) against an explicit reference date. Finds every date in a text with matched text and index, handles quarters, month/week/year periods and business days, and flags ambiguity with a confidence level. Deterministic, no LLM, no network. Tools: `parse_dates`.","contact":{"email":"contact@gratefuldevai.com"}},"servers":[{"url":"https://natural-date-parse.x402supply.com"}],"paths":{"/mcp":{"post":{"operationId":"natural-date-parse_call","summary":"Call natural-date-parse via MCP tools/call","tags":["natural-date-parse"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"const":"tools/call"},"params":{"type":"object","required":["name","arguments"],"properties":{"name":{"const":"parse_dates"},"arguments":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":2000,"description":"Text containing date phrases, e.g. 'ship next Friday 3pm, review by end of Q3'"},"tz":{"type":"string","maxLength":64,"description":"IANA timezone for resolution, e.g. America/New_York. Default UTC","default":"UTC"},"ref":{"type":"string","maxLength":40,"description":"Reference instant, ISO 8601 (2026-10-29 or 2026-10-29T14:00:00Z). Default: now. Dates without an offset are read in tz"},"weekStart":{"type":"string","enum":["monday","sunday"],"description":"First day of the week for 'this week', 'next week' and week spans","default":"monday"}},"required":["text"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}}}},"responses":{"200":{"description":"Tool result","content":{"application/json":{"schema":{"type":"object","description":"JSON-RPC 2.0 response envelope. `result.content[0].text` is a JSON-encoded string matching the schema in `x-mcp-result-schema`.","properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"result":{"type":"object","properties":{"content":{"type":"array","items":{"type":"object","properties":{"type":{"const":"text"},"text":{"type":"string"}}}}}}},"x-mcp-result-schema":{"type":"object","required":["text","tz","reference","found","count","dates","warnings","source"],"properties":{"text":{"type":"string"},"tz":{"type":"string"},"reference":{"type":"object","required":["iso","utc","defaulted"],"properties":{"iso":{"type":"string"},"utc":{"type":"string"},"defaulted":{"type":"boolean"}}},"found":{"type":"boolean"},"count":{"type":"integer"},"dates":{"type":"array","items":{"type":"object","required":["text","index","kind","iso","utc","span","confidence","ambiguous","flags"],"properties":{"text":{"type":"string"},"index":{"type":"integer"},"kind":{"type":"string"},"iso":{"type":"string"},"utc":{"type":"string"},"span":{"type":"object","required":["start","end","unit"],"properties":{"start":{"type":"string"},"end":{"type":"string"},"unit":{"type":"string"}}},"confidence":{"type":"string"},"ambiguous":{"type":"boolean"},"flags":{"type":"array","items":{"type":"string"}}}}},"warnings":{"type":"array","items":{"type":"string"}},"source":{"type":"array","items":{"type":"string"}}}}}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"accepts":{"type":"array"}}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]}}},"/tools/parse_dates":{"post":{"operationId":"natural-date-parse_parse_dates_http","summary":"Finds every date, time, range and period in text and resolves each to an ISO 8601 value with UTC offset plus a start/end span in an IANA timezone, relative to a reference instant. Reports matched text, index, ambiguity flags and confidence.","tags":["natural-date-parse"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":2000,"description":"Text containing date phrases, e.g. 'ship next Friday 3pm, review by end of Q3'"},"tz":{"type":"string","maxLength":64,"description":"IANA timezone for resolution, e.g. America/New_York. Default UTC","default":"UTC"},"ref":{"type":"string","maxLength":40,"description":"Reference instant, ISO 8601 (2026-10-29 or 2026-10-29T14:00:00Z). Default: now. Dates without an offset are read in tz"},"weekStart":{"type":"string","enum":["monday","sunday"],"description":"First day of the week for 'this week', 'next week' and week spans","default":"monday"}},"required":["text"],"additionalProperties":false},"example":{"text":"Ship next Friday 3pm, review by end of Q3 2026, kickoff Aug 1 to Aug 5","tz":"America/New_York","ref":"2026-10-29T14:00:00Z"}}}},"responses":{"200":{"description":"Tool result (plain JSON, not MCP-wrapped)","content":{"application/json":{"schema":{"type":"object","required":["text","tz","reference","found","count","dates","warnings","source"],"properties":{"text":{"type":"string"},"tz":{"type":"string"},"reference":{"type":"object","required":["iso","utc","defaulted"],"properties":{"iso":{"type":"string"},"utc":{"type":"string"},"defaulted":{"type":"boolean"}}},"found":{"type":"boolean"},"count":{"type":"integer"},"dates":{"type":"array","items":{"type":"object","required":["text","index","kind","iso","utc","span","confidence","ambiguous","flags"],"properties":{"text":{"type":"string"},"index":{"type":"integer"},"kind":{"type":"string"},"iso":{"type":"string"},"utc":{"type":"string"},"span":{"type":"object","required":["start","end","unit"],"properties":{"start":{"type":"string"},"end":{"type":"string"},"unit":{"type":"string"}}},"confidence":{"type":"string"},"ambiguous":{"type":"boolean"},"flags":{"type":"array","items":{"type":"string"}}}}},"warnings":{"type":"array","items":{"type":"string"}},"source":{"type":"array","items":{"type":"string"}}}},"example":{"text":"Ship next Friday 3pm, review by end of Q3 2026, kickoff Aug 1 to Aug 5","tz":"America/New_York","reference":{"iso":"2026-10-29T10:00:00-04:00","utc":"2026-10-29T14:00:00.000Z","defaulted":false},"found":true,"count":3,"dates":[{"text":"next Friday 3pm","index":5,"kind":"datetime","iso":"2026-11-06T15:00:00-05:00","utc":"2026-11-06T20:00:00.000Z","span":{"start":"2026-11-06T15:00:00-05:00","end":"2026-11-06T15:00:00-05:00","unit":"instant"},"confidence":"high","ambiguous":false,"flags":[]},{"text":"end of Q3 2026","index":32,"kind":"period_boundary","iso":"2026-09-30T23:59:59-04:00","utc":"2026-10-01T03:59:59.000Z","span":{"start":"2026-09-30T00:00:00-04:00","end":"2026-09-30T23:59:59-04:00","unit":"quarter"},"confidence":"medium","ambiguous":false,"flags":["in_past"]},{"text":"Aug 1 to Aug 5","index":56,"kind":"range","iso":"2027-08-01","utc":"2027-08-01T04:00:00.000Z","span":{"start":"2027-08-01T00:00:00-04:00","end":"2027-08-05T23:59:59-04:00","unit":"range"},"confidence":"medium","ambiguous":false,"flags":["year_assumed"]}],"warnings":[],"source":["https://github.com/wanasit/chrono"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"accepts":{"type":"array"}}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]}}}}}