@fload-ai/mcp 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +79 -46
  2. package/dist/.tsbuildinfo +1 -0
  3. package/dist/api-client.d.ts +11 -0
  4. package/dist/api-client.d.ts.map +1 -0
  5. package/dist/api-client.js +53 -0
  6. package/dist/api-client.js.map +7 -0
  7. package/dist/bin.d.ts +2 -0
  8. package/dist/bin.d.ts.map +1 -0
  9. package/dist/bin.js +2012 -0
  10. package/dist/bin.js.map +7 -0
  11. package/dist/config.d.ts +8 -0
  12. package/dist/config.d.ts.map +1 -0
  13. package/dist/index.d.ts +6 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +933 -247
  16. package/dist/index.js.map +4 -4
  17. package/dist/lib/format.d.ts +5 -0
  18. package/dist/lib/format.d.ts.map +1 -0
  19. package/dist/rate-limiter.d.ts +12 -0
  20. package/dist/rate-limiter.d.ts.map +1 -0
  21. package/dist/server.d.ts +5 -0
  22. package/dist/server.d.ts.map +1 -0
  23. package/dist/tools/actions.d.ts +69 -0
  24. package/dist/tools/actions.d.ts.map +1 -0
  25. package/dist/tools/ads.d.ts +35 -0
  26. package/dist/tools/ads.d.ts.map +1 -0
  27. package/dist/tools/agents.d.ts +149 -0
  28. package/dist/tools/agents.d.ts.map +1 -0
  29. package/dist/tools/analytics.d.ts +84 -0
  30. package/dist/tools/analytics.d.ts.map +1 -0
  31. package/dist/tools/anomalies.d.ts +107 -0
  32. package/dist/tools/anomalies.d.ts.map +1 -0
  33. package/dist/tools/apps.d.ts +49 -0
  34. package/dist/tools/apps.d.ts.map +1 -0
  35. package/dist/tools/aso.d.ts +135 -0
  36. package/dist/tools/aso.d.ts.map +1 -0
  37. package/dist/tools/chat.d.ts +69 -0
  38. package/dist/tools/chat.d.ts.map +1 -0
  39. package/dist/tools/dashboard.d.ts +17 -0
  40. package/dist/tools/dashboard.d.ts.map +1 -0
  41. package/dist/tools/forecasting.d.ts +26 -0
  42. package/dist/tools/forecasting.d.ts.map +1 -0
  43. package/dist/tools/growth.d.ts +43 -0
  44. package/dist/tools/growth.d.ts.map +1 -0
  45. package/dist/tools/index.d.ts +20 -0
  46. package/dist/tools/index.d.ts.map +1 -0
  47. package/dist/tools/index.js +1952 -0
  48. package/dist/tools/index.js.map +7 -0
  49. package/dist/tools/reviews.d.ts +119 -0
  50. package/dist/tools/reviews.d.ts.map +1 -0
  51. package/package.json +18 -3
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/rate-limiter.ts", "../../src/tools/apps.ts", "../../src/lib/format.ts", "../../src/tools/reviews.ts", "../../src/tools/analytics.ts", "../../src/tools/agents.ts", "../../src/tools/anomalies.ts", "../../src/tools/ads.ts", "../../src/tools/growth.ts", "../../src/tools/forecasting.ts", "../../src/tools/dashboard.ts", "../../src/tools/actions.ts", "../../src/tools/aso.ts", "../../src/tools/chat.ts", "../../src/tools/index.ts"],
4
+ "sourcesContent": ["export class RateLimiter {\n private calls: Map<string, number[]> = new Map();\n\n constructor(\n private maxCalls: number = 100,\n private windowMs: number = 60_000\n ) {}\n\n check(key: string): { allowed: boolean; remaining: number; retryAfterMs: number } {\n const now = Date.now();\n const windowStart = now - this.windowMs;\n\n // Get existing calls, prune expired\n let timestamps = this.calls.get(key) || [];\n timestamps = timestamps.filter((t) => t > windowStart);\n\n if (timestamps.length >= this.maxCalls) {\n const oldestInWindow = timestamps[0];\n const retryAfterMs = oldestInWindow + this.windowMs - now;\n this.calls.set(key, timestamps);\n return { allowed: false, remaining: 0, retryAfterMs };\n }\n\n timestamps.push(now);\n this.calls.set(key, timestamps);\n return {\n allowed: true,\n remaining: this.maxCalls - timestamps.length,\n retryAfterMs: 0,\n };\n }\n}\n", "/**\n * App management tools for MCP\n * Tools: list_apps, get_app_details\n */\n\nimport { z } from 'zod';\nimport type { FloadApiClient } from '../api-client.js';\nimport { formatAsJson, formatError } from '../lib/format.js';\n\n// =============================================================================\n// SCHEMAS\n// =============================================================================\n\nexport const listAppsSchema = z.object({\n platform: z.enum(['ios', 'android']).optional().describe('Filter by platform (ios or android)'),\n limit: z.number().int().min(1).max(100).default(50).describe('Maximum number of apps to return'),\n});\n\nexport const getAppDetailsSchema = z.object({\n assetId: z.string().uuid().optional().describe('App UUID from Fload database'),\n bundleId: z.string().optional().describe('App bundle ID (e.g., com.example.app)'),\n});\n\n// =============================================================================\n// TOOL IMPLEMENTATIONS\n// =============================================================================\n\n/**\n * List all apps in the organization\n */\nexport async function listApps(\n input: z.infer<typeof listAppsSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.get('/api/assets', {\n limit: input.limit,\n offset: 0,\n });\n const apps = response.data || [];\n\n // Filter by platform client-side if needed\n const filtered = input.platform\n ? apps.filter((app: any) => {\n if (input.platform === 'ios') return !!app.appleAppId;\n if (input.platform === 'android') return !!app.googleAppId;\n return true;\n })\n : apps;\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n total: filtered.length,\n apps: filtered.map((app: any) => ({\n id: app.id,\n name: app.name,\n bundleId: app.bundleId,\n platform: app.appleAppId ? 'ios' : app.googleAppId ? 'android' : 'unknown',\n addedAt: app.updatedAt || app.createdAt,\n })),\n }),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Get detailed information about a specific app\n */\nexport async function getAppDetails(\n input: z.infer<typeof getAppDetailsSchema>,\n client: FloadApiClient\n) {\n try {\n if (!input.assetId && !input.bundleId) {\n throw new Error('Either assetId or bundleId must be provided');\n }\n\n let assetId = input.assetId;\n\n // If bundleId provided, find the asset first\n if (!assetId && input.bundleId) {\n const allApps = await client.get('/api/assets', { limit: 100, offset: 0 });\n const match = (allApps.data || []).find((a: any) => a.bundleId === input.bundleId);\n if (!match) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'App not found with that bundle ID',\n },\n ],\n isError: true,\n };\n }\n assetId = match.id;\n }\n\n const response = await client.get(`/api/assets/${assetId}`);\n const app = response.data || response;\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n id: app.id,\n name: app.name,\n bundleId: app.bundleId,\n appleAppId: app.appleAppId,\n googleAppId: app.googleAppId,\n platform: app.appleAppId ? 'ios' : app.googleAppId ? 'android' : 'unknown',\n currentValuation: app.currentValuation,\n metadata: app.metadata,\n addedAt: app.createdAt,\n updatedAt: app.updatedAt,\n }),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n", "/**\n * Data formatting utilities for MCP tool responses\n */\n\n/**\n * Format database results as JSON text for MCP response\n */\nexport function formatAsJson(data: any): string {\n return JSON.stringify(data, null, 2);\n}\n\n/**\n * Format error message for MCP error response\n */\nexport function formatError(error: unknown): string {\n if (error instanceof Error) {\n return `Error: ${error.message}`;\n }\n return `Unknown error: ${String(error)}`;\n}\n\n/**\n * Format date for display\n */\nexport function formatDate(date: Date): string {\n return date.toISOString().split('T')[0];\n}\n\n/**\n * Format large numbers with commas\n */\nexport function formatNumber(num: number): string {\n return num.toLocaleString();\n}\n", "/**\n * Review management tools for MCP\n * Tools: get_reviews, generate_review_reply, send_review_reply, translate_review\n */\n\nimport { z } from 'zod';\nimport type { FloadApiClient } from '../api-client.js';\nimport { formatAsJson, formatError } from '../lib/format.js';\n\n// =============================================================================\n// SCHEMAS\n// =============================================================================\n\nexport const getReviewsSchema = z.object({\n assetId: z.string().uuid().optional().describe('App UUID to filter reviews'),\n bundleId: z.string().optional().describe('App bundle ID to filter reviews'),\n platform: z.enum(['ios', 'android']).optional().describe('Filter by platform'),\n rating: z.number().int().min(1).max(5).optional().describe('Filter by star rating (1-5)'),\n replied: z.boolean().optional().describe('Filter by replied status (true = has reply, false = no reply)'),\n startDate: z.string().optional().describe('Filter reviews from this date (ISO format: YYYY-MM-DD)'),\n endDate: z.string().optional().describe('Filter reviews until this date (ISO format: YYYY-MM-DD)'),\n limit: z.number().int().min(1).max(200).default(50).describe('Maximum number of reviews to return'),\n sortBy: z.enum(['date', 'rating']).default('date').describe('Sort reviews by date or rating'),\n});\n\nexport const generateReviewReplySchema = z.object({\n reviewId: z.string().describe('The review UUID to generate a reply for'),\n assetId: z.string().uuid().describe('The app UUID the review belongs to'),\n});\n\nexport const sendReviewReplySchema = z.object({\n reviewId: z.string().describe('The review UUID to reply to'),\n assetId: z.string().uuid().describe('The app UUID the review belongs to'),\n response: z.string().describe('The reply text to send'),\n});\n\nexport const translateReviewSchema = z.object({\n reviewId: z.string().describe('The review UUID to translate'),\n assetId: z.string().uuid().describe('The app UUID the review belongs to'),\n});\n\n// =============================================================================\n// TOOL IMPLEMENTATIONS\n// =============================================================================\n\n/**\n * Get reviews with filters\n */\nexport async function getReviews(\n input: z.infer<typeof getReviewsSchema>,\n client: FloadApiClient\n) {\n try {\n // Resolve assetId from bundleId if needed\n let assetId = input.assetId;\n if (!assetId && input.bundleId) {\n const allApps = await client.get('/api/assets', { limit: 100, offset: 0 });\n const match = (allApps.data || []).find((a: any) => a.bundleId === input.bundleId);\n if (!match) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `No app found with bundle ID: ${input.bundleId}`,\n },\n ],\n isError: true,\n };\n }\n assetId = match.id;\n }\n\n const params: Record<string, string | number | boolean | undefined> = {\n limit: input.limit,\n sortBy: input.sortBy,\n };\n\n if (assetId) params.assetId = assetId;\n if (input.platform) params.platform = input.platform;\n if (input.rating !== undefined) params.rating = input.rating;\n if (input.replied !== undefined) params.responseStatus = input.replied ? 'replied' : 'unreplied';\n if (input.startDate) params.startDate = input.startDate;\n if (input.endDate) params.endDate = input.endDate;\n\n const response = await client.get('/api/reviews', params);\n const reviews = response.data || response.reviews || [];\n\n // Calculate summary stats\n const summary = {\n totalReviews: reviews.length,\n averageRating:\n reviews.length > 0\n ? (reviews.reduce((sum: number, r: any) => sum + (r.rating || 0), 0) / reviews.length).toFixed(2)\n : 0,\n repliedCount: reviews.filter((r: any) => r.developerResponse || r.hasReply).length,\n unrepliedCount: reviews.filter((r: any) => !r.developerResponse && !r.hasReply).length,\n };\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n summary,\n reviews: reviews.map((r: any) => ({\n id: r.id,\n appId: r.appId,\n platform: r.platform,\n rating: r.rating,\n title: r.title,\n body: r.body,\n author: r.nickname || r.author,\n date: r.lastModified || r.date,\n version: r.appVersionString || r.version,\n storeFront: r.storeFront,\n hasReply: !!(r.developerResponse || r.hasReply),\n reply: r.developerResponse\n ? (typeof r.developerResponse === 'object' ? r.developerResponse.response : r.developerResponse)\n : (r.reply || null),\n })),\n }),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Generate an AI draft reply for a review\n */\nexport async function generateReviewReply(\n input: z.infer<typeof generateReviewReplySchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.post(`/api/reviews/${input.reviewId}/generate-reply`, {\n assetId: input.assetId,\n });\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Send a reply to an app review\n */\nexport async function sendReviewReply(\n input: z.infer<typeof sendReviewReplySchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.post(`/api/reviews/${input.reviewId}/respond`, {\n assetId: input.assetId,\n response: input.response,\n });\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Translate a review to English\n */\nexport async function translateReview(\n input: z.infer<typeof translateReviewSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.post(`/api/reviews/${input.reviewId}/translate`, {\n assetId: input.assetId,\n });\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n", "/**\n * Metrics discovery and query tools for MCP\n * Tools: discover_metrics, get_metrics, discover_dimensions\n */\n\nimport { z } from 'zod';\nimport type { FloadApiClient } from '../api-client.js';\nimport { formatAsJson, formatError } from '../lib/format.js';\n\n// =============================================================================\n// SCHEMAS\n// =============================================================================\n\nexport const discoverMetricsSchema = z.object({\n assetId: z.string().uuid().describe('App UUID to check available metrics for'),\n});\n\nexport const getMetricsSchema = z.object({\n assetId: z.string().uuid().describe('App UUID'),\n metrics: z.array(z.string()).min(1).describe('Metric names to query (e.g., [\"proceeds\", \"totalDownloads\"]). Use discover_metrics first to see available metrics.'),\n startDate: z.string().optional().describe('Start date (YYYY-MM-DD). Defaults to 30 days ago.'),\n endDate: z.string().optional().describe('End date (YYYY-MM-DD). Defaults to today.'),\n granularity: z.enum(['daily', 'weekly', 'monthly']).default('daily').describe('Data granularity'),\n dimension: z.string().optional().describe('Optional dimension to break down by (e.g., \"storefront\" for country, \"platform\" for device). Use discover_dimensions to see options.'),\n dimensionFilter: z.string().optional().describe('Filter to a specific dimension value (e.g., \"US\" when dimension is \"storefront\")'),\n});\n\nexport const discoverDimensionsSchema = z.object({\n assetId: z.string().uuid().describe('App UUID'),\n dimension: z.string().optional().describe('If provided, returns the available values for this dimension (e.g., countries for \"storefront\")'),\n});\n\n// =============================================================================\n// METRIC DISPLAY INFO\n// =============================================================================\n\n// Human-readable names and categories for common metrics\nconst METRIC_INFO: Record<string, { displayName: string; category: string; type: string }> = {\n proceeds: { displayName: 'Net Revenue (after store cut)', category: 'Revenue', type: 'currency' },\n total_revenue: { displayName: 'Gross Revenue', category: 'Revenue', type: 'currency' },\n total_downloads: { displayName: 'Total Downloads', category: 'Downloads', type: 'count' },\n units: { displayName: 'First-time Downloads', category: 'Downloads', type: 'count' },\n redownloads: { displayName: 'Re-downloads', category: 'Downloads', type: 'count' },\n page_views: { displayName: 'App Store Page Views', category: 'Downloads', type: 'count' },\n impressions: { displayName: 'App Store Impressions', category: 'Downloads', type: 'count' },\n sessions: { displayName: 'App Sessions', category: 'Engagement', type: 'count' },\n active_devices: { displayName: 'Active Devices', category: 'Engagement', type: 'count' },\n crashes: { displayName: 'Crashes', category: 'Engagement', type: 'count' },\n paying_users: { displayName: 'Paying Users', category: 'Engagement', type: 'count' },\n active_subs: { displayName: 'Active Subscriptions', category: 'Subscriptions', type: 'count' },\n active_trials: { displayName: 'Active Trials', category: 'Subscriptions', type: 'count' },\n new_trials: { displayName: 'New Trials', category: 'Subscriptions', type: 'count' },\n trial_conversion_rate: { displayName: 'Trial Conversion Rate', category: 'Subscriptions', type: 'percentage' },\n subscription_retention_rate: { displayName: 'Subscription Retention Rate', category: 'Subscriptions', type: 'percentage' },\n products_sold: { displayName: 'Products Sold (IAP)', category: 'Revenue', type: 'count' },\n ad_spend: { displayName: 'Ad Spend', category: 'Ads', type: 'currency' },\n ad_impressions: { displayName: 'Ad Impressions', category: 'Ads', type: 'count' },\n ad_taps: { displayName: 'Ad Taps/Clicks', category: 'Ads', type: 'count' },\n ad_installs: { displayName: 'Ad-attributed Installs', category: 'Ads', type: 'count' },\n ad_conversions: { displayName: 'Ad Conversions', category: 'Ads', type: 'count' },\n};\n\n// Dimension display names\nconst DIMENSION_INFO: Record<string, string> = {\n storefront: 'Country',\n region: 'Region',\n platform: 'Platform (device type)',\n source: 'Source',\n appVersion: 'App Version',\n purchase: 'Product',\n appReferrer: 'App Referrer',\n domainReferrer: 'Domain Referrer',\n subscription_state: 'Subscription Type',\n duration: 'Duration',\n revenueShare: 'Revenue Share',\n campaign: 'Campaign',\n};\n\n// =============================================================================\n// TOOL IMPLEMENTATIONS\n// =============================================================================\n\nexport async function discoverMetrics(\n input: z.infer<typeof discoverMetricsSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.get(`/api/assets/${input.assetId}/metrics/availability`);\n const availableMetrics = response.data?.availableMetrics || [];\n const metricGroups = response.data?.metricGroups || {};\n\n // Enrich with display names and categories\n const enriched = availableMetrics.map((metricName: string) => {\n const info = METRIC_INFO[metricName];\n return {\n name: metricName,\n displayName: info?.displayName || metricName,\n category: info?.category || 'Other',\n type: info?.type || 'count',\n };\n });\n\n // Group by category\n const byCategory: Record<string, any[]> = {};\n for (const m of enriched) {\n if (!byCategory[m.category]) byCategory[m.category] = [];\n byCategory[m.category].push(m);\n }\n\n return {\n content: [{\n type: 'text' as const,\n text: formatAsJson({\n assetId: input.assetId,\n totalAvailable: availableMetrics.length,\n metricsByCategory: byCategory,\n dataGroups: metricGroups,\n tip: 'Use the metric \"name\" field in get_metrics. You can query multiple metrics at once.',\n }),\n }],\n };\n } catch (error) {\n return { content: [{ type: 'text' as const, text: formatError(error) }], isError: true };\n }\n}\n\nexport async function getMetrics(\n input: z.infer<typeof getMetricsSchema>,\n client: FloadApiClient\n) {\n try {\n // Default date range: last 30 days\n const endDate = input.endDate || new Date().toISOString().split('T')[0];\n const startDate = input.startDate || (() => {\n const d = new Date();\n d.setDate(d.getDate() - 30);\n return d.toISOString().split('T')[0];\n })();\n\n const params: Record<string, string> = {\n metrics: input.metrics.join(','),\n fromDate: startDate,\n toDate: endDate,\n granularity: input.granularity,\n };\n\n if (input.dimension) params.dimension = input.dimension;\n if (input.dimensionFilter && input.dimension) {\n params[`filter.${input.dimension}`] = input.dimensionFilter;\n }\n\n const response = await client.get(`/api/assets/${input.assetId}/metrics/timeseries`, params);\n\n // The API returns { data: { metricName: [{date, value}] }, changes: {...}, meta: {...} }\n const data = response.data || {};\n const changes = response.changes || {};\n const meta = response.meta || {};\n\n // Build summary for each metric\n const summaries: Record<string, any> = {};\n for (const [metricName, timeseries] of Object.entries(data)) {\n const points = timeseries as Array<{ date: string; value: number }>;\n if (!Array.isArray(points) || points.length === 0) {\n summaries[metricName] = { total: 0, average: 0, min: 0, max: 0, dataPoints: 0 };\n continue;\n }\n const values = points.map(p => p.value);\n const total = values.reduce((s, v) => s + v, 0);\n summaries[metricName] = {\n total: Math.round(total * 100) / 100,\n average: Math.round((total / values.length) * 100) / 100,\n min: Math.min(...values),\n max: Math.max(...values),\n dataPoints: values.length,\n };\n }\n\n const info = METRIC_INFO;\n return {\n content: [{\n type: 'text' as const,\n text: formatAsJson({\n assetId: input.assetId,\n dateRange: { start: startDate, end: endDate },\n granularity: input.granularity,\n dimension: input.dimension || null,\n metrics: Object.keys(data).map(name => ({\n name,\n displayName: info[name]?.displayName || name,\n type: info[name]?.type || 'count',\n summary: summaries[name],\n change: changes[name] || null,\n })),\n timeseries: data,\n meta,\n }),\n }],\n };\n } catch (error) {\n return { content: [{ type: 'text' as const, text: formatError(error) }], isError: true };\n }\n}\n\nexport async function discoverDimensions(\n input: z.infer<typeof discoverDimensionsSchema>,\n client: FloadApiClient\n) {\n try {\n if (input.dimension) {\n // Get values for a specific dimension\n const response = await client.get(\n `/api/assets/${input.assetId}/metrics/dimensions/${input.dimension}/values`\n );\n return {\n content: [{\n type: 'text' as const,\n text: formatAsJson({\n assetId: input.assetId,\n dimension: input.dimension,\n displayName: DIMENSION_INFO[input.dimension] || input.dimension,\n values: response.data || response,\n }),\n }],\n };\n }\n\n // Get available dimensions\n const response = await client.get(`/api/assets/${input.assetId}/metrics/dimensions`);\n const dimensions = response.data || response || [];\n\n // Enrich with display names\n const enriched = (Array.isArray(dimensions) ? dimensions : Object.keys(dimensions)).map((dim: string) => ({\n name: dim,\n displayName: DIMENSION_INFO[dim] || dim,\n }));\n\n return {\n content: [{\n type: 'text' as const,\n text: formatAsJson({\n assetId: input.assetId,\n dimensions: enriched,\n tip: 'Use dimension name in get_metrics \"dimension\" param. Use discover_dimensions with a specific dimension to see available values.',\n }),\n }],\n };\n } catch (error) {\n return { content: [{ type: 'text' as const, text: formatError(error) }], isError: true };\n }\n}\n", "/**\n * Agent tools for MCP\n * Tools: list_agents, get_agent_details, get_agent_run_history, trigger_agent_run, pause_agent, resume_agent, get_agent_activity\n */\n\nimport { z } from 'zod';\nimport type { FloadApiClient } from '../api-client.js';\nimport { formatAsJson, formatError } from '../lib/format.js';\n\n// =============================================================================\n// CONSTANTS\n// =============================================================================\n\nconst AGENT_TYPES = [\n 'review',\n 'monitoring',\n 'forecasting',\n 'growth',\n 'aso',\n 'ads',\n 'product',\n 'submission_review',\n] as const;\n\ntype AgentType = (typeof AGENT_TYPES)[number];\n\nconst AGENT_DESCRIPTIONS: Record<AgentType, string> = {\n review: 'AI-powered review management \u2014 drafts and sends replies to app store reviews',\n monitoring: 'Anomaly detection \u2014 monitors metrics for unusual changes in downloads, revenue, etc.',\n forecasting: 'Revenue and metric forecasting \u2014 generates forward-looking projections',\n growth: 'Growth audit \u2014 analyzes app performance and provides growth scoring',\n aso: 'App Store Optimization \u2014 listing optimization suggestions for better visibility',\n ads: 'Ad campaign analysis \u2014 performance tracking and optimization recommendations',\n product: 'Product agent \u2014 automated app installation testing via BrowserStack',\n submission_review: 'Submission review \u2014 GitHub-based review workflow for app submissions',\n};\n\n// =============================================================================\n// SCHEMAS\n// =============================================================================\n\nexport const listAgentsSchema = z.object({});\n\nexport const getAgentDetailsSchema = z.object({\n agentType: z.enum(AGENT_TYPES).describe('The type of agent to get details for'),\n assetId: z.string().uuid().optional().describe('App UUID to get agent config for (when agent is per-asset)'),\n});\n\nexport const getAgentRunHistorySchema = z.object({\n agentType: z.enum(AGENT_TYPES).describe('The type of agent to get run history for'),\n assetId: z.string().uuid().optional().describe('App UUID to filter runs'),\n limit: z.number().int().min(1).max(100).default(20).describe('Maximum number of runs to return'),\n});\n\nexport const triggerAgentRunSchema = z.object({\n agentId: z.string().describe('The agent ID to trigger a run for'),\n assetId: z.string().uuid().optional().describe('Optional app UUID to run the agent against'),\n});\n\nexport const pauseAgentSchema = z.object({\n agentId: z.string().describe('The agent ID to pause'),\n});\n\nexport const resumeAgentSchema = z.object({\n agentId: z.string().describe('The agent ID to resume'),\n});\n\nexport const getAgentActivitySchema = z.object({\n agentId: z.string().describe('The agent ID to get activity for'),\n});\n\n// =============================================================================\n// TOOL IMPLEMENTATIONS\n// =============================================================================\n\n/**\n * List all available agent types and their status\n */\nexport async function listAgents(\n _input: z.infer<typeof listAgentsSchema>,\n client: FloadApiClient\n) {\n try {\n // Try to get agent info from the API\n let apiAgents: any[] | null = null;\n try {\n const response = await client.get('/api/agents');\n apiAgents = response.data || response.agents || response;\n } catch {\n // API route may not exist yet \u2014 fall back to static list\n }\n\n if (apiAgents && Array.isArray(apiAgents)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n totalAgents: apiAgents.length,\n agents: apiAgents,\n }),\n },\n ],\n };\n }\n\n // Fallback: return static agent list with descriptions\n const agents = AGENT_TYPES.map(type => ({\n type,\n description: AGENT_DESCRIPTIONS[type],\n available: true,\n }));\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n totalAgents: agents.length,\n agents,\n }),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Get details about a specific agent type\n */\nexport async function getAgentDetails(\n input: z.infer<typeof getAgentDetailsSchema>,\n client: FloadApiClient\n) {\n try {\n // Try the API route\n try {\n const params: Record<string, string | undefined> = {};\n if (input.assetId) params.assetId = input.assetId;\n const response = await client.get(`/api/agents/${input.agentType}`, params);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response.data || response),\n },\n ],\n };\n } catch {\n // API route may not exist \u2014 return basic info\n }\n\n const response: Record<string, unknown> = {\n type: input.agentType,\n description: AGENT_DESCRIPTIONS[input.agentType],\n message: 'Detailed agent configuration is available through the platform dashboard.',\n };\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Get agent run history\n */\nexport async function getAgentRunHistory(\n input: z.infer<typeof getAgentRunHistorySchema>,\n client: FloadApiClient\n) {\n try {\n // Try the API route\n try {\n const params: Record<string, string | number | undefined> = {\n limit: input.limit,\n };\n if (input.assetId) params.assetId = input.assetId;\n const response = await client.get(`/api/agents/${input.agentType}/runs`, params);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n agentType: input.agentType,\n ...(response.data || response),\n }),\n },\n ],\n };\n } catch {\n // API route may not exist\n }\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n agentType: input.agentType,\n message: `Run history for ${input.agentType} agent is available through the platform dashboard. This agent type does not have a dedicated run log table yet.`,\n }),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Trigger a manual agent run\n */\nexport async function triggerAgentRun(\n input: z.infer<typeof triggerAgentRunSchema>,\n client: FloadApiClient\n) {\n try {\n const body: Record<string, string | undefined> = {};\n if (input.assetId) body.assetId = input.assetId;\n\n const response = await client.post(`/api/agents/${input.agentId}/run`, body);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response.data || response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Pause an agent\n */\nexport async function pauseAgent(\n input: z.infer<typeof pauseAgentSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.post(`/api/agents/${input.agentId}/pause`);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response.data || response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Resume a paused agent\n */\nexport async function resumeAgent(\n input: z.infer<typeof resumeAgentSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.post(`/api/agents/${input.agentId}/resume`);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response.data || response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Get recent activity log for an agent\n */\nexport async function getAgentActivity(\n input: z.infer<typeof getAgentActivitySchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.get(`/api/agents/${input.agentId}/activity`);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response.data || response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n", "/**\n * Anomaly detection tools for MCP\n * Tools: get_anomalies, get_anomaly_detail, acknowledge_anomaly, dismiss_anomaly\n */\n\nimport { z } from 'zod';\nimport type { FloadApiClient } from '../api-client.js';\nimport { formatAsJson, formatError } from '../lib/format.js';\n\n// =============================================================================\n// SCHEMAS\n// =============================================================================\n\nexport const getAnomaliesSchema = z.object({\n assetId: z.string().uuid().optional().describe('Filter anomalies by app UUID'),\n severity: z.enum(['low', 'medium', 'high', 'critical']).optional().describe('Filter by severity level'),\n type: z.enum(['surge', 'decline']).optional().describe('Filter by anomaly type'),\n status: z.enum(['new', 'viewed', 'acknowledged', 'dismissed']).optional().describe('Filter by status'),\n metricName: z.string().optional().describe('Filter by metric name (e.g., \"proceeds\", \"units\")'),\n fromDate: z.string().optional().describe('Filter anomalies from this date (YYYY-MM-DD)'),\n toDate: z.string().optional().describe('Filter anomalies until this date (YYYY-MM-DD)'),\n excludeDismissed: z.boolean().default(true).describe('Exclude dismissed anomalies (default: true)'),\n limit: z.number().int().min(1).max(100).default(50).describe('Maximum number of anomalies to return'),\n});\n\nexport const getAnomalyDetailSchema = z.object({\n id: z.string().uuid().describe('The anomaly UUID to get details for'),\n});\n\nexport const acknowledgeAnomalySchema = z.object({\n id: z.string().uuid().describe('The anomaly UUID to acknowledge'),\n});\n\nexport const dismissAnomalySchema = z.object({\n id: z.string().uuid().describe('The anomaly UUID to dismiss'),\n});\n\n// =============================================================================\n// TOOL IMPLEMENTATIONS\n// =============================================================================\n\n/**\n * Get detected anomalies with filtering\n */\nexport async function getAnomalies(\n input: z.infer<typeof getAnomaliesSchema>,\n client: FloadApiClient\n) {\n try {\n const params: Record<string, string | number | boolean | undefined> = {\n limit: input.limit,\n };\n\n if (input.assetId) params.assetId = input.assetId;\n if (input.severity) params.severity = input.severity;\n if (input.type) params.type = input.type;\n if (input.status) params.status = input.status;\n if (input.metricName) params.metricName = input.metricName;\n if (input.fromDate) params.fromDate = input.fromDate;\n if (input.toDate) params.toDate = input.toDate;\n if (input.excludeDismissed) params.excludeDismissed = input.excludeDismissed;\n\n const response = await client.get('/api/anomalies', params);\n const anomalies = response.data || response.anomalies || [];\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n total: anomalies.length,\n anomalies: anomalies.map((a: any) => ({\n id: a.id,\n assetId: a.assetId,\n assetName: a.assetName,\n assetIcon: a.assetIcon,\n anomalyDate: a.anomalyDate,\n metricName: a.metricName,\n sourceType: a.sourceType,\n type: a.type,\n severity: a.severity,\n actualValue: parseFloat(a.actualValue || '0'),\n expectedValue: parseFloat(a.expectedValue || '0'),\n deviationPercent: parseFloat(a.deviationPercent || '0'),\n confidence: parseFloat(a.confidence || '0'),\n explanation: a.explanation,\n suggestedActions: a.suggestedActions,\n status: a.status,\n detectedAt: a.detectedAt,\n })),\n }),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Get full detail for a single anomaly including chart data\n */\nexport async function getAnomalyDetail(\n input: z.infer<typeof getAnomalyDetailSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.get(`/api/anomalies/${input.id}`);\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Mark an anomaly as acknowledged\n */\nexport async function acknowledgeAnomaly(\n input: z.infer<typeof acknowledgeAnomalySchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.patch(`/api/anomalies/${input.id}/acknowledge`);\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Dismiss an anomaly\n */\nexport async function dismissAnomaly(\n input: z.infer<typeof dismissAnomalySchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.patch(`/api/anomalies/${input.id}/dismiss`);\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n", "/**\n * Ads performance tools for MCP\n * Tools: get_ads_performance\n */\n\nimport { z } from 'zod';\nimport type { FloadApiClient } from '../api-client.js';\nimport { formatAsJson, formatError } from '../lib/format.js';\n\n// =============================================================================\n// SCHEMAS\n// =============================================================================\n\nexport const getAdsPerformanceSchema = z.object({\n assetId: z.string().uuid().optional().describe('Filter by app UUID'),\n platform: z.enum(['apple_search_ads', 'google_ads', 'meta_ads', 'tiktok_ads']).optional().describe('Filter by ad platform'),\n fromDate: z.string().optional().describe('Start date for performance data (YYYY-MM-DD)'),\n toDate: z.string().optional().describe('End date for performance data (YYYY-MM-DD)'),\n limit: z.number().int().min(1).max(100).default(50).describe('Maximum number of campaigns to return'),\n});\n\n// =============================================================================\n// TOOL IMPLEMENTATIONS\n// =============================================================================\n\n/**\n * Get ad campaign performance data\n */\nexport async function getAdsPerformance(\n input: z.infer<typeof getAdsPerformanceSchema>,\n client: FloadApiClient\n) {\n try {\n const params: Record<string, string | number | undefined> = {\n limit: input.limit,\n };\n\n if (input.assetId) params.assetId = input.assetId;\n if (input.platform) params.platform = input.platform;\n if (input.fromDate) params.fromDate = input.fromDate;\n if (input.toDate) params.toDate = input.toDate;\n\n const response = await client.get('/api/ads/campaigns', params);\n const campaigns = response.data || response.campaigns || [];\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n total: campaigns.length,\n campaigns: campaigns.map((c: any) => ({\n id: c.id,\n assetId: c.assetId,\n assetName: c.assetName,\n platformCampaignId: c.platformCampaignId,\n name: c.name,\n status: c.status,\n objective: c.objective,\n platform: c.platform,\n linkSource: c.linkSource,\n linkedAt: c.linkedAt,\n recentPerformance: c.recentPerformance || null,\n })),\n }),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n", "/**\n * Growth tools for MCP\n * Tools: get_growth_audit, get_growth_score\n */\n\nimport { z } from 'zod';\nimport type { FloadApiClient } from '../api-client.js';\nimport { formatAsJson, formatError } from '../lib/format.js';\n\n// =============================================================================\n// SCHEMAS\n// =============================================================================\n\nexport const getGrowthAuditSchema = z.object({\n assetId: z.string().uuid().describe('App UUID to audit'),\n});\n\nexport const getGrowthScoreSchema = z.object({\n assetId: z.string().uuid().describe('App UUID to score'),\n});\n\n// =============================================================================\n// TOOL IMPLEMENTATIONS\n// =============================================================================\n\n/**\n * Get growth audit for an app\n */\nexport async function getGrowthAudit(\n input: z.infer<typeof getGrowthAuditSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.get(`/api/growth/audit/${input.assetId}`);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response.data || response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Get a calculated growth score for an app\n */\nexport async function getGrowthScore(\n input: z.infer<typeof getGrowthScoreSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.get(`/api/growth/score/${input.assetId}`);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response.data || response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n", "/**\n * Forecasting tools for MCP\n * Tools: get_forecasts\n */\n\nimport { z } from 'zod';\nimport type { FloadApiClient } from '../api-client.js';\nimport { formatAsJson, formatError } from '../lib/format.js';\n\n// =============================================================================\n// SCHEMAS\n// =============================================================================\n\nexport const getForecastsSchema = z.object({\n assetId: z.string().uuid().describe('App UUID to get forecasts for'),\n dataPoints: z.number().int().min(4).max(52).default(12).describe('Number of historical data points to include'),\n});\n\n// =============================================================================\n// TOOL IMPLEMENTATIONS\n// =============================================================================\n\n/**\n * Get valuation-based forecasts and trend analysis for an app\n */\nexport async function getForecasts(\n input: z.infer<typeof getForecastsSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.get('/api/forecasting/forecast', {\n assetId: input.assetId,\n dataPoints: input.dataPoints,\n });\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response.data || response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n", "/**\n * Dashboard tools for MCP\n * Tools: get_dashboard_overview\n */\n\nimport { z } from 'zod';\nimport type { FloadApiClient } from '../api-client.js';\nimport { formatAsJson, formatError } from '../lib/format.js';\n\n// =============================================================================\n// SCHEMAS\n// =============================================================================\n\nexport const getDashboardOverviewSchema = z.object({});\n\n// =============================================================================\n// TOOL IMPLEMENTATIONS\n// =============================================================================\n\n/**\n * Get aggregated dashboard overview for the organization\n */\nexport async function getDashboardOverview(\n _input: z.infer<typeof getDashboardOverviewSchema>,\n client: FloadApiClient\n) {\n try {\n // Fetch overview metrics and sidebar assets in parallel\n const [overviewResponse, sidebarResponse] = await Promise.all([\n client.get('/api/dashboard/overview-metrics').catch(() => null),\n client.get('/api/dashboard/sidebar-assets').catch(() => null),\n ]);\n\n const overview = overviewResponse?.data || overviewResponse || {};\n const sidebarAssets = sidebarResponse?.data || sidebarResponse || [];\n\n // Build the dashboard response\n const apps = Array.isArray(sidebarAssets) ? sidebarAssets : [];\n\n const totalValuation = apps.reduce((sum: number, a: any) => {\n return sum + parseFloat(a.currentValuation || '0');\n }, 0);\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n portfolio: {\n totalApps: apps.length,\n totalValuation: totalValuation > 0 ? totalValuation : null,\n apps: apps.map((a: any) => ({\n id: a.id,\n name: a.name,\n bundleId: a.bundleId,\n platform: a.appleAppId ? 'ios' : a.googleAppId ? 'android' : 'unknown',\n currentValuation: a.currentValuation ? parseFloat(a.currentValuation) : null,\n rating: a.rating ? parseFloat(a.rating) : null,\n ratingCount: a.ratingCount || null,\n category: a.category || null,\n iconUrl: a.iconUrl || null,\n })),\n },\n overview,\n }),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n", "/**\n * Action tools for MCP\n * Tools: list_pending_actions, approve_action, reject_action\n */\n\nimport { z } from 'zod';\nimport type { FloadApiClient } from '../api-client.js';\nimport { formatAsJson, formatError } from '../lib/format.js';\n\n// =============================================================================\n// SCHEMAS\n// =============================================================================\n\nexport const listPendingActionsSchema = z.object({\n assetId: z.string().uuid().optional().describe('Filter by app UUID'),\n limit: z.number().int().min(1).max(100).default(50).describe('Maximum number of actions to return'),\n});\n\nexport const approveActionSchema = z.object({\n actionId: z.string().describe('The draft reply ID to approve'),\n editedReply: z.string().optional().describe('Optionally modify the reply text before approving'),\n});\n\nexport const rejectActionSchema = z.object({\n actionId: z.string().describe('The draft reply ID to reject/delete'),\n});\n\n// =============================================================================\n// TOOL IMPLEMENTATIONS\n// =============================================================================\n\n/**\n * List pending actions (review draft replies awaiting approval)\n */\nexport async function listPendingActions(\n input: z.infer<typeof listPendingActionsSchema>,\n client: FloadApiClient\n) {\n try {\n const params: Record<string, string | number | undefined> = {\n limit: input.limit,\n };\n if (input.assetId) params.assetId = input.assetId;\n\n const response = await client.get('/api/pending-actions', params);\n const actions = response.data || response.actions || [];\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n total: actions.length,\n actions,\n }),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Approve a pending action (mark draft reply for sending)\n */\nexport async function approveAction(\n input: z.infer<typeof approveActionSchema>,\n client: FloadApiClient\n) {\n try {\n const body: Record<string, string> = {};\n if (input.editedReply) body.editedReply = input.editedReply;\n\n const response = await client.post(`/api/pending-actions/${input.actionId}/approve`, body);\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n success: true,\n actionId: input.actionId,\n status: 'approved',\n message: 'Reply has been approved and queued for sending',\n ...(response.data || {}),\n }),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Reject a pending action (delete draft reply)\n */\nexport async function rejectAction(\n input: z.infer<typeof rejectActionSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.post(`/api/pending-actions/${input.actionId}/reject`);\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n success: true,\n actionId: input.actionId,\n status: 'rejected',\n message: 'Draft reply has been rejected and removed',\n ...(response.data || {}),\n }),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n", "/**\n * ASO (App Store Optimization) tools for MCP\n * Tools: get_aso_summary, get_aso_recommendations, get_aso_keywords,\n * get_aso_experiments, get_aso_locale_snapshots, trigger_aso_analysis\n */\n\nimport { z } from 'zod';\nimport type { FloadApiClient } from '../api-client.js';\nimport { formatAsJson, formatError } from '../lib/format.js';\n\n// =============================================================================\n// SCHEMAS\n// =============================================================================\n\nexport const getAsoSummarySchema = z.object({\n assetId: z.string().uuid().describe('App UUID to get ASO summary for'),\n});\n\nexport const getAsoRecommendationsSchema = z.object({\n assetId: z.string().uuid().describe('App UUID to get ASO recommendations for'),\n});\n\nexport const getAsoKeywordsSchema = z.object({\n assetId: z.string().uuid().describe('App UUID to get keyword intelligence for'),\n locale: z.string().optional().describe('Locale code to filter keywords (e.g., \"en-US\", \"de-DE\"). Returns all locales if omitted.'),\n});\n\nexport const getAsoExperimentsSchema = z.object({\n assetId: z.string().uuid().describe('App UUID to list ASO experiments for'),\n status: z.enum(['proposed', 'approved', 'applied', 'measuring', 'completed', 'reverted']).optional().describe('Filter experiments by status'),\n limit: z.number().int().min(1).max(100).default(20).describe('Maximum number of experiments to return'),\n offset: z.number().int().min(0).default(0).describe('Number of experiments to skip for pagination'),\n});\n\nexport const getAsoLocaleSnapshotsSchema = z.object({\n assetId: z.string().uuid().describe('App UUID to get locale snapshots for'),\n});\n\nexport const triggerAsoAnalysisSchema = z.object({\n assetId: z.string().uuid().describe('App UUID to trigger ASO analysis for'),\n});\n\n// =============================================================================\n// TOOL IMPLEMENTATIONS\n// =============================================================================\n\n/**\n * Get ASO score, health, and overview for an app\n */\nexport async function getAsoSummary(\n input: z.infer<typeof getAsoSummarySchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.get(`/api/assets/${input.assetId}/aso/summary`);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Get current ASO recommendations (title, subtitle, keywords suggestions)\n */\nexport async function getAsoRecommendations(\n input: z.infer<typeof getAsoRecommendationsSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.get(`/api/assets/${input.assetId}/aso/recommendations`);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Get keyword rankings, search volume, and competitor data\n */\nexport async function getAsoKeywords(\n input: z.infer<typeof getAsoKeywordsSchema>,\n client: FloadApiClient\n) {\n try {\n const params: Record<string, string | number | boolean | undefined> = {};\n if (input.locale) params.locale = input.locale;\n\n const response = await client.get(`/api/assets/${input.assetId}/aso/keyword-intelligence`, params);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * List ASO experiments with status filtering\n */\nexport async function getAsoExperiments(\n input: z.infer<typeof getAsoExperimentsSchema>,\n client: FloadApiClient\n) {\n try {\n const params: Record<string, string | number | boolean | undefined> = {\n limit: input.limit,\n offset: input.offset,\n };\n if (input.status) params.status = input.status;\n\n const response = await client.get(`/api/assets/${input.assetId}/aso/experiments`, params);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Get current App Store/Google Play listing snapshots across all locales\n */\nexport async function getAsoLocaleSnapshots(\n input: z.infer<typeof getAsoLocaleSnapshotsSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.get(`/api/assets/${input.assetId}/aso/locale-snapshots`);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Trigger a new ASO analysis run for an app\n */\nexport async function triggerAsoAnalysis(\n input: z.infer<typeof triggerAsoAnalysisSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.post(`/api/assets/${input.assetId}/aso/analyze`);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n", "/**\n * Chat tools for MCP\n * Tools: list_conversations, get_conversation_messages, send_chat_message\n */\n\nimport { z } from 'zod';\nimport type { FloadApiClient } from '../api-client.js';\nimport { formatAsJson, formatError } from '../lib/format.js';\n\n// =============================================================================\n// SCHEMAS\n// =============================================================================\n\nexport const listConversationsSchema = z.object({\n limit: z.number().int().min(1).max(100).default(20).describe('Maximum number of conversations to return'),\n});\n\nexport const getConversationMessagesSchema = z.object({\n conversationId: z.string().uuid().describe('The conversation UUID to get messages for'),\n});\n\nexport const sendChatMessageSchema = z.object({\n message: z.string().describe('The message to send to the AI chat'),\n conversationId: z.string().uuid().optional().describe('Existing conversation UUID to continue. Starts a new conversation if omitted.'),\n agentType: z.string().optional().describe('Agent type to use for the conversation (e.g., review, monitoring, forecasting)'),\n});\n\n// =============================================================================\n// TOOL IMPLEMENTATIONS\n// =============================================================================\n\n/**\n * List chat conversations\n */\nexport async function listConversations(\n input: z.infer<typeof listConversationsSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.get('/api/chat/conversations', {\n limit: input.limit,\n });\n const conversations = response.data || response.conversations || response;\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n totalConversations: Array.isArray(conversations) ? conversations.length : 0,\n conversations,\n }),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Get messages in a conversation\n */\nexport async function getConversationMessages(\n input: z.infer<typeof getConversationMessagesSchema>,\n client: FloadApiClient\n) {\n try {\n const response = await client.get(`/api/chat/messages/${input.conversationId}`);\n const messages = response.data || response.messages || response;\n\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson({\n conversationId: input.conversationId,\n totalMessages: Array.isArray(messages) ? messages.length : 0,\n messages,\n }),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n\n/**\n * Send a message to the AI chat\n */\nexport async function sendChatMessage(\n input: z.infer<typeof sendChatMessageSchema>,\n client: FloadApiClient\n) {\n try {\n const body: Record<string, string | undefined> = {\n message: input.message,\n };\n if (input.conversationId) body.conversationId = input.conversationId;\n if (input.agentType) body.agentType = input.agentType;\n\n const response = await client.post('/api/chat', body);\n return {\n content: [\n {\n type: 'text' as const,\n text: formatAsJson(response.data || response),\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text' as const,\n text: formatError(error),\n },\n ],\n isError: true,\n };\n }\n}\n", "/**\n * Tool registry for Fload MCP Server.\n *\n * Barrel re-exports every tool handler + schema, plus `registerTools`\n * which both the stdio entry (@fload-ai/mcp for local Claude Desktop /\n * Cursor / VS Code) and the HTTP transport (mounted at /mcp on the\n * Fload API for remote OAuth-authenticated agents) call to populate an\n * McpServer instance. Adding a tool in one place wires it into both.\n *\n * Every tool carries a `title` + either `readOnlyHint` or\n * `destructiveHint` (or both explicitly false for reversible side\n * effects). Anthropic's connector marketplace enforces this \u2014 tools\n * missing annotations fail review. See\n * https://modelcontextprotocol.io/specification/server/tools for the\n * annotation semantics.\n */\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { ZodRawShape } from 'zod';\nimport type { FloadApiClient } from '../api-client.js';\nimport { RateLimiter } from '../rate-limiter.js';\n\nexport * from './apps.js';\nexport * from './reviews.js';\nexport * from './analytics.js';\nexport * from './agents.js';\nexport * from './anomalies.js';\nexport * from './ads.js';\nexport * from './growth.js';\nexport * from './forecasting.js';\nexport * from './dashboard.js';\nexport * from './actions.js';\nexport * from './aso.js';\nexport * from './chat.js';\n\nimport {\n listAppsSchema,\n listApps,\n getAppDetailsSchema,\n getAppDetails,\n} from './apps.js';\nimport {\n getReviewsSchema,\n getReviews,\n generateReviewReplySchema,\n generateReviewReply,\n sendReviewReplySchema,\n sendReviewReply,\n translateReviewSchema,\n translateReview,\n} from './reviews.js';\nimport {\n discoverMetricsSchema,\n discoverMetrics,\n getMetricsSchema,\n getMetrics,\n discoverDimensionsSchema,\n discoverDimensions,\n} from './analytics.js';\nimport {\n listAgentsSchema,\n listAgents,\n getAgentDetailsSchema,\n getAgentDetails,\n getAgentRunHistorySchema,\n getAgentRunHistory,\n triggerAgentRunSchema,\n triggerAgentRun,\n pauseAgentSchema,\n pauseAgent,\n resumeAgentSchema,\n resumeAgent,\n getAgentActivitySchema,\n getAgentActivity,\n} from './agents.js';\nimport {\n listConversationsSchema,\n listConversations,\n getConversationMessagesSchema,\n getConversationMessages,\n sendChatMessageSchema,\n sendChatMessage,\n} from './chat.js';\nimport {\n getAnomaliesSchema,\n getAnomalies,\n getAnomalyDetailSchema,\n getAnomalyDetail,\n acknowledgeAnomalySchema,\n acknowledgeAnomaly,\n dismissAnomalySchema,\n dismissAnomaly,\n} from './anomalies.js';\nimport { getAdsPerformanceSchema, getAdsPerformance } from './ads.js';\nimport {\n getGrowthAuditSchema,\n getGrowthAudit,\n getGrowthScoreSchema,\n getGrowthScore,\n} from './growth.js';\nimport { getForecastsSchema, getForecasts } from './forecasting.js';\nimport { getDashboardOverviewSchema, getDashboardOverview } from './dashboard.js';\nimport {\n listPendingActionsSchema,\n listPendingActions,\n approveActionSchema,\n approveAction,\n rejectActionSchema,\n rejectAction,\n} from './actions.js';\nimport {\n getAsoSummarySchema,\n getAsoSummary,\n getAsoRecommendationsSchema,\n getAsoRecommendations,\n getAsoKeywordsSchema,\n getAsoKeywords,\n getAsoExperimentsSchema,\n getAsoExperiments,\n getAsoLocaleSnapshotsSchema,\n getAsoLocaleSnapshots,\n triggerAsoAnalysisSchema,\n triggerAsoAnalysis,\n} from './aso.js';\n\nexport interface RegisterToolsOptions {\n /**\n * Custom rate limiter. Defaults to 100 requests/minute global.\n * The HTTP transport passes one scoped per-user so concurrent Claude/\n * ChatGPT/Cursor agents don't share a quota with each other.\n */\n rateLimiter?: RateLimiter;\n}\n\n/**\n * MCP tool annotations per spec. At least one of `readOnlyHint` or\n * `destructiveHint` must be set to satisfy Anthropic's directory check.\n * For reversible state changes (pause agent, acknowledge anomaly) we\n * set both to `false` explicitly.\n */\ninterface FloadToolAnnotations {\n readOnlyHint?: boolean;\n destructiveHint?: boolean;\n idempotentHint?: boolean;\n openWorldHint?: boolean;\n}\n\nexport function registerTools(\n server: McpServer,\n client: FloadApiClient,\n options: RegisterToolsOptions = {}\n): void {\n const rateLimiter = options.rateLimiter ?? new RateLimiter(100, 60_000);\n\n function wrapTool<T>(\n _toolName: string,\n handler: (input: T, client: FloadApiClient) => Promise<unknown>\n ) {\n return async (input: T) => {\n const rateCheck = rateLimiter.check('default');\n if (!rateCheck.allowed) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Rate limit exceeded. Try again in ${Math.ceil(\n rateCheck.retryAfterMs / 1000\n )}s. Limit: 100 requests/minute.`,\n },\n ],\n isError: true,\n };\n }\n return handler(input, client) as Promise<{\n content: Array<{ type: 'text'; text: string }>;\n isError?: boolean;\n }>;\n };\n }\n\n // Helper: register a tool with the annotations the marketplace expects.\n // Keeps each tool one call so a reviewer can eyeball the whole surface.\n function tool<T extends ZodRawShape>(\n name: string,\n title: string,\n description: string,\n schema: { shape: T },\n handler: (input: Record<string, unknown>, client: FloadApiClient) => Promise<unknown>,\n annotations: FloadToolAnnotations\n ) {\n server.registerTool(\n name,\n {\n title,\n description,\n inputSchema: schema.shape,\n annotations: { title, ...annotations },\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrapTool(name, handler) as any\n );\n }\n\n // \u2500\u2500 APPS \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n tool(\n 'list_apps',\n 'List apps',\n 'List all mobile apps in your Fload organization. Returns app metadata including name, bundle ID, platform (iOS/Android), icon URL, and category.',\n listAppsSchema,\n listApps,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'get_app_details',\n 'Get app details',\n 'Get detailed information about a specific app, including metadata, connected data sources (App Store Connect, Google Play Console), and sync status. Provide either assetId (UUID) or bundleId.',\n getAppDetailsSchema,\n getAppDetails,\n { readOnlyHint: true, openWorldHint: false }\n );\n\n // \u2500\u2500 REVIEWS \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n tool(\n 'get_reviews',\n 'Get reviews',\n 'Get app reviews with flexible filtering. Filter by app (assetId or bundleId), platform, rating (1-5 stars), replied status, and date range. Returns reviews with metadata, author, body text, and reply status. Useful for sentiment analysis, support workflows, and review management.',\n getReviewsSchema,\n getReviews,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'generate_review_reply',\n 'Generate review reply (AI draft)',\n 'Generate an AI draft reply for an app review. The AI uses the review context and any configured agent settings (tone, custom instructions) to craft a response. Returns the generated draft text. Does not publish \u2014 call send_review_reply or approve_action to publish the draft.',\n generateReviewReplySchema,\n generateReviewReply,\n { readOnlyHint: false, destructiveHint: false, openWorldHint: true }\n );\n tool(\n 'send_review_reply',\n 'Send review reply',\n 'Send a reply to an app review on the App Store or Google Play. The response text will be submitted as the developer response. This is a write operation that publishes the reply publicly \u2014 treat as destructive (cannot be silently undone).',\n sendReviewReplySchema,\n sendReviewReply,\n { readOnlyHint: false, destructiveHint: true, openWorldHint: true }\n );\n tool(\n 'translate_review',\n 'Translate review',\n 'Translate a review to English. Useful for reviews written in other languages. Returns the translated text. Does not modify the review in Fload.',\n translateReviewSchema,\n translateReview,\n { readOnlyHint: true, openWorldHint: true }\n );\n\n // \u2500\u2500 ANALYTICS \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n tool(\n 'discover_metrics',\n 'Discover available metrics',\n 'Discover what metrics are available for an app. Returns all available metrics organized by category (revenue, downloads, subscriptions, engagement, ads). Always call this first before querying metrics to know what data exists.',\n discoverMetricsSchema,\n discoverMetrics,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'get_metrics',\n 'Get metrics',\n 'Query metric timeseries data for an app. Supports 30+ metrics (proceeds, totalDownloads, activeSubs, sessions, crashes, adSpend, etc.). Can query multiple metrics at once. Supports dimensional breakdowns (by country, platform, campaign). Use discover_metrics first to see available metrics.',\n getMetricsSchema,\n getMetrics,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'discover_dimensions',\n 'Discover available dimensions',\n 'Discover available dimensions for breaking down metrics (e.g., country, platform, app version, campaign). Optionally get the available values for a specific dimension.',\n discoverDimensionsSchema,\n discoverDimensions,\n { readOnlyHint: true, openWorldHint: false }\n );\n\n // \u2500\u2500 AGENTS \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n tool(\n 'list_agents',\n 'List agents',\n 'List all available AI agents in the Fload platform with their current status. Returns agent types (review, monitoring, forecasting, growth, aso, ads, product, submission_review) and configuration status.',\n listAgentsSchema,\n listAgents,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'get_agent_details',\n 'Get agent details',\n 'Get detailed configuration and status for a specific agent type. For the review agent, returns per-asset settings (mode, tone, custom instructions). For the product agent, returns latest run details.',\n getAgentDetailsSchema,\n getAgentDetails,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'get_agent_run_history',\n 'Get agent run history',\n 'Get run history for a specific agent type. Currently available for the product agent (BrowserStack app installation runs). Returns run status, timing, and error details.',\n getAgentRunHistorySchema,\n getAgentRunHistory,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'trigger_agent_run',\n 'Trigger agent run',\n 'Trigger a manual run for an agent. Optionally specify an asset (app) to run the agent against. Returns the triggered run details. Reversible in the sense that agent runs can be paused or dismissed.',\n triggerAgentRunSchema,\n triggerAgentRun,\n { readOnlyHint: false, destructiveHint: false, openWorldHint: true }\n );\n tool(\n 'pause_agent',\n 'Pause agent',\n 'Pause a running agent. The agent will stop processing until resumed. Reversible via resume_agent.',\n pauseAgentSchema,\n pauseAgent,\n { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false }\n );\n tool(\n 'resume_agent',\n 'Resume agent',\n 'Resume a paused agent. The agent will continue processing from where it left off. Reversible via pause_agent.',\n resumeAgentSchema,\n resumeAgent,\n { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false }\n );\n tool(\n 'get_agent_activity',\n 'Get agent activity',\n 'Get the recent activity log for an agent. Returns a chronological list of actions the agent has taken, including timestamps, event types, and details.',\n getAgentActivitySchema,\n getAgentActivity,\n { readOnlyHint: true, openWorldHint: false }\n );\n\n // \u2500\u2500 ANOMALIES \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n tool(\n 'get_anomalies',\n 'Get anomalies',\n 'Get detected anomalies (unusual metric changes) for your apps. Filter by app, severity (low/medium/high/critical), type (surge/decline), status, metric name, and date range. Returns actual vs expected values, deviation percentage, confidence, and suggested actions.',\n getAnomaliesSchema,\n getAnomalies,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'get_anomaly_detail',\n 'Get anomaly detail',\n 'Get full detail for a single anomaly including chart data. Returns the anomaly metadata, actual vs expected values, and historical metric data points for visualization.',\n getAnomalyDetailSchema,\n getAnomalyDetail,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'acknowledge_anomaly',\n 'Acknowledge anomaly',\n 'Mark an anomaly as acknowledged. This updates the anomaly status from \"new\" to \"acknowledged\", indicating it has been reviewed but not dismissed. Reversible \u2014 anomaly can be reset or dismissed later.',\n acknowledgeAnomalySchema,\n acknowledgeAnomaly,\n { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false }\n );\n tool(\n 'dismiss_anomaly',\n 'Dismiss anomaly',\n 'Dismiss an anomaly. This updates the anomaly status to \"dismissed\", removing it from active alerts. Dismissed anomalies are excluded from queries by default. Soft state change \u2014 the anomaly row is preserved and can be un-dismissed later.',\n dismissAnomalySchema,\n dismissAnomaly,\n { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false }\n );\n\n // \u2500\u2500 ADS \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n tool(\n 'get_ads_performance',\n 'Get ads performance',\n 'Get ad campaign performance data across platforms (Apple Search Ads, Google Ads, Meta Ads, TikTok Ads). Returns campaign metadata, status, and for Apple Search Ads includes daily performance snapshots (spend, impressions, taps, installs, CPI, TTR, conversion rate).',\n getAdsPerformanceSchema,\n getAdsPerformance,\n { readOnlyHint: true, openWorldHint: false }\n );\n\n // \u2500\u2500 GROWTH \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n tool(\n 'get_growth_audit',\n 'Get growth audit',\n 'Get a comprehensive growth audit for an app. Synthesizes data from review sentiment analysis, recent anomalies, valuation trends, and connector health into an actionable growth assessment.',\n getGrowthAuditSchema,\n getGrowthAudit,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'get_growth_score',\n 'Get growth score',\n 'Get a calculated growth score (0-100) and grade (A-F) for an app. The score is based on app store rating, valuation trend, recent anomalies, review sentiment, and data connector health. Includes a breakdown of scoring factors.',\n getGrowthScoreSchema,\n getGrowthScore,\n { readOnlyHint: true, openWorldHint: false }\n );\n\n // \u2500\u2500 FORECASTING \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n tool(\n 'get_forecasts',\n 'Get forecasts',\n 'Get valuation-based forecasts and trend analysis for an app. Returns historical valuation data points, trend statistics (direction, volatility), and simple linear projections. For detailed metric forecasting with statistical models, use the platform dashboard.',\n getForecastsSchema,\n getForecasts,\n { readOnlyHint: true, openWorldHint: false }\n );\n\n // \u2500\u2500 DASHBOARD \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n tool(\n 'get_dashboard_overview',\n 'Get dashboard overview',\n 'Get an aggregated dashboard overview for the organization. Returns portfolio summary (apps, valuations, ratings), data connector health status, and alerts (recent anomalies, pending review drafts).',\n getDashboardOverviewSchema,\n getDashboardOverview,\n { readOnlyHint: true, openWorldHint: false }\n );\n\n // \u2500\u2500 PENDING ACTIONS \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n tool(\n 'list_pending_actions',\n 'List pending actions',\n 'List pending actions awaiting approval. Currently shows AI-generated review draft replies that have not been sent yet. Includes the original review context and the drafted reply. Filter by app.',\n listPendingActionsSchema,\n listPendingActions,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'approve_action',\n 'Approve pending action',\n 'Approve a pending action (e.g., a review draft reply). Approving a review reply publishes it to the store \u2014 treat as destructive (publicly visible, cannot be silently undone). Optionally edit the reply text before approving.',\n approveActionSchema,\n approveAction,\n { readOnlyHint: false, destructiveHint: true, openWorldHint: true }\n );\n tool(\n 'reject_action',\n 'Reject pending action',\n 'Reject a pending action (e.g., delete a review draft reply). The draft will be permanently removed. Destructive \u2014 not recoverable without regenerating the draft.',\n rejectActionSchema,\n rejectAction,\n { readOnlyHint: false, destructiveHint: true, openWorldHint: false }\n );\n\n // \u2500\u2500 ASO \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n tool(\n 'get_aso_summary',\n 'Get ASO summary',\n 'Get the ASO (App Store Optimization) score, health status, and overview for an app. Returns an overall optimization score and key ASO health indicators. Use this for a quick snapshot of how well an app is optimized for store search and discovery.',\n getAsoSummarySchema,\n getAsoSummary,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'get_aso_recommendations',\n 'Get ASO recommendations',\n 'Get actionable ASO recommendations for an app, including suggested improvements to the title, subtitle, keywords, and description. Each recommendation explains the rationale and expected impact on search visibility.',\n getAsoRecommendationsSchema,\n getAsoRecommendations,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'get_aso_keywords',\n 'Get ASO keywords',\n 'Get keyword intelligence for an app \u2014 current keyword rankings, search volume estimates, difficulty scores, and competitor keyword data. Optionally filter by locale (e.g., \"en-US\"). Useful for identifying keyword opportunities and tracking ranking changes.',\n getAsoKeywordsSchema,\n getAsoKeywords,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'get_aso_experiments',\n 'Get ASO experiments',\n 'List ASO experiments (A/B tests and metadata changes) for an app. Filter by status: proposed, approved, applied, measuring, completed, or reverted. Returns experiment details, variants, and results when available. Supports pagination.',\n getAsoExperimentsSchema,\n getAsoExperiments,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'get_aso_locale_snapshots',\n 'Get ASO locale snapshots',\n 'Get current App Store and Google Play listing snapshots across all locales for an app. Returns the live title, subtitle, keywords, description, and promotional text for each locale. Useful for auditing localized metadata consistency.',\n getAsoLocaleSnapshotsSchema,\n getAsoLocaleSnapshots,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'trigger_aso_analysis',\n 'Trigger ASO analysis',\n \"Trigger a new ASO analysis run for an app. This kicks off a fresh evaluation of the app's store listing metadata, keyword rankings, and competitive positioning. Results will be reflected in subsequent calls to get_aso_summary and get_aso_recommendations.\",\n triggerAsoAnalysisSchema,\n triggerAsoAnalysis,\n { readOnlyHint: false, destructiveHint: false, openWorldHint: true }\n );\n\n // \u2500\u2500 CHAT \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n tool(\n 'list_conversations',\n 'List conversations',\n 'List chat conversations in the Fload AI chat. Returns conversation metadata including title, creation date, and last message preview. Use limit to control how many are returned.',\n listConversationsSchema,\n listConversations,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'get_conversation_messages',\n 'Get conversation messages',\n 'Get all messages in a specific chat conversation. Returns the full message history including user messages and AI responses with timestamps and roles.',\n getConversationMessagesSchema,\n getConversationMessages,\n { readOnlyHint: true, openWorldHint: false }\n );\n tool(\n 'send_chat_message',\n 'Send chat message',\n 'Send a message to the Fload AI chat assistant. Starts a new conversation if no conversationId is provided, or continues an existing one. Optionally specify an agentType to route to a specialized agent (review, monitoring, forecasting, etc.). Adds a message to your chat history \u2014 not publicly visible.',\n sendChatMessageSchema,\n sendChatMessage,\n { readOnlyHint: false, destructiveHint: false, openWorldHint: true }\n );\n}\n"],
5
+ "mappings": ";AAAO,IAAM,cAAN,MAAkB;AAAA,EAGvB,YACU,WAAmB,KACnB,WAAmB,KAC3B;AAFQ;AACA;AAAA,EACP;AAAA,EALK,QAA+B,oBAAI,IAAI;AAAA,EAO/C,MAAM,KAA4E;AAChF,UAAM,MAAM,KAAK,IAAI;AACrB,UAAM,cAAc,MAAM,KAAK;AAG/B,QAAI,aAAa,KAAK,MAAM,IAAI,GAAG,KAAK,CAAC;AACzC,iBAAa,WAAW,OAAO,CAAC,MAAM,IAAI,WAAW;AAErD,QAAI,WAAW,UAAU,KAAK,UAAU;AACtC,YAAM,iBAAiB,WAAW,CAAC;AACnC,YAAM,eAAe,iBAAiB,KAAK,WAAW;AACtD,WAAK,MAAM,IAAI,KAAK,UAAU;AAC9B,aAAO,EAAE,SAAS,OAAO,WAAW,GAAG,aAAa;AAAA,IACtD;AAEA,eAAW,KAAK,GAAG;AACnB,SAAK,MAAM,IAAI,KAAK,UAAU;AAC9B,WAAO;AAAA,MACL,SAAS;AAAA,MACT,WAAW,KAAK,WAAW,WAAW;AAAA,MACtC,cAAc;AAAA,IAChB;AAAA,EACF;AACF;;;AC1BA,SAAS,SAAS;;;ACEX,SAAS,aAAa,MAAmB;AAC9C,SAAO,KAAK,UAAU,MAAM,MAAM,CAAC;AACrC;AAKO,SAAS,YAAY,OAAwB;AAClD,MAAI,iBAAiB,OAAO;AAC1B,WAAO,UAAU,MAA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,EAC7C;AACA;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,EAAE,cAAc,OAAO,iBAAiB,OAAO,eAAe,KAAK;AAAA,EACrE;AAGA;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,EAAE,cAAc,MAAM,eAAe,MAAM;AAAA,EAC7C;AACA;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,EAAE,cAAc,MAAM,eAAe,MAAM;AAAA,EAC7C;AACA;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,EAAE,cAAc,OAAO,iBAAiB,OAAO,eAAe,KAAK;AAAA,EACrE;AACF;",
6
+ "names": ["z", "z", "z", "z", "response", "z", "z", "response", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z"]
7
+ }
@@ -0,0 +1,119 @@
1
+ import { z } from 'zod';
2
+ import type { FloadApiClient } from '../api-client.js';
3
+ export declare const getReviewsSchema: z.ZodObject<{
4
+ assetId: z.ZodOptional<z.ZodString>;
5
+ bundleId: z.ZodOptional<z.ZodString>;
6
+ platform: z.ZodOptional<z.ZodEnum<["ios", "android"]>>;
7
+ rating: z.ZodOptional<z.ZodNumber>;
8
+ replied: z.ZodOptional<z.ZodBoolean>;
9
+ startDate: z.ZodOptional<z.ZodString>;
10
+ endDate: z.ZodOptional<z.ZodString>;
11
+ limit: z.ZodDefault<z.ZodNumber>;
12
+ sortBy: z.ZodDefault<z.ZodEnum<["date", "rating"]>>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ platform?: "ios" | "android";
15
+ limit?: number;
16
+ assetId?: string;
17
+ bundleId?: string;
18
+ rating?: number;
19
+ replied?: boolean;
20
+ startDate?: string;
21
+ endDate?: string;
22
+ sortBy?: "rating" | "date";
23
+ }, {
24
+ platform?: "ios" | "android";
25
+ limit?: number;
26
+ assetId?: string;
27
+ bundleId?: string;
28
+ rating?: number;
29
+ replied?: boolean;
30
+ startDate?: string;
31
+ endDate?: string;
32
+ sortBy?: "rating" | "date";
33
+ }>;
34
+ export declare const generateReviewReplySchema: z.ZodObject<{
35
+ reviewId: z.ZodString;
36
+ assetId: z.ZodString;
37
+ }, "strip", z.ZodTypeAny, {
38
+ assetId?: string;
39
+ reviewId?: string;
40
+ }, {
41
+ assetId?: string;
42
+ reviewId?: string;
43
+ }>;
44
+ export declare const sendReviewReplySchema: z.ZodObject<{
45
+ reviewId: z.ZodString;
46
+ assetId: z.ZodString;
47
+ response: z.ZodString;
48
+ }, "strip", z.ZodTypeAny, {
49
+ assetId?: string;
50
+ reviewId?: string;
51
+ response?: string;
52
+ }, {
53
+ assetId?: string;
54
+ reviewId?: string;
55
+ response?: string;
56
+ }>;
57
+ export declare const translateReviewSchema: z.ZodObject<{
58
+ reviewId: z.ZodString;
59
+ assetId: z.ZodString;
60
+ }, "strip", z.ZodTypeAny, {
61
+ assetId?: string;
62
+ reviewId?: string;
63
+ }, {
64
+ assetId?: string;
65
+ reviewId?: string;
66
+ }>;
67
+ export declare function getReviews(input: z.infer<typeof getReviewsSchema>, client: FloadApiClient): Promise<{
68
+ content: {
69
+ type: "text";
70
+ text: string;
71
+ }[];
72
+ isError: boolean;
73
+ } | {
74
+ content: {
75
+ type: "text";
76
+ text: string;
77
+ }[];
78
+ isError?: undefined;
79
+ }>;
80
+ export declare function generateReviewReply(input: z.infer<typeof generateReviewReplySchema>, client: FloadApiClient): Promise<{
81
+ content: {
82
+ type: "text";
83
+ text: string;
84
+ }[];
85
+ isError?: undefined;
86
+ } | {
87
+ content: {
88
+ type: "text";
89
+ text: string;
90
+ }[];
91
+ isError: boolean;
92
+ }>;
93
+ export declare function sendReviewReply(input: z.infer<typeof sendReviewReplySchema>, client: FloadApiClient): Promise<{
94
+ content: {
95
+ type: "text";
96
+ text: string;
97
+ }[];
98
+ isError?: undefined;
99
+ } | {
100
+ content: {
101
+ type: "text";
102
+ text: string;
103
+ }[];
104
+ isError: boolean;
105
+ }>;
106
+ export declare function translateReview(input: z.infer<typeof translateReviewSchema>, client: FloadApiClient): Promise<{
107
+ content: {
108
+ type: "text";
109
+ text: string;
110
+ }[];
111
+ isError?: undefined;
112
+ } | {
113
+ content: {
114
+ type: "text";
115
+ text: string;
116
+ }[];
117
+ isError: boolean;
118
+ }>;
119
+ //# sourceMappingURL=reviews.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reviews.d.ts","sourceRoot":"","sources":["../../src/tools/reviews.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOvD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU3B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;EAGpC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAIhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;EAGhC,CAAC;AASH,wBAAsB,UAAU,CAC9B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,EACvC,MAAM,EAAE,cAAc;;;;;;;;;;;;GAqFvB;AAKD,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,EAChD,MAAM,EAAE,cAAc;;;;;;;;;;;;GA0BvB;AAKD,wBAAsB,eAAe,CACnC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,EAC5C,MAAM,EAAE,cAAc;;;;;;;;;;;;GA2BvB;AAKD,wBAAsB,eAAe,CACnC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,EAC5C,MAAM,EAAE,cAAc;;;;;;;;;;;;GA0BvB"}
package/package.json CHANGED
@@ -1,17 +1,32 @@
1
1
  {
2
2
  "name": "@fload-ai/mcp",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "Fload MCP server for AI agents - exposes mobile app analytics, reviews, and growth insights",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "bin": {
8
- "fload-mcp": "./dist/index.js"
8
+ "fload-mcp": "./dist/bin.js"
9
9
  },
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "./tools": {
16
+ "types": "./dist/tools/index.d.ts",
17
+ "default": "./dist/tools/index.js"
18
+ },
19
+ "./api-client": {
20
+ "types": "./dist/api-client.d.ts",
21
+ "default": "./dist/api-client.js"
22
+ }
23
+ },
24
+ "types": "./dist/index.d.ts",
10
25
  "files": [
11
26
  "dist"
12
27
  ],
13
28
  "scripts": {
14
- "build": "node build.mjs",
29
+ "build": "node build.mjs && tsc -p tsconfig.json",
15
30
  "dev": "tsx src/index.ts",
16
31
  "test": "vitest run",
17
32
  "typecheck": "tsc --noEmit",