naftiko: 1.0.0-alpha2 info: label: Facebook Business Manager Facebook Marketing API — Insights description: 'Facebook Business Manager Facebook Marketing API — Insights. 2 operations. Lead operation: Facebook Business Manager Get ad account insights. Self-contained Naftiko capability covering one Facebook Business Manager business surface.' tags: - Facebook Business Manager - Insights created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: FACEBOOK_BUSINESS_MANAGER_API_KEY: FACEBOOK_BUSINESS_MANAGER_API_KEY capability: consumes: - type: http namespace: facebook-marketing-insights baseUri: https://graph.facebook.com/v25.0 description: Facebook Business Manager Facebook Marketing API — Insights business capability. Self-contained, no shared references. resources: - name: act_{ad_account_id}-insights path: /act_{ad_account_id}/insights operations: - name: getadaccountinsights method: GET description: Facebook Business Manager Get ad account insights outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: time_range in: query type: string description: JSON object specifying the date range with since and until fields in YYYY-MM-DD format. - name: breakdowns in: query type: string description: Comma-separated list of breakdown dimensions such as age, gender, country, or placement. - name: level in: query type: string description: Level of aggregation for results. Options include account, campaign, adset, or ad. - name: time_increment in: query type: string description: Number of days for each increment in the time range, or use monthly or all_days. - name: campaign_id-insights path: /{campaign_id}/insights operations: - name: getcampaigninsights method: GET description: Facebook Business Manager Get campaign insights outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: time_range in: query type: string description: JSON object specifying the date range with since and until fields in YYYY-MM-DD format. authentication: type: bearer token: '{{env.FACEBOOK_BUSINESS_MANAGER_API_KEY}}' exposes: - type: rest namespace: facebook-marketing-insights-rest port: 8080 description: REST adapter for Facebook Business Manager Facebook Marketing API — Insights. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/act-ad-account-id/insights name: act-ad-account-id-insights description: REST surface for act_{ad_account_id}-insights. operations: - method: GET name: getadaccountinsights description: Facebook Business Manager Get ad account insights call: facebook-marketing-insights.getadaccountinsights with: time_range: rest.time_range breakdowns: rest.breakdowns level: rest.level time_increment: rest.time_increment outputParameters: - type: object mapping: $. - path: /v1/{campaign-id}/insights name: campaign-id-insights description: REST surface for campaign_id-insights. operations: - method: GET name: getcampaigninsights description: Facebook Business Manager Get campaign insights call: facebook-marketing-insights.getcampaigninsights with: time_range: rest.time_range outputParameters: - type: object mapping: $. - type: mcp namespace: facebook-marketing-insights-mcp port: 9090 transport: http description: MCP adapter for Facebook Business Manager Facebook Marketing API — Insights. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: facebook-business-manager-get-ad description: Facebook Business Manager Get ad account insights hints: readOnly: true destructive: false idempotent: true call: facebook-marketing-insights.getadaccountinsights with: time_range: tools.time_range breakdowns: tools.breakdowns level: tools.level time_increment: tools.time_increment outputParameters: - type: object mapping: $. - name: facebook-business-manager-get-campaign description: Facebook Business Manager Get campaign insights hints: readOnly: true destructive: false idempotent: true call: facebook-marketing-insights.getcampaigninsights with: time_range: tools.time_range outputParameters: - type: object mapping: $.