{"openapi":"3.1.0","info":{"title":"Invoicecraft API","version":"0.1.0","description":"A fully local invoice-generation toolkit for freelancers and small businesses: computes subtotal, discount, and tax from line items and formats a markdown invoice, supports standard payment-terms presets with a computed due date, a standalone due-date calculator, and invoice-numbering-scheme guidance — zero upstream calls, computed from the numbers you provide.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://invoicecraft.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/invoicecraft/docs"},"termsOfService":"https://connectorbay.com/invoicecraft/terms"},"servers":[{"url":"https://invoicecraft.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/invoicecraft/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_invoice":{"post":{"operationId":"generate_invoice","summary":"Computes subtotal, discount, tax, total due, and a computed due date from line items and a payment-terms","description":"Computes subtotal, discount, tax, total due, and a computed due date from line items and a payment-terms\n    preset, and returns a ready-to-send markdown invoice. Use for \"invoice for 10 hours at $150/hour plus a $200\n    flat fee, 8% tax, Net 30 starting today\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"business_name":{"description":"Your business or freelance name, shown as the invoice sender.","title":"Business Name","type":"string"},"client_name":{"description":"The client being billed.","title":"Client Name","type":"string"},"line_items":{"description":"Each item: {description: str, quantity: number, rate: number}.","items":{"additionalProperties":true,"type":"object"},"title":"Line Items","type":"array"},"invoice_date":{"description":"ISO date, YYYY-MM-DD.","title":"Invoice Date","type":"string"},"payment_terms":{"default":"net_30","description":"due_on_receipt | net_7 | net_10 | net_15 | net_30 | net_45 | net_60","title":"Payment Terms","type":"string"},"tax_pct":{"default":0.0,"description":"Tax rate, %, applied after any discount.","maximum":100,"minimum":0,"title":"Tax Pct","type":"number"},"discount_pct":{"default":0.0,"description":"Discount rate, %, applied to the subtotal before tax.","maximum":100,"minimum":0,"title":"Discount Pct","type":"number"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"An invoice number/ID to print on the invoice, if you have one.","title":"Invoice Number"},"currency_symbol":{"default":"$","description":"Currency symbol to format amounts with.","title":"Currency Symbol","type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Optional free-text note printed at the bottom of the invoice.","title":"Notes"}},"required":["business_name","client_name","line_items","invoice_date"],"title":"generate_invoiceArguments","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/due_date_calculator":{"post":{"operationId":"due_date_calculator","summary":"Standalone due-date calculator: an invoice date plus a payment-terms preset gives the due date, using real","description":"Standalone due-date calculator: an invoice date plus a payment-terms preset gives the due date, using real\n    calendar-day arithmetic. Use for \"what's the due date for a Net 45 invoice dated March 3rd\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"invoice_date":{"description":"ISO date, YYYY-MM-DD.","title":"Invoice Date","type":"string"},"payment_terms":{"default":"net_30","description":"due_on_receipt | net_7 | net_10 | net_15 | net_30 | net_45 | net_60","title":"Payment Terms","type":"string"}},"required":["invoice_date"],"title":"due_date_calculatorArguments","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/invoice_numbering_scheme_guide":{"post":{"operationId":"invoice_numbering_scheme_guide","summary":"Compares invoice-numbering schemes (plain sequential, year-reset sequential, date-based, client-prefixed)","description":"Compares invoice-numbering schemes (plain sequential, year-reset sequential, date-based, client-prefixed)\n    with pros, cons, and who each fits best, plus general numbering principles (never reuse a number, never skip\n    without explanation). Use for \"what invoice numbering scheme should I use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"scheme":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"A specific scheme to look up (e.g. 'sequential', 'date-based'); omit for all schemes plus general principles.","title":"Scheme"}},"title":"invoice_numbering_scheme_guideArguments","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/invoicecraft_glossary":{"post":{"operationId":"invoicecraft_glossary","summary":"Definitions of common invoicing terms (Net 30, due on receipt, 2/10 net 30, line item, subtotal vs. total,","description":"Definitions of common invoicing terms (Net 30, due on receipt, 2/10 net 30, line item, subtotal vs. total,\n    invoice aging, remittance advice, W-9/W-8BEN, ...). Use for \"what does Net 30 mean\", \"what's 2/10 net 30\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"term":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"A specific term to look up; omit to list all.","title":"Term"}},"title":"invoicecraft_glossaryArguments","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}}}}