marginmath
v0.1.0Ecommerce margin calculators: break-even ROAS, profit scenarios, UTM links, weekly reports.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
calculate_break_even_roas Calculate break-even ROAS
Calculate break-even and target-profit ROAS and maximum CPA from user-supplied revenue, costs, percentage fees and refund reserve. Ask for missing inputs even if asked not to ask questions. Unknown fields must be null, never guessed zeros or a default currency. If any input is unknown, returns needs_input with questions and no estimate. Only explicit user-supplied zeros are valid. Does not read an ad account or change a budget.
| Parameter | Type | Description |
|---|---|---|
currency * | User-supplied ISO 4217 currency code. Use null if unknown; never assume USD. | |
paymentFeeRate * | User-supplied payment fee percentage: 3 means 3%. Use null if unknown; do not substitute 0. | |
price * | User-supplied revenue per order after discounts and excluding collected taxes. Use null if unknown. | |
productCost * | User-supplied product cost per order. Use null if unknown; use 0 only when the user explicitly supplied zero. | |
refundRate * | User-supplied refund reserve percentage. Use null if unknown; do not substitute 0. | |
shippingCost * | User-supplied net shipping and fulfillment cost per order. Use null if unknown; do not substitute 0. | |
targetProfit * | User-supplied desired profit per order, or 0 when the user requests break-even only. Use null if unknown. |
compare_profit_scenarios Compare profit scenarios
Compare two to five user-supplied pricing or cost scenarios in one currency. Unknown inputs must be null, never guessed zeros or a default currency. If any scenario is incomplete, returns needs_input with labeled questions and no numeric comparison; ask for those inputs. Complete scenarios return contribution, maximum CPA and ROAS. Does not predict sales or change pricing or advertising.
| Parameter | Type | Description |
|---|---|---|
scenarios * | array | Array of two to five user-supplied pricing or cost scenarios to compare, in one currency |
build_campaign_utm Build a campaign UTM link
Format one HTTP(S) campaign URL with source, medium and campaign, plus optional content and term. Trims and lowercases UTM values and replaces whitespace with underscores. Returns naming warnings. Never visits the URL, sends a message, saves a campaign or changes tracking settings.
| Parameter | Type | Description |
|---|---|---|
campaign * | string | UTM campaign name (utm_campaign) |
medium * | string | UTM medium (utm_medium), such as email, cpc or social |
source * | string | UTM source (utm_source), such as a site or newsletter name |
url * | string | Destination URL. This tool formats it locally and never fetches it. |
content | string | UTM content tag (utm_content) distinguishing variants of the same ad or link |
term | string | UTM term (utm_term), the paid-search keyword tag |
search_ecommerce_resources Search Ecomwith resources
Search Ecomwith published tutorial metadata, internal tool descriptions and public answer summaries in English or Chinese. Returns up to ten source links with content access labels. Does not search the wider web, fetch websites or return paid lesson bodies, drafts or customer data.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search text to match against the ecommerce resources |
limit | integer | Maximum number of results to return |
locale | string | Locale for the response: en or zh |
list_public_weekly_reports List public ecommerce weekly reports
List up to ten Ecomwith published or corrected ecommerce reports with public summaries and dates. Does not return drafts, withdrawn issues, member-only sections, subscriber data or unpublished research. These are dated editorial reports, not a live news feed.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum number of results to return |
locale | string | Locale for the response: en or zh |
get_public_weekly_report Read a public ecommerce weekly report
Read guest excerpts and cited source links for one published or corrected Ecomwith weekly report, using a slug returned by list_public_weekly_reports. Retain publication and correction dates and each cited source verificationStatus label; do not upgrade weaker evidence. Rechecks publication state each call. A withdrawn, unpublished, missing or unavailable-language report is not returned. No member content or private research notes are accessible.
| Parameter | Type | Description |
|---|---|---|
slug * | string | Slug identifying the weekly report to read |
locale | string | Locale for the response: en or zh |