{"openapi":"3.1.0","info":{"title":"Mailcraft API","version":"0.1.0","description":"Original professional email template compositions across 10 workplace scenarios in formal/casual/firm tones, plus subject lines, a rule-based tone rewriter, length checks and send-timing guidance.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://mailcraft.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/mailcraft/docs"},"termsOfService":"https://connectorbay.com/mailcraft/terms"},"servers":[{"url":"https://mailcraft.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/mailcraft/docs"},"security":[{},{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/generate_email":{"post":{"operationId":"generate_email","summary":"Generate an original email draft (subject, greeting, body, sign-off, and full text) for a scenario and","description":"Generate an original email draft (subject, greeting, body, sign-off, and full text) for a scenario and\n    tone. Use for \"write a formal follow-up email\", \"draft a casual thank-you note\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"scenario":{"description":"Email scenario — see list_scenarios.","examples":["introduction","declining_meeting","apology"],"title":"Scenario","type":"string"},"tone":{"description":"formal | casual | firm","title":"Tone","type":"string"},"recipient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Recipient's name for the greeting.","title":"Recipient Name"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Your name for the sign-off.","title":"Sender Name"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Scenario-specific fields — see list_scenarios' context_fields.","examples":[{"alternative":"Thursday afternoon","reason":"a scheduling conflict"}],"title":"Context"}},"required":["scenario","tone"],"title":"generate_emailArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_scenarios":{"post":{"operationId":"list_scenarios","summary":"List every supported email scenario with its label and expected context fields. Use for \"what email","description":"List every supported email scenario with its label and expected context fields. Use for \"what email\n    templates do you have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_scenariosArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_tones":{"post":{"operationId":"list_tones","summary":"List the supported tones (formal, casual, firm) with when to use each. Use for \"what tones can I pick","description":"List the supported tones (formal, casual, firm) with when to use each. Use for \"what tones can I pick\n    from\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_tonesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/subject_line_suggestions":{"post":{"operationId":"subject_line_suggestions","summary":"3 subject-line options for a scenario. Use for \"give me a subject line for a deadline extension email\".","description":"3 subject-line options for a scenario. Use for \"give me a subject line for a deadline extension email\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"scenario":{"description":"Email scenario — see list_scenarios.","title":"Scenario","type":"string"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Scenario-specific fields to fill into the subject.","title":"Context"}},"required":["scenario"],"title":"subject_line_suggestionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/opening_lines":{"post":{"operationId":"opening_lines","summary":"Reusable greeting and opening-sentence options for a tone, plus this scenario's own opening line. Use for","description":"Reusable greeting and opening-sentence options for a tone, plus this scenario's own opening line. Use for\n    \"give me some ways to open a casual email\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"scenario":{"description":"Email scenario — see list_scenarios.","title":"Scenario","type":"string"},"tone":{"description":"formal | casual | firm","title":"Tone","type":"string"}},"required":["scenario","tone"],"title":"opening_linesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/closing_lines":{"post":{"operationId":"closing_lines","summary":"Sign-off options for a tone, with guidance on pairing them with your name. Use for \"how should I sign off","description":"Sign-off options for a tone, with guidance on pairing them with your name. Use for \"how should I sign off\n    a firm email\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"tone":{"description":"formal | casual | firm","title":"Tone","type":"string"}},"required":["tone"],"title":"closing_linesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/tone_rewrite":{"post":{"operationId":"tone_rewrite","summary":"Apply rule-based phrase substitution to shift text toward a target tone (contractions, hedging words,","description":"Apply rule-based phrase substitution to shift text toward a target tone (contractions, hedging words,\n    common formal/casual phrase swaps), listing exactly what changed. A heuristic aid, not a full rewrite — review\n    before sending. Use for \"make this email sound more formal\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"text":{"description":"Existing email text to adjust.","minLength":1,"title":"Text","type":"string"},"target_tone":{"description":"formal | casual | firm","title":"Target Tone","type":"string"}},"required":["text","target_tone"],"title":"tone_rewriteArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/email_length_check":{"post":{"operationId":"email_length_check","summary":"Word/sentence counts, estimated reading time, and a plain-language verdict on whether the email is too","description":"Word/sentence counts, estimated reading time, and a plain-language verdict on whether the email is too\n    long. Use for \"is this email too long\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"text":{"description":"Email text to check.","minLength":1,"title":"Text","type":"string"}},"required":["text"],"title":"email_length_checkArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/follow_up_timing_suggestion":{"post":{"operationId":"follow_up_timing_suggestion","summary":"A hand-curated recommended wait before following up on a scenario, and a status (too soon / good time /","description":"A hand-curated recommended wait before following up on a scenario, and a status (too soon / good time /\n    overdue) if you give how many business days have passed. Use for \"when should I follow up on this cold\n    email\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"scenario":{"description":"Email scenario — see list_scenarios.","title":"Scenario","type":"string"},"business_days_since_sent":{"anyOf":[{"maximum":90,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"How many business days since you sent the original email.","title":"Business Days Since Sent"}},"required":["scenario"],"title":"follow_up_timing_suggestionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/checklist_before_sending":{"post":{"operationId":"checklist_before_sending","summary":"A pre-send checklist (names, attachments, tone, call-to-action). Use for \"what should I check before I hit","description":"A pre-send checklist (names, attachments, tone, call-to-action). Use for \"what should I check before I hit\n    send\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"checklist_before_sendingArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}