{"ok":true,"site":{"host":"whentoprofit.vercel.app","url":"https://whentoprofit.vercel.app/","type":"live","desc":"When will your business become profitable?","tools":[{"name":"get_current_project","kind":"answer","impl":"imperative","description":"Get a structured snapshot of the currently active WhenToProfit project: the project name, business type, forecast start date, the active scenario, all available scenarios with their decision/event counts, the normalized base assumptions, and the key current financial summary (profitability month, cash-flow-positive month, runway, total revenue, total operating profit, final cash balance, annualized revenue, and simple valuation estimate). Use this to understand what the user is modeling before suggesting any scenario or making changes.","title":"Get Current Project","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"get_project_assumptions","kind":"answer","impl":"imperative","description":"Get the currently active WhenToProfit project's assumptions grouped by category (revenue drivers, variable costs, fixed operating costs, startup/initial investment). Returns both the raw business-level driver values with human-readable labels and the normalized universal model inputs used by the financial engine. Use this to understand what drives the current forecast before suggesting or analyzing changes.","title":"Get Project Assumptions","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"get_active_scenario","kind":"answer","impl":"imperative","description":"Get the currently selected WhenToProfit scenario: its id, name, whether it is the Base Case, and every change/event it contains (type, targeted field, value or financing amount, forecast month, calendar month, and whether it is monthly-recuring or one-time). Use this to understand exactly what the user is currently simulating before analyzing or comparing plans. Read-only, never mutates state.","title":"Get Active Scenario","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"get_financial_results","kind":"answer","impl":"imperative","description":"Get the complete current forecast results for the active WhenToProfit scenario: a month-by-month table (revenue, variable costs, gross profit, fixed operating costs, operating profit, financing received, cash balance, ARR) and key summary metrics (operational break-even month, cash-flow-positive month, runway, total revenue, total operating profit, final cash). ARR is only reported when applicable to the business type. Read-only — does not change any state.","title":"Get Financial Results","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"analyze_business","kind":"answer","impl":"imperative","description":"Analyze the currently active WhenToProfit project + scenario using the existing forecast results. Returns the revenue trajectory, gross margin, operating margin, profitability timing, cash/runway situation, and a few deterministic observations. Use this after getting project context to move from raw numbers to decision-oriented insight. Read-only — does not change state.","title":"Analyze Business","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"explain_metric","kind":"answer","impl":"imperative","description":"Explain one WhenToProfit metric to a non-finance user. Provide the metric name (e.g. \"operational break-even\", \"runway\", \"gross margin\", \"operating margin\", \"cash-flow positive\", \"revenue\", \"operating profit\", \"ARR\", or \"valuation\"). Returns what it means, its current value from the live forecast, how WhenToProfit calculates it, and how to interpret it. Read-only.","title":"Explain Metric","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"metric":{"type":"string","description":"The metric to explain (e.g. 'runway', 'gross margin')."}},"required":["metric"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"calculate_valuation","kind":"act","impl":"imperative","description":"Estimate the current active project's value using WhenToProfit's simplified approach. Tech/SaaS uses a revenue/ARR multiple (default 4x); Retail/F&B uses an operating-profit multiple (default 3x). Optionally override the method and multiple. Returns the method, multiple, underlying metric and value, estimated valuation, and a clear disclaimer that this is a planning estimate, not a professional valuation. Read-only.","title":"Calculate Valuation","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"method":{"type":"string","enum":["revenue_multiple","profit_multiple"],"description":"Optional: override the valuation method."},"multiple":{"type":"number","description":"Optional: override the multiple to apply."}},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"compare_scenarios","kind":"answer","impl":"imperative","description":"Compare WhenToProfit scenarios for the current project by running the existing financial engine for each. Pass an optional array of scenario ids; if omitted, all scenarios are compared. Returns per-scenario total revenue, total operating profit, operational break-even month, cash-flow-positive month, runway, ending cash, ARR (when applicable) and simplified valuation. Deterministic and read-only — does not change the active scenario or any project state.","title":"Compare Scenarios","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"scenarioIds":{"type":"array","items":{"type":"string"},"description":"Optional scenario ids to compare. Defaults to all scenarios."}},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"inspect_model_health","kind":"answer","impl":"imperative","description":"Check the current WhenToProfit project + active scenario for obvious data integrity problems the model can detect: zero/negative starting cash, invalid (NaN/negative) assumptions, out-of-range percentages, missing forecast start date, or projected cash exhaustion. Returns a structured status (healthy / warning / error), a list of issues, warnings, and the affected assumption keys when known. Read-only.","title":"Inspect Model Health","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"simulate_scenario","kind":"act","impl":"imperative","description":"Test hypothetical WhenToProfit changes WITHOUT saving them. Provide either raw scenario changes or business events (type + date/fromMonth + params). Runs the existing financial engine on the current project's base inputs combined with the hypothetical changes and returns simulated decision metrics (operational break-even, cash-flow-positive month, runway, totals, ARR/valuation) plus a delta summary vs the current active scenario. Side-effect free — the active scenario, project, and localStorage are never modified. Use this to explore 'what if' ideas before committing.","title":"Simulate Scenario","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"name":{"type":"string","description":"Optional label for the simulation."},"changes":{"type":"array","description":"Optional raw ScenarioChange[] (set/add/financing).","items":{"type":"object"}},"events":{"type":"array","description":"Optional business-event list: { type, date? | fromMonth?, params?, label? }.","items":{"type":"object"}}},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"find_path_to_goal","kind":"answer","impl":"imperative","description":"Search for a feasible set of deterministic changes that could achieve a financial goal in the current WhenToProfit project. Uses the SAME grid-search solver as the Reach a Goal UI. Goal types: 'target_arr', 'target_annual_revenue', 'target_operating_profit' (monthly operating profit), or 'target_profitability' (become profitable by a target month). Optionally require cash to never go negative. Returns the baseline, recommended candidate path(s) with their changes, projected decision metrics, and trade-offs. Never mutates project state. Use when a user asks 'what would it take to reach X?'.","title":"Find Path to Goal","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"goal":{"type":"string","enum":["target_arr","target_annual_revenue","target_operating_profit","target_profitability"],"description":"What goal to reach."},"targetValue":{"type":"number","description":"Target value (dollars; for target_profitability this is the month by which profit must be positive)."},"targetMonth":{"type":"number","description":"Optional forecast month (1-24) by which the goal must be met. Defaults to month 24."},"cashNeverNegative":{"type":"boolean","description":"Require projected cash to never go below $0."}},"required":["goal","targetValue"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"compare_simulation","kind":"act","impl":"imperative","description":"Run several hypothetical WhenToProfit simulations side by side using the existing financial engine, and return key decision metrics for each plus the current active scenario as a baseline. Each simulation is passed the same way as simulate_scenario (raw changes[] or business events[]). Deterministic and read-only — nothing is persisted and the active scenario never changes.","title":"Compare Simulations","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"simulations":{"type":"array","description":"List of simulations, each { name?, changes? | events? }.","items":{"type":"object"}}},"required":["simulations"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"create_scenario","kind":"act","impl":"imperative","description":"WRITE: create and SAVE a new scenario for the active WhenToProfit project. The new scenario is empty, becomes the active scenario, and the project is persisted through the normal store. Base Case is never modified. Returns the new scenario id, name, whether it is active, and the project id.","title":"Create Scenario","inputSchema":{"type":"object","properties":{"name":{"type":"string","description":"Non-empty scenario name."},"description":{"type":"string","description":"Optional description."}},"required":["name"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"add_scenario_event","kind":"act","impl":"imperative","description":"WRITE: add and SAVE a business event/change to an existing NON-Base scenario. Supports the same event types as the UI (hire_people, change_price, change_growth, change_churn, increase_marketing, change_costs, raise_financing, one_time_investment). Provide scenarioId, event type, a date (YYYY-MM) or fromMonth, and event params. Base Case is immutable and rejected. Persists through the normal store and recalculates financial results. To test WITHOUT saving, use simulate_scenario.","title":"Add Scenario Event","inputSchema":{"type":"object","properties":{"scenarioId":{"type":"string","description":"Target scenario id."},"type":{"type":"string","description":"One of the supported business event types."},"date":{"type":"string","description":"Start date YYYY-MM (in the project's forecast)."},"fromMonth":{"type":"number","description":"Or direct forecast month 1-24."},"params":{"type":"object","description":"Event parameters keyed by the event type's fields."},"label":{"type":"string","description":"Optional label."}},"required":["scenarioId","type"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"update_scenario_event","kind":"act","impl":"imperative","description":"WRITE: modify an existing event/change in a NON-Base scenario. Provide scenarioId and the event id (\"change_<index>\"). Update the event type, date/fromMonth, params, or label. Base Case is immutable. Persists through the normal store and recalculates results. Read events first via get_active_scenario to find event ids.","title":"Update Scenario Event","inputSchema":{"type":"object","properties":{"scenarioId":{"type":"string"},"eventId":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Event id (change_<index>)."},"type":{"type":"string","description":"New event type."},"date":{"type":"string","description":"New start date YYYY-MM."},"fromMonth":{"type":"number","description":"Or new forecast month 1-24."},"params":{"type":"object","description":"New parameters."},"label":{"type":"string"}},"required":["scenarioId","eventId","type"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"move_scenario_event","kind":"act","impl":"imperative","description":"WRITE: move an existing event/change in a NON-Base scenario to a different calendar month. Provide scenarioId, eventId (change_<index>), and newDate (YYYY-MM) within the forecast. Base Case is immutable. Persists through the normal store, recalculates results, and returns the old/new dates. Use only when the user intends to change when a decision takes effect.","title":"Move Scenario Event","inputSchema":{"type":"object","properties":{"scenarioId":{"type":"string"},"eventId":{"oneOf":[{"type":"string"},{"type":"integer"}]},"newDate":{"type":"string","description":"New start date YYYY-MM."}},"required":["scenarioId","eventId","newDate"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"remove_scenario_event","kind":"act","impl":"imperative","description":"WRITE: remove an existing event/change from a NON-Base scenario. Provide scenarioId and eventId (\"change_<index>\"). Base Case is immutable. Persists through the normal store, recalculates results, and returns the removed change plus updated metrics.","title":"Remove Scenario Event","inputSchema":{"type":"object","properties":{"scenarioId":{"type":"string"},"eventId":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"required":["scenarioId","eventId"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"rename_scenario","kind":"act","impl":"imperative","description":"WRITE: rename an existing NON-Base scenario in the active project. Provide scenarioId and a non-empty name. Base Case cannot be renamed. Persists through the normal store.","title":"Rename Scenario","inputSchema":{"type":"object","properties":{"scenarioId":{"type":"string"},"name":{"type":"string","description":"Non-empty new name."}},"required":["scenarioId","name"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"set_active_scenario","kind":"act","impl":"imperative","description":"Switch the UI to a different scenario in the active project. Provide scenarioId. Validates that the scenario belongs to the project, then uses the exact same handler as the UI so scorecards/charts update and stay in sync. This changes which scenario is viewed but does NOT modify any assumptions or events.","title":"Set Active Scenario","inputSchema":{"type":"object","properties":{"scenarioId":{"type":"string","description":"Scenario id to make active."}},"required":["scenarioId"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"apply_goal_path","kind":"act","impl":"imperative","description":"WRITE: apply a goal path (candidate changes from find_path_to_goal) to an explicit NON-Base scenario. Each change is validated and applied through the same event-mutation flow the UI uses, then results are recalculated and persisted. Base Case is immutable. Unsupported changes are skipped and reported. Prior steps: find_path_to_goal to obtain a path; create_scenario for a target if needed.","title":"Apply Goal Path","inputSchema":{"type":"object","properties":{"scenarioId":{"type":"string"},"changes":{"type":"array","items":{"type":"object"},"description":"Candidate changes from find_path_to_goal."},"goalLabel":{"type":"string"}},"required":["scenarioId","changes"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"}],"category":"Finance & Crypto","favicon":"/favicons/whentoprofit.vercel.app.ico","apiSurface":"spec","toolCount":20}}