Facebook · Capability

Facebook Marketing API — Ad Sets

Facebook Marketing API — Ad Sets. 2 operations. Lead operation: Facebook List Ad Sets. Self-contained Naftiko capability covering one Facebook business surface.

Run with Naftiko FacebookAd Sets

What You Can Do

GET
Listadsets — Facebook List Ad Sets
/v1/act-ad-account-id/adsets
POST
Createadset — Facebook Create Ad Set
/v1/act-ad-account-id/adsets

MCP Tools

facebook-list-ad-sets

Facebook List Ad Sets

read-only idempotent
facebook-create-ad-set

Facebook Create Ad Set

Capability Spec

marketing-ad-sets.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Facebook Marketing API — Ad Sets
  description: 'Facebook Marketing API — Ad Sets. 2 operations. Lead operation: Facebook List Ad Sets. Self-contained Naftiko
    capability covering one Facebook business surface.'
  tags:
  - Facebook
  - Ad Sets
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    FACEBOOK_API_KEY: FACEBOOK_API_KEY
capability:
  consumes:
  - type: http
    namespace: marketing-ad-sets
    baseUri: https://graph.facebook.com/v21.0
    description: Facebook Marketing API — Ad Sets business capability. Self-contained, no shared references.
    resources:
    - name: act_{ad-account-id}-adsets
      path: /act_{ad-account-id}/adsets
      operations:
      - name: listadsets
        method: GET
        description: Facebook List Ad Sets
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ad-account-id
          in: path
          type: string
          description: The ad account ID.
          required: true
      - name: createadset
        method: POST
        description: Facebook Create Ad Set
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ad-account-id
          in: path
          type: string
          description: The ad account ID.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.FACEBOOK_API_KEY}}'
  exposes:
  - type: rest
    namespace: marketing-ad-sets-rest
    port: 8080
    description: REST adapter for Facebook Marketing API — Ad Sets. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/act-ad-account-id/adsets
      name: act-ad-account-id-adsets
      description: REST surface for act_{ad-account-id}-adsets.
      operations:
      - method: GET
        name: listadsets
        description: Facebook List Ad Sets
        call: marketing-ad-sets.listadsets
        with:
          ad-account-id: rest.ad-account-id
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createadset
        description: Facebook Create Ad Set
        call: marketing-ad-sets.createadset
        with:
          ad-account-id: rest.ad-account-id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: marketing-ad-sets-mcp
    port: 9090
    transport: http
    description: MCP adapter for Facebook Marketing API — Ad Sets. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: facebook-list-ad-sets
      description: Facebook List Ad Sets
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: marketing-ad-sets.listadsets
      with:
        ad-account-id: tools.ad-account-id
      outputParameters:
      - type: object
        mapping: $.
    - name: facebook-create-ad-set
      description: Facebook Create Ad Set
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: marketing-ad-sets.createadset
      with:
        ad-account-id: tools.ad-account-id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.