get_profitability
Calculate net profitability per ASIN by subtracting FBA fees, referral fees, ad spend, COGS, and returns from gross sales.
Instructions
Read net profitability by ASIN: gross sales minus FBA fees, referral fees, ad spend, COGS, and returns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | No | Start of the date range, YYYY-MM-DD. | |
| end_date | No | End of the date range, YYYY-MM-DD. |
Implementation Reference
- src/index.ts:172-177 (registration)Tool registration for 'get_profitability' in the tools array. Defines name, description, and inputSchema (dateRangeSchema). No local handler exists — this is a stub that returns a hosted-service notice.
{ name: "get_profitability", description: "Read net profitability by ASIN: gross sales minus FBA fees, referral fees, ad spend, COGS, and returns.", inputSchema: dateRangeSchema, }, - src/index.ts:22-37 (schema)The dateRangeSchema used as input schema for get_profitability. Expects start_date and end_date with YYYY-MM-DD format.
const dateRangeSchema = { type: "object" as const, properties: { start_date: { type: "string", format: "date", description: "Start of the date range, YYYY-MM-DD.", }, end_date: { type: "string", format: "date", description: "End of the date range, YYYY-MM-DD.", }, }, additionalProperties: false, } - src/index.ts:253-279 (handler)The CallToolRequestSchema handler. For 'get_profitability' (and all tools except 'agentcentral_setup'), it returns a stub notice directing users to the hosted endpoint. The actual profitability logic executes server-side on the remote MCP server.
server.setRequestHandler(CallToolRequestSchema, async (request) => { const name = request.params.name if (name === "agentcentral_setup") { return { content: [ { type: "text", text: `Hosted MCP endpoint:\n ${HOSTED_URL}\n\n` + `Setup guide:\n ${SETUP_URL}\n\n` + `Add this to your client config:\n` + `{\n "mcpServers": {\n "agentcentral": {\n "url": "${HOSTED_URL}",\n "headers": { "Authorization": "Bearer ac_live_<YOUR_API_KEY>" }\n }\n }\n}`, }, ], isError: false, } } return { content: [ { type: "text", text: HOSTED_NOTICE, }, ], isError: false, } })