Stripe Capabilities

Naftiko 0.5 capability definitions for Stripe - 100 capabilities showing integration workflows and service orchestrations.

Sort
Expand

Submits an internal document or support ticket to Anthropic Claude for summarization, returning a concise summary for agent triage or knowledge base ingestion.

naftiko: "0.5"
info:
  label: "Anthropic AI Document Summarization"
  description: "Submits an internal document or support ticket to Anthropic Claude for summarization, returning a concise summary for agent triage or knowledge base ingestion."
  tags:
    - ai
    - anthropic
    - automation
    - summarization
capability:
  exposes:
    - type: mcp
      namespace: ai-ops
      port: 8080
      tools:
        - name: summarize-document
          description: "Given document text, send it to Anthropic Claude for a concise summary. Use for support ticket triage, internal document distillation, or pre-processing before knowledge base ingestion."
          inputParameters:
            - name: document_text
              in: body
              type: string
              description: "Raw text content of the document or ticket to summarize."
            - name: max_tokens
              in: body
              type: integer
              description: "Maximum token length for the summary response."
          call: anthropic-api.create-message
          with:
            model: "claude-opus-4-5"
            max_tokens: "{{max_tokens}}"
            messages: "[{\"role\":\"user\",\"content\":\"Summarize the following document concisely:\\n\\n{{document_text}}\"}]"
          outputParameters:
            - name: summary
              type: string
              mapping: "$.content[0].text"
  consumes:
    - type: http
      namespace: anthropic-api
      baseUri: "https://api.anthropic.com/v1"
      authentication:
        type: apikey
        key: "x-api-key"
        value: "$secrets.anthropic_api_key"
        placement: header
      resources:
        - name: messages
          path: "/messages"
          operations:
            - name: create-message
              method: POST

When AWS costs spike, creates a Jira finops ticket and alerts the infrastructure team via Slack.

naftiko: "0.5"
info:
  label: "AWS Cost Anomaly Detector"
  description: "When AWS costs spike, creates a Jira finops ticket and alerts the infrastructure team via Slack."
  tags:
    - finops
    - aws
    - jira
    - slack
capability:
  exposes:
    - type: mcp
      namespace: finops
      port: 8080
      tools:
        - name: handle-cost-anomaly
          description: "Given cost anomaly details, create a finops ticket and alert the team."
          inputParameters:
            - name: service_name
              in: body
              type: string
              description: "AWS service with cost spike."
            - name: cost_increase_pct
              in: body
              type: number
              description: "Percentage increase."
            - name: estimated_daily_cost
              in: body
              type: number
              description: "Estimated daily cost in USD."
          steps:
            - name: create-finops-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "FINOPS"
                issuetype: "Task"
                summary: "Cost anomaly: {{service_name}} up {{cost_increase_pct}}% (${{estimated_daily_cost}}/day)"
            - name: alert-infra
              type: call
              call: "slack.post-message"
              with:
                channel: "infrastructure-costs"
                text: "AWS cost anomaly: {{service_name}} increased {{cost_increase_pct}}% to ${{estimated_daily_cost}}/day. Ticket: {{create-finops-ticket.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When Datadog fires a P1 monitor alert, automatically creates a Jira incident ticket, notifies the on-call engineer via Slack, and logs the event in the incident management workflow.

naftiko: "0.5"
info:
  label: "Datadog Incident Alert to Jira"
  description: "When Datadog fires a P1 monitor alert, automatically creates a Jira incident ticket, notifies the on-call engineer via Slack, and logs the event in the incident management workflow."
  tags:
    - devops
    - datadog
    - jira
    - slack
    - incident-response
    - observability
capability:
  exposes:
    - type: mcp
      namespace: incident-ops
      port: 8080
      tools:
        - name: handle-p1-alert
          description: "Given a Datadog monitor ID and alert message, retrieve monitor details, open a Jira P1 incident, and notify the #incidents Slack channel. Invoke from Datadog webhook integrations on ALERT state transitions."
          inputParameters:
            - name: monitor_id
              in: body
              type: integer
              description: "Datadog monitor ID that fired the alert."
            - name: alert_message
              in: body
              type: string
              description: "Alert body text from the Datadog notification."
            - name: service
              in: body
              type: string
              description: "Service name associated with the triggered monitor."
          steps:
            - name: get-monitor
              type: call
              call: datadog-monitors.get-monitor
              with:
                monitor_id: "{{monitor_id}}"
            - name: create-incident
              type: call
              call: jira-incident.create-issue
              with:
                project_key: "OPS"
                issuetype: "Incident"
                summary: "P1 Alert: {{service}} — {{alert_message}}"
                description: "Datadog monitor {{monitor_id}} fired.\nService: {{service}}\nMessage: {{alert_message}}\nMonitor name: {{get-monitor.name}}"
                priority: "Highest"
            - name: notify-oncall
              type: call
              call: slack-incidents.post-message
              with:
                channel: "incidents"
                text: "P1 ALERT: {{service}} | Monitor: {{monitor_id}} | Jira: {{create-incident.key}} | {{alert_message}}"
  consumes:
    - type: http
      namespace: datadog-monitors
      baseUri: "https://api.datadoghq.com/api/v1"
      authentication:
        type: apikey
        key: "DD-API-KEY"
        value: "$secrets.datadog_api_key"
        placement: header
      resources:
        - name: monitors
          path: "/monitor/{{monitor_id}}"
          inputParameters:
            - name: monitor_id
              in: path
          operations:
            - name: get-monitor
              method: GET
    - type: http
      namespace: jira-incident
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack-incidents
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Queries Datadog for infrastructure metric anomalies over the past 24 hours and posts a cost anomaly report to the platform engineering Slack channel.

naftiko: "0.5"
info:
  label: "Datadog Infrastructure Cost Anomaly Detection"
  description: "Queries Datadog for infrastructure metric anomalies over the past 24 hours and posts a cost anomaly report to the platform engineering Slack channel."
  tags:
    - cloud
    - datadog
    - slack
    - cost-management
    - observability
capability:
  exposes:
    - type: mcp
      namespace: platform-ops
      port: 8080
      tools:
        - name: detect-infra-cost-anomaly
          description: "Query Datadog for AWS infrastructure cost anomalies detected in the past 24 hours and post a ranked report to the #platform-eng Slack channel. Use daily for cloud spend governance."
          inputParameters:
            - name: threshold_percent
              in: body
              type: number
              description: "Percentage increase threshold to flag as an anomaly (e.g. 20 for 20% above baseline)."
          steps:
            - name: query-anomalies
              type: call
              call: datadog-anomalies.query-metrics
              with:
                query: "anomalies(avg:aws.ec2.estimated_charges{*}, adaptive, 2)"
                from: "-86400"
                to: "0"
            - name: post-anomaly-report
              type: call
              call: slack-platform.post-message
              with:
                channel: "platform-eng"
                text: "Infrastructure cost anomaly report (last 24h): Threshold {{threshold_percent}}%. Results: {{query-anomalies.series}}"
  consumes:
    - type: http
      namespace: datadog-anomalies
      baseUri: "https://api.datadoghq.com/api/v1"
      authentication:
        type: apikey
        key: "DD-API-KEY"
        value: "$secrets.datadog_api_key"
        placement: header
      resources:
        - name: metrics-query
          path: "/query"
          inputParameters:
            - name: query
              in: query
            - name: from
              in: query
            - name: to
              in: query
          operations:
            - name: query-metrics
              method: GET
    - type: http
      namespace: slack-platform
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Retrieves p99 payment processing latency from Datadog APM for Stripe's payment services.

naftiko: "0.5"
info:
  label: "Datadog Payment Latency Check"
  description: "Retrieves p99 payment processing latency from Datadog APM for Stripe's payment services."
  tags:
    - observability
    - datadog
    - payments
capability:
  exposes:
    - type: mcp
      namespace: payment-monitoring
      port: 8080
      tools:
        - name: get-payment-latency
          description: "Given a service name, return p99 latency for payment processing. Use for SLO tracking."
          inputParameters:
            - name: service_name
              in: body
              type: string
              description: "The Datadog service name."
          call: "datadog-apm.query-timeseries"
          with:
            query: "avg:trace.http.request.duration.by_service_95p{service:{{service_name}}}"
          outputParameters:
            - name: p99_latency_ms
              type: number
              mapping: "$.series[0].pointlist[-1][1]"
  consumes:
    - type: http
      namespace: datadog-apm
      baseUri: "https://api.datadoghq.com/api/v1"
      authentication:
        type: apikey
        key: "DD-API-KEY"
        value: "$secrets.datadog_api_key"
        placement: header
      resources:
        - name: query
          path: "/query"
          operations:
            - name: query-timeseries
              method: GET

When an SLO burn rate alert fires, creates a Jira investigation ticket, pages the owning team, and posts to the SRE Slack channel.

naftiko: "0.5"
info:
  label: "Datadog SLO Burn Rate Responder"
  description: "When an SLO burn rate alert fires, creates a Jira investigation ticket, pages the owning team, and posts to the SRE Slack channel."
  tags:
    - sre
    - datadog
    - jira
    - pagerduty
    - slack
capability:
  exposes:
    - type: mcp
      namespace: slo-ops
      port: 8080
      tools:
        - name: respond-to-slo-burn
          description: "Given an SLO name and burn rate, create investigation ticket, page team, and notify SRE."
          inputParameters:
            - name: slo_name
              in: body
              type: string
              description: "The SLO name."
            - name: burn_rate
              in: body
              type: number
              description: "Current burn rate multiplier."
            - name: owning_team
              in: body
              type: string
              description: "The team owning this SLO."
          steps:
            - name: create-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "SRE"
                issuetype: "Bug"
                summary: "SLO burn: {{slo_name}} at {{burn_rate}}x"
                description: "Owning team: {{owning_team}}"
            - name: page-team
              type: call
              call: "pagerduty.create-incident"
              with:
                title: "SLO burn rate: {{slo_name}} at {{burn_rate}}x"
                service_id: "{{owning_team}}_SRE"
            - name: notify-sre
              type: call
              call: "slack.post-message"
              with:
                channel: "sre-alerts"
                text: "SLO burn: {{slo_name}} at {{burn_rate}}x. Team: {{owning_team}}. Jira: {{create-ticket.key}}. PD: {{page-team.incident.id}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: pagerduty
      baseUri: "https://api.pagerduty.com"
      authentication:
        type: apikey
        key: "Authorization"
        value: "$secrets.pagerduty_token"
        placement: header
      resources:
        - name: incidents
          path: "/incidents"
          operations:
            - name: create-incident
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Retrieves Datadog SLO status for a given service and posts a compliance report to Slack. Triggered weekly or on-demand for engineering reliability reviews.

naftiko: "0.5"
info:
  label: "Datadog SLO Compliance Check"
  description: "Retrieves Datadog SLO status for a given service and posts a compliance report to Slack. Triggered weekly or on-demand for engineering reliability reviews."
  tags:
    - devops
    - datadog
    - slack
    - observability
    - slo
    - reliability
capability:
  exposes:
    - type: mcp
      namespace: reliability-ops
      port: 8080
      tools:
        - name: check-slo-compliance
          description: "Given a Datadog SLO ID, retrieve its current status and error budget remaining, then post a compliance summary to a Slack channel. Use for weekly reliability reviews or ad-hoc SLO checks."
          inputParameters:
            - name: slo_id
              in: body
              type: string
              description: "Datadog SLO ID to check compliance for."
            - name: slack_channel
              in: body
              type: string
              description: "Slack channel to post the SLO compliance report."
          steps:
            - name: get-slo
              type: call
              call: datadog-slos.get-slo
              with:
                slo_id: "{{slo_id}}"
            - name: post-slo-report
              type: call
              call: slack-reliability.post-message
              with:
                channel: "{{slack_channel}}"
                text: "SLO Compliance for {{slo_id}}: Status {{get-slo.data.overall_status}} | Error budget: {{get-slo.data.overall_error_budget_remaining}}%"
  consumes:
    - type: http
      namespace: datadog-slos
      baseUri: "https://api.datadoghq.com/api/v1"
      authentication:
        type: apikey
        key: "DD-API-KEY"
        value: "$secrets.datadog_api_key"
        placement: header
      resources:
        - name: slos
          path: "/slo/{{slo_id}}"
          inputParameters:
            - name: slo_id
              in: path
          operations:
            - name: get-slo
              method: GET
    - type: http
      namespace: slack-reliability
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a new engineer joins Stripe, creates a Jira onboarding epic, provisions GitHub org access, provisions Okta account, and sends a Slack welcome.

naftiko: "0.5"
info:
  label: "Engineer Onboarding Orchestrator"
  description: "When a new engineer joins Stripe, creates a Jira onboarding epic, provisions GitHub org access, provisions Okta account, and sends a Slack welcome."
  tags:
    - hr
    - onboarding
    - jira
    - github
    - okta
    - slack
capability:
  exposes:
    - type: mcp
      namespace: hr-onboarding
      port: 8080
      tools:
        - name: onboard-engineer
          description: "Given employee details, create Jira epic, provision GitHub and Okta access, and welcome on Slack."
          inputParameters:
            - name: employee_name
              in: body
              type: string
              description: "New hire's full name."
            - name: github_username
              in: body
              type: string
              description: "GitHub username."
            - name: team_name
              in: body
              type: string
              description: "Engineering team name."
            - name: start_date
              in: body
              type: string
              description: "Start date YYYY-MM-DD."
          steps:
            - name: create-onboarding-epic
              type: call
              call: "jira.create-issue"
              with:
                project_key: "ENG"
                issuetype: "Epic"
                summary: "Onboarding: {{employee_name}} — {{team_name}} — {{start_date}}"
            - name: provision-github
              type: call
              call: "github.add-org-member"
              with:
                username: "{{github_username}}"
                role: "member"
            - name: welcome-slack
              type: call
              call: "slack.post-message"
              with:
                channel: "{{team_name}}-engineering"
                text: "Welcome {{employee_name}} to the {{team_name}} team! Starting {{start_date}}. Onboarding: {{create-onboarding-epic.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: github
      baseUri: "https://api.github.com"
      authentication:
        type: bearer
        token: "$secrets.github_token"
      resources:
        - name: org-members
          path: "/orgs/stripe/memberships/{{username}}"
          inputParameters:
            - name: username
              in: path
          operations:
            - name: add-org-member
              method: PUT
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a Stripe invoice payment fails, retries the charge, logs the event to Datadog, and creates a Jira task for the collections team if retries are exhausted.

naftiko: "0.5"
info:
  label: "Failed Payment Retry Orchestration"
  description: "When a Stripe invoice payment fails, retries the charge, logs the event to Datadog, and creates a Jira task for the collections team if retries are exhausted."
  tags:
    - finance
    - payments
    - stripe
    - datadog
    - jira
    - incident-response
    - billing
capability:
  exposes:
    - type: mcp
      namespace: billing-ops
      port: 8080
      tools:
        - name: handle-payment-failure
          description: "Given a Stripe invoice ID and customer ID, retry the payment, emit a Datadog metric event, and open a Jira collections task if the retry also fails. Use in response to Stripe invoice.payment_failed webhooks."
          inputParameters:
            - name: invoice_id
              in: body
              type: string
              description: "Stripe invoice ID (in_xxxxx) that failed payment."
            - name: customer_id
              in: body
              type: string
              description: "Stripe customer ID associated with the failed invoice."
            - name: attempt_count
              in: body
              type: integer
              description: "Number of prior payment attempts already made."
          steps:
            - name: retry-invoice
              type: call
              call: stripe-invoices.pay-invoice
              with:
                invoice_id: "{{invoice_id}}"
            - name: log-metric
              type: call
              call: datadog-metrics.post-metric
              with:
                metric: "stripe.payment.failure"
                value: 1
                tags: "invoice:{{invoice_id}},customer:{{customer_id}},attempts:{{attempt_count}}"
            - name: create-collections-task
              type: call
              call: jira-issues.create-issue
              with:
                project_key: "BILL"
                issuetype: "Task"
                summary: "Collections follow-up: invoice {{invoice_id}} for customer {{customer_id}}"
                description: "Invoice {{invoice_id}} has failed payment after {{attempt_count}} attempts. Stripe retry initiated: {{retry-invoice.status}}"
  consumes:
    - type: http
      namespace: stripe-invoices
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: invoice-pay
          path: "/invoices/{{invoice_id}}/pay"
          inputParameters:
            - name: invoice_id
              in: path
          operations:
            - name: pay-invoice
              method: POST
    - type: http
      namespace: datadog-metrics
      baseUri: "https://api.datadoghq.com/api/v1"
      authentication:
        type: apikey
        key: "DD-API-KEY"
        value: "$secrets.datadog_api_key"
        placement: header
      resources:
        - name: metrics
          path: "/series"
          operations:
            - name: post-metric
              method: POST
    - type: http
      namespace: jira-issues
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST

Before a production deploy, checks Datadog for active incidents, verifies GitHub CI status, and posts a deployment readiness report to Slack.

naftiko: "0.5"
info:
  label: "GitHub CI/CD Deployment Gate"
  description: "Before a production deploy, checks Datadog for active incidents, verifies GitHub CI status, and posts a deployment readiness report to Slack."
  tags:
    - cicd
    - github
    - datadog
    - slack
capability:
  exposes:
    - type: mcp
      namespace: deploy-ops
      port: 8080
      tools:
        - name: check-deploy-readiness
          description: "Given a repo and branch, check CI status, verify no active incidents, and report readiness."
          inputParameters:
            - name: repo_name
              in: body
              type: string
              description: "The repository name."
            - name: branch
              in: body
              type: string
              description: "The branch to deploy."
          steps:
            - name: check-ci-status
              type: call
              call: "github.get-branch-status"
              with:
                repo: "{{repo_name}}"
                branch: "{{branch}}"
            - name: post-readiness
              type: call
              call: "slack.post-message"
              with:
                channel: "deployments"
                text: "Deploy readiness for {{repo_name}}:{{branch}}: CI status={{check-ci-status.state}}"
  consumes:
    - type: http
      namespace: github
      baseUri: "https://api.github.com"
      authentication:
        type: bearer
        token: "$secrets.github_token"
      resources:
        - name: branch-status
          path: "/repos/stripe/{{repo}}/commits/{{branch}}/status"
          inputParameters:
            - name: repo
              in: path
            - name: branch
              in: path
          operations:
            - name: get-branch-status
              method: GET
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a pull request is opened in a Stripe engineering repository, automatically assigns reviewers based on CODEOWNERS and posts a review reminder in the team's Slack channel.

naftiko: "0.5"
info:
  label: "GitHub Code Review Assignment"
  description: "When a pull request is opened in a Stripe engineering repository, automatically assigns reviewers based on CODEOWNERS and posts a review reminder in the team's Slack channel."
  tags:
    - devops
    - github
    - slack
    - code-review
capability:
  exposes:
    - type: mcp
      namespace: eng-ops
      port: 8080
      tools:
        - name: assign-pr-reviewers
          description: "Given a GitHub pull request number and repo, fetch PR details, assign reviewers, and post a review request to the relevant Slack engineering channel. Use as a post-PR-open webhook handler."
          inputParameters:
            - name: pr_number
              in: body
              type: integer
              description: "GitHub pull request number."
            - name: owner
              in: body
              type: string
              description: "GitHub repository owner or org name."
            - name: repo
              in: body
              type: string
              description: "GitHub repository name."
            - name: reviewers
              in: body
              type: string
              description: "Comma-separated list of GitHub usernames to assign as reviewers."
            - name: slack_channel
              in: body
              type: string
              description: "Slack channel to post the review request notification."
          steps:
            - name: get-pr
              type: call
              call: github-prs.get-pull-request
              with:
                owner: "{{owner}}"
                repo: "{{repo}}"
                pull_number: "{{pr_number}}"
            - name: assign-reviewers
              type: call
              call: github-reviewers.request-reviewers
              with:
                owner: "{{owner}}"
                repo: "{{repo}}"
                pull_number: "{{pr_number}}"
                reviewers: "{{reviewers}}"
            - name: notify-team
              type: call
              call: slack-eng.post-message
              with:
                channel: "{{slack_channel}}"
                text: "Review requested: {{get-pr.title}} (PR #{{pr_number}}) in {{repo}} — assigned to {{reviewers}}"
  consumes:
    - type: http
      namespace: github-prs
      baseUri: "https://api.github.com"
      authentication:
        type: bearer
        token: "$secrets.github_token"
      resources:
        - name: pull-requests
          path: "/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}"
          inputParameters:
            - name: owner
              in: path
            - name: repo
              in: path
            - name: pull_number
              in: path
          operations:
            - name: get-pull-request
              method: GET
    - type: http
      namespace: github-reviewers
      baseUri: "https://api.github.com"
      authentication:
        type: bearer
        token: "$secrets.github_token"
      resources:
        - name: review-requests
          path: "/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/requested_reviewers"
          inputParameters:
            - name: owner
              in: path
            - name: repo
              in: path
            - name: pull_number
              in: path
          operations:
            - name: request-reviewers
              method: POST
    - type: http
      namespace: slack-eng
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

On pull request merge to main, runs pre-deployment checks via GitHub Actions, posts build status to Slack, and creates a Datadog deployment event marker.

naftiko: "0.5"
info:
  label: "GitHub Pull Request Deployment Gate"
  description: "On pull request merge to main, runs pre-deployment checks via GitHub Actions, posts build status to Slack, and creates a Datadog deployment event marker."
  tags:
    - devops
    - github
    - datadog
    - slack
    - cicd
    - deployment
capability:
  exposes:
    - type: mcp
      namespace: deploy-ops
      port: 8080
      tools:
        - name: handle-pr-merge-deployment
          description: "Given a merged PR number, repo, and commit SHA, trigger a GitHub Actions workflow, post a Slack deployment notice, and create a Datadog deployment marker. Use as the post-merge deployment orchestration step."
          inputParameters:
            - name: pr_number
              in: body
              type: integer
              description: "Merged pull request number."
            - name: repo
              in: body
              type: string
              description: "Repository name in owner/repo format."
            - name: commit_sha
              in: body
              type: string
              description: "SHA of the merge commit triggering deployment."
            - name: service_name
              in: body
              type: string
              description: "Service or component being deployed."
          steps:
            - name: trigger-workflow
              type: call
              call: github-actions.trigger-dispatch
              with:
                repo: "{{repo}}"
                event_type: "deploy"
                client_payload: "{{commit_sha}}"
            - name: post-deploy-notice
              type: call
              call: slack-deploy.post-message
              with:
                channel: "deployments"
                text: "Deploying {{service_name}} from PR #{{pr_number}} commit {{commit_sha}}"
            - name: create-dd-marker
              type: call
              call: datadog-deploy.create-event
              with:
                title: "Deployment: {{service_name}}"
                text: "PR #{{pr_number}} merged — commit {{commit_sha}} deploying to production"
                tags: "service:{{service_name}},env:production"
  consumes:
    - type: http
      namespace: github-actions
      baseUri: "https://api.github.com"
      authentication:
        type: bearer
        token: "$secrets.github_token"
      resources:
        - name: dispatches
          path: "/repos/{{repo}}/dispatches"
          inputParameters:
            - name: repo
              in: path
          operations:
            - name: trigger-dispatch
              method: POST
    - type: http
      namespace: slack-deploy
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST
    - type: http
      namespace: datadog-deploy
      baseUri: "https://api.datadoghq.com/api/v1"
      authentication:
        type: apikey
        key: "DD-API-KEY"
        value: "$secrets.datadog_api_key"
        placement: header
      resources:
        - name: events
          path: "/events"
          operations:
            - name: create-event
              method: POST

When a GitHub release is published, posts release notes to Slack and creates a Confluence changelog entry.

naftiko: "0.5"
info:
  label: "GitHub Release Deployment Announcer"
  description: "When a GitHub release is published, posts release notes to Slack and creates a Confluence changelog entry."
  tags:
    - engineering
    - github
    - slack
    - confluence
capability:
  exposes:
    - type: mcp
      namespace: release-ops
      port: 8080
      tools:
        - name: announce-release
          description: "Given a repo and release tag, fetch notes, post to Slack, and update Confluence."
          inputParameters:
            - name: repo_name
              in: body
              type: string
              description: "Repository name."
            - name: release_tag
              in: body
              type: string
              description: "Release tag."
          steps:
            - name: get-release
              type: call
              call: "github.get-release"
              with:
                repo: "{{repo_name}}"
                tag: "{{release_tag}}"
            - name: post-announcement
              type: call
              call: "slack.post-message"
              with:
                channel: "releases"
                text: "Release {{release_tag}} for {{repo_name}}:\n{{get-release.body}}"
            - name: update-changelog
              type: call
              call: "confluence.create-page"
              with:
                spaceKey: "ENG"
                title: "Release {{release_tag}} — {{repo_name}}"
                body: "{{get-release.body}}"
  consumes:
    - type: http
      namespace: github
      baseUri: "https://api.github.com"
      authentication:
        type: bearer
        token: "$secrets.github_token"
      resources:
        - name: releases
          path: "/repos/stripe/{{repo}}/releases/tags/{{tag}}"
          inputParameters:
            - name: repo
              in: path
            - name: tag
              in: path
          operations:
            - name: get-release
              method: GET
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST
    - type: http
      namespace: confluence
      baseUri: "https://stripe.atlassian.net/wiki/rest/api"
      authentication:
        type: basic
        username: "$secrets.confluence_user"
        password: "$secrets.confluence_api_token"
      resources:
        - name: pages
          path: "/content"
          operations:
            - name: create-page
              method: POST

Retrieves the count of open Dependabot alerts for a given GitHub repository.

naftiko: "0.5"
info:
  label: "GitHub Repo Vulnerability Count"
  description: "Retrieves the count of open Dependabot alerts for a given GitHub repository."
  tags:
    - security
    - github
capability:
  exposes:
    - type: mcp
      namespace: security
      port: 8080
      tools:
        - name: get-vulnerability-count
          description: "Given a repo name, return the count of open Dependabot vulnerability alerts."
          inputParameters:
            - name: repo_name
              in: body
              type: string
              description: "The GitHub repository name."
          call: "github-alerts.list-alerts"
          with:
            repo: "{{repo_name}}"
          outputParameters:
            - name: alert_count
              type: number
              mapping: "$.length"
  consumes:
    - type: http
      namespace: github-alerts
      baseUri: "https://api.github.com"
      authentication:
        type: bearer
        token: "$secrets.github_token"
      resources:
        - name: alerts
          path: "/repos/stripe/{{repo}}/dependabot/alerts"
          inputParameters:
            - name: repo
              in: path
          operations:
            - name: list-alerts
              method: GET

Fetches Dependabot security alerts for a GitHub repository, filters critical severity findings, and creates Jira security tickets for each critical vulnerability.

naftiko: "0.5"
info:
  label: "GitHub Security Vulnerability Scan Alert"
  description: "Fetches Dependabot security alerts for a GitHub repository, filters critical severity findings, and creates Jira security tickets for each critical vulnerability."
  tags:
    - devops
    - github
    - jira
    - security
    - vulnerability-management
capability:
  exposes:
    - type: mcp
      namespace: security-ops
      port: 8080
      tools:
        - name: triage-security-alerts
          description: "Given a GitHub repo owner and name, fetch all open Dependabot critical security alerts and create a Jira security ticket for each. Use as a daily security scanning agent or post-deploy vulnerability check."
          inputParameters:
            - name: owner
              in: body
              type: string
              description: "GitHub repository owner or organization name."
            - name: repo
              in: body
              type: string
              description: "GitHub repository name to scan for vulnerabilities."
          steps:
            - name: get-alerts
              type: call
              call: github-security.get-dependabot-alerts
              with:
                owner: "{{owner}}"
                repo: "{{repo}}"
                severity: "critical"
            - name: create-sec-ticket
              type: call
              call: jira-security.create-issue
              with:
                project_key: "SEC"
                issuetype: "Bug"
                summary: "Critical vulnerability in {{repo}}: {{get-alerts.number}} alerts"
                description: "Critical Dependabot alerts detected in {{owner}}/{{repo}}. Alert count: {{get-alerts.total_count}}. Immediate remediation required."
  consumes:
    - type: http
      namespace: github-security
      baseUri: "https://api.github.com"
      authentication:
        type: bearer
        token: "$secrets.github_token"
      resources:
        - name: dependabot-alerts
          path: "/repos/{{owner}}/{{repo}}/dependabot/alerts"
          inputParameters:
            - name: owner
              in: path
            - name: repo
              in: path
            - name: severity
              in: query
          operations:
            - name: get-dependabot-alerts
              method: GET
    - type: http
      namespace: jira-security
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST

Retrieves the count of open bugs grouped by severity for a given Jira project.

naftiko: "0.5"
info:
  label: "Jira Bug Count by Severity"
  description: "Retrieves the count of open bugs grouped by severity for a given Jira project."
  tags:
    - engineering
    - jira
capability:
  exposes:
    - type: mcp
      namespace: eng-metrics
      port: 8080
      tools:
        - name: get-bug-counts
          description: "Given a Jira project key, return the count of open bugs by severity."
          inputParameters:
            - name: project_key
              in: body
              type: string
              description: "The Jira project key."
          call: "jira-search.search-issues"
          with:
            jql: "project={{project_key}} AND issuetype=Bug AND status!=Done"
          outputParameters:
            - name: total
              type: number
              mapping: "$.total"
  consumes:
    - type: http
      namespace: jira-search
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: search
          path: "/search"
          operations:
            - name: search-issues
              method: GET

When a Jira issue is escalated to P1 priority, posts an alert to the #escalations Slack channel and creates a Datadog event for correlated observability tracking.

naftiko: "0.5"
info:
  label: "Jira Escalation to Slack and Datadog"
  description: "When a Jira issue is escalated to P1 priority, posts an alert to the #escalations Slack channel and creates a Datadog event for correlated observability tracking."
  tags:
    - devops
    - jira
    - slack
    - datadog
    - escalation
    - incident-response
capability:
  exposes:
    - type: mcp
      namespace: escalation-ops
      port: 8080
      tools:
        - name: handle-jira-escalation
          description: "Given a Jira issue key and escalation reason, post an escalation notice to #escalations in Slack and create a correlated Datadog event. Use when a Jira automation or human escalates an issue to P1."
          inputParameters:
            - name: issue_key
              in: body
              type: string
              description: "Jira issue key being escalated (e.g. OPS-1234)."
            - name: escalation_reason
              in: body
              type: string
              description: "Text describing why the issue was escalated to P1."
            - name: service_tag
              in: body
              type: string
              description: "Service or component tag for Datadog event correlation."
          steps:
            - name: post-escalation
              type: call
              call: slack-escalation.post-message
              with:
                channel: "escalations"
                text: "P1 ESCALATION: {{issue_key}} | Reason: {{escalation_reason}} | https://stripe.atlassian.net/browse/{{issue_key}}"
            - name: log-dd-event
              type: call
              call: datadog-escalation.create-event
              with:
                title: "Jira P1 Escalation: {{issue_key}}"
                text: "{{escalation_reason}}"
                tags: "service:{{service_tag}},source:jira,priority:p1"
  consumes:
    - type: http
      namespace: slack-escalation
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST
    - type: http
      namespace: datadog-escalation
      baseUri: "https://api.datadoghq.com/api/v1"
      authentication:
        type: apikey
        key: "DD-API-KEY"
        value: "$secrets.datadog_api_key"
        placement: header
      resources:
        - name: events
          path: "/events"
          operations:
            - name: create-event
              method: POST

Fetches completed issues from a Jira sprint, computes story point velocity, and posts a sprint retrospective summary to the engineering Slack channel.

naftiko: "0.5"
info:
  label: "Jira Sprint Velocity Report"
  description: "Fetches completed issues from a Jira sprint, computes story point velocity, and posts a sprint retrospective summary to the engineering Slack channel."
  tags:
    - devops
    - jira
    - slack
    - reporting
    - agile
capability:
  exposes:
    - type: mcp
      namespace: eng-reporting
      port: 8080
      tools:
        - name: digest-sprint-velocity
          description: "Given a Jira board ID and sprint ID, fetch all completed issues with story points, compute total velocity, and post the sprint summary to a Slack channel. Use at sprint close for retrospective preparation."
          inputParameters:
            - name: board_id
              in: body
              type: integer
              description: "Jira Scrum board ID containing the sprint."
            - name: sprint_id
              in: body
              type: integer
              description: "Jira sprint ID to report on."
            - name: slack_channel
              in: body
              type: string
              description: "Slack channel to post the sprint velocity summary."
          steps:
            - name: get-sprint-issues
              type: call
              call: jira-sprints.get-sprint-issues
              with:
                board_id: "{{board_id}}"
                sprint_id: "{{sprint_id}}"
            - name: post-velocity
              type: call
              call: slack-agile.post-message
              with:
                channel: "{{slack_channel}}"
                text: "Sprint {{sprint_id}} velocity report: Issues retrieved from board {{board_id}}. Review completed stories: {{get-sprint-issues.total}}"
  consumes:
    - type: http
      namespace: jira-sprints
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: sprint-issues
          path: "/board/{{board_id}}/sprint/{{sprint_id}}/issue"
          inputParameters:
            - name: board_id
              in: path
            - name: sprint_id
              in: path
          operations:
            - name: get-sprint-issues
              method: GET
    - type: http
      namespace: slack-agile
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a merchant's payment volume drops significantly, queries Snowflake for analytics, updates Salesforce account health, and alerts the merchant success team via Slack.

naftiko: "0.5"
info:
  label: "Merchant Churn Risk Alert"
  description: "When a merchant's payment volume drops significantly, queries Snowflake for analytics, updates Salesforce account health, and alerts the merchant success team via Slack."
  tags:
    - analytics
    - snowflake
    - salesforce
    - slack
    - customer-success
capability:
  exposes:
    - type: mcp
      namespace: merchant-success
      port: 8080
      tools:
        - name: alert-churn-risk
          description: "Given a merchant ID and volume decline percentage, pull analytics, update Salesforce, and alert the team."
          inputParameters:
            - name: merchant_id
              in: body
              type: string
              description: "The merchant account ID."
            - name: decline_pct
              in: body
              type: number
              description: "Volume decline percentage."
          steps:
            - name: query-analytics
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT total_volume, txn_count, avg_txn_size FROM payments.merchant_monthly WHERE merchant_id='{{merchant_id}}' ORDER BY month DESC LIMIT 3"
            - name: update-salesforce
              type: call
              call: "salesforce.update-account"
              with:
                account_id: "{{merchant_id}}"
                Churn_Risk__c: "High"
            - name: alert-team
              type: call
              call: "slack.post-message"
              with:
                channel: "merchant-success-alerts"
                text: "Churn risk: Merchant {{merchant_id}} volume dropped {{decline_pct}}%. Last 3 months: {{query-analytics.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: salesforce
      baseUri: "https://stripe.my.salesforce.com/services/data/v58.0"
      authentication:
        type: bearer
        token: "$secrets.salesforce_token"
      resources:
        - name: accounts
          path: "/sobjects/Account/{{account_id}}"
          inputParameters:
            - name: account_id
              in: path
          operations:
            - name: update-account
              method: PATCH
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Submits an incoming support message to OpenAI for intent classification, then routes the Zendesk ticket to the appropriate support queue based on the classified intent.

naftiko: "0.5"
info:
  label: "OpenAI-Assisted Support Ticket Routing"
  description: "Submits an incoming support message to OpenAI for intent classification, then routes the Zendesk ticket to the appropriate support queue based on the classified intent."
  tags:
    - ai
    - openai
    - support
    - automation
    - triage
capability:
  exposes:
    - type: mcp
      namespace: support-ai
      port: 8080
      tools:
        - name: route-support-ticket
          description: "Given a support ticket subject and body, call OpenAI to classify the intent (billing, technical, fraud, general), then update the ticket's Zendesk group assignment accordingly. Use at ticket ingestion for zero-touch triage routing."
          inputParameters:
            - name: ticket_id
              in: body
              type: string
              description: "Zendesk ticket ID to route."
            - name: ticket_subject
              in: body
              type: string
              description: "Zendesk ticket subject line."
            - name: ticket_body
              in: body
              type: string
              description: "Full text body of the support ticket."
          steps:
            - name: classify-intent
              type: call
              call: openai-classify.create-completion
              with:
                model: "gpt-4o"
                messages: "[{\"role\":\"system\",\"content\":\"Classify this support ticket into one of: billing, technical, fraud, general. Return only the category.\"},{\"role\":\"user\",\"content\":\"Subject: {{ticket_subject}}\\n\\n{{ticket_body}}\"}]"
                max_tokens: 10
            - name: update-ticket-group
              type: call
              call: zendesk-tickets.update-ticket
              with:
                ticket_id: "{{ticket_id}}"
                group_name: "{{classify-intent.choices[0].message.content}}"
  consumes:
    - type: http
      namespace: openai-classify
      baseUri: "https://api.openai.com/v1"
      authentication:
        type: bearer
        token: "$secrets.openai_api_key"
      resources:
        - name: chat-completions
          path: "/chat/completions"
          operations:
            - name: create-completion
              method: POST
    - type: http
      namespace: zendesk-tickets
      baseUri: "https://stripe.zendesk.com/api/v2"
      authentication:
        type: basic
        username: "$secrets.zendesk_user"
        password: "$secrets.zendesk_api_token"
      resources:
        - name: tickets
          path: "/tickets/{{ticket_id}}"
          inputParameters:
            - name: ticket_id
              in: path
          operations:
            - name: update-ticket
              method: PUT

Given a Stripe payment intent ID, retrieves full payment status, amount, currency, and customer metadata. Use for support triage or reconciliation workflows.

naftiko: "0.5"
info:
  label: "Payment Intent Lookup"
  description: "Given a Stripe payment intent ID, retrieves full payment status, amount, currency, and customer metadata. Use for support triage or reconciliation workflows."
  tags:
    - finance
    - payments
    - stripe
    - lookup
capability:
  exposes:
    - type: mcp
      namespace: payments
      port: 8080
      tools:
        - name: get-payment-intent
          description: "Given a Stripe payment intent ID, return its status, amount, currency, and attached customer record. Invoke when a support agent or reconciliation job needs to verify a transaction state."
          inputParameters:
            - name: payment_intent_id
              in: body
              type: string
              description: "The Stripe payment intent ID (format: pi_xxxxx)."
          call: stripe.get-payment-intent
          with:
            id: "{{payment_intent_id}}"
          outputParameters:
            - name: status
              type: string
              mapping: "$.status"
            - name: amount
              type: number
              mapping: "$.amount"
            - name: currency
              type: string
              mapping: "$.currency"
            - name: customer_id
              type: string
              mapping: "$.customer"
  consumes:
    - type: http
      namespace: stripe
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: payment-intents
          path: "/payment_intents/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-payment-intent
              method: GET

When a quarterly PCI audit is due, creates a Jira audit epic, assigns tasks to responsible teams, and notifies the compliance team via Slack.

naftiko: "0.5"
info:
  label: "PCI Compliance Audit Workflow"
  description: "When a quarterly PCI audit is due, creates a Jira audit epic, assigns tasks to responsible teams, and notifies the compliance team via Slack."
  tags:
    - compliance
    - pci
    - jira
    - slack
    - security
capability:
  exposes:
    - type: mcp
      namespace: pci-ops
      port: 8080
      tools:
        - name: initiate-pci-audit
          description: "Given a quarter and audit scope, create tracking epic and notify compliance."
          inputParameters:
            - name: audit_quarter
              in: body
              type: string
              description: "Audit quarter (e.g., Q1-2026)."
            - name: audit_scope
              in: body
              type: string
              description: "Scope of PCI audit (e.g., cardholder_data_environment, network_segmentation)."
          steps:
            - name: create-audit-epic
              type: call
              call: "jira.create-issue"
              with:
                project_key: "COMPLY"
                issuetype: "Epic"
                summary: "PCI-DSS audit: {{audit_quarter}} — {{audit_scope}}"
            - name: notify-compliance
              type: call
              call: "slack.post-message"
              with:
                channel: "pci-compliance"
                text: "PCI audit initiated for {{audit_quarter}}: {{audit_scope}}. Epic: {{create-audit-epic.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a production incident is declared, creates a Jira P1 ticket, pages on-call via PagerDuty, opens a Slack incident channel, and posts initial triage data.

naftiko: "0.5"
info:
  label: "Production Incident Response Orchestrator"
  description: "When a production incident is declared, creates a Jira P1 ticket, pages on-call via PagerDuty, opens a Slack incident channel, and posts initial triage data."
  tags:
    - sre
    - incident-response
    - jira
    - pagerduty
    - slack
capability:
  exposes:
    - type: mcp
      namespace: incident-mgmt
      port: 8080
      tools:
        - name: declare-incident
          description: "Given incident details, create P1 ticket, page on-call, and open incident channel."
          inputParameters:
            - name: incident_summary
              in: body
              type: string
              description: "Brief incident summary."
            - name: affected_service
              in: body
              type: string
              description: "The affected service."
            - name: severity
              in: body
              type: string
              description: "Severity: p1, p2, p3."
          steps:
            - name: create-incident-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "INC"
                issuetype: "Bug"
                summary: "[{{severity}}] {{incident_summary}} — {{affected_service}}"
                priority: "Highest"
            - name: page-oncall
              type: call
              call: "pagerduty.create-incident"
              with:
                title: "[{{severity}}] {{incident_summary}} — {{affected_service}}"
                service_id: "{{affected_service}}_SRE"
            - name: notify-war-room
              type: call
              call: "slack.post-message"
              with:
                channel: "incidents"
                text: "INCIDENT DECLARED [{{severity}}]: {{incident_summary}} | Service: {{affected_service}} | Jira: {{create-incident-ticket.key}} | PD: {{page-oncall.incident.id}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: pagerduty
      baseUri: "https://api.pagerduty.com"
      authentication:
        type: apikey
        key: "Authorization"
        value: "$secrets.pagerduty_token"
        placement: header
      resources:
        - name: incidents
          path: "/incidents"
          operations:
            - name: create-incident
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Queries OKR progress from Snowflake, creates a Confluence progress report, and posts a summary to the leadership Slack channel.

naftiko: "0.5"
info:
  label: "Quarterly OKR Tracking Sync"
  description: "Queries OKR progress from Snowflake, creates a Confluence progress report, and posts a summary to the leadership Slack channel."
  tags:
    - business
    - snowflake
    - confluence
    - slack
capability:
  exposes:
    - type: mcp
      namespace: okr-ops
      port: 8080
      tools:
        - name: sync-okr-progress
          description: "Given a quarter, pull OKR data, create a Confluence report, and share summary."
          inputParameters:
            - name: quarter
              in: body
              type: string
              description: "The quarter (e.g., Q1-2026)."
          steps:
            - name: query-okrs
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT team, objective, key_result, progress_pct FROM business.okr_tracking WHERE quarter='{{quarter}}' ORDER BY team, progress_pct"
            - name: create-report
              type: call
              call: "confluence.create-page"
              with:
                spaceKey: "OPS"
                title: "OKR Progress: {{quarter}}"
                body: "{{query-okrs.data}}"
            - name: post-summary
              type: call
              call: "slack.post-message"
              with:
                channel: "leadership"
                text: "OKR progress for {{quarter}} posted: {{create-report._links.webui}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: confluence
      baseUri: "https://stripe.atlassian.net/wiki/rest/api"
      authentication:
        type: basic
        username: "$secrets.confluence_user"
        password: "$secrets.confluence_api_token"
      resources:
        - name: pages
          path: "/content"
          operations:
            - name: create-page
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When an enterprise deal closes in Salesforce, provisions a Stripe account, creates onboarding Jira tickets, and notifies the solutions engineering team via Slack.

naftiko: "0.5"
info:
  label: "Salesforce Enterprise Deal to Stripe Provisioning"
  description: "When an enterprise deal closes in Salesforce, provisions a Stripe account, creates onboarding Jira tickets, and notifies the solutions engineering team via Slack."
  tags:
    - sales
    - salesforce
    - stripe
    - jira
    - slack
capability:
  exposes:
    - type: mcp
      namespace: enterprise-ops
      port: 8080
      tools:
        - name: provision-enterprise-account
          description: "Given a Salesforce opportunity, provision Stripe account, create onboarding tickets, and notify SE team."
          inputParameters:
            - name: opportunity_id
              in: body
              type: string
              description: "Salesforce opportunity ID."
            - name: account_name
              in: body
              type: string
              description: "Enterprise account name."
            - name: deal_value
              in: body
              type: number
              description: "Annual deal value."
          steps:
            - name: create-onboarding-epic
              type: call
              call: "jira.create-issue"
              with:
                project_key: "ENT"
                issuetype: "Epic"
                summary: "Enterprise onboarding: {{account_name}} (${{deal_value}})"
            - name: notify-se-team
              type: call
              call: "slack.post-message"
              with:
                channel: "solutions-engineering"
                text: "New enterprise deal closed! {{account_name}} (${{deal_value}}). Onboarding: {{create-onboarding-epic.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a Salesforce lead converts, automatically creates a Stripe customer and starts a free trial subscription, enabling a zero-touch trial activation flow.

naftiko: "0.5"
info:
  label: "Salesforce Lead to Stripe Trial Activation"
  description: "When a Salesforce lead converts, automatically creates a Stripe customer and starts a free trial subscription, enabling a zero-touch trial activation flow."
  tags:
    - crm
    - salesforce
    - stripe
    - trial
    - sales
capability:
  exposes:
    - type: mcp
      namespace: trial-ops
      port: 8080
      tools:
        - name: activate-trial-from-lead
          description: "Given a Salesforce lead ID and Stripe trial price ID, retrieve lead contact details, create a Stripe customer, start a trial subscription, and update the Salesforce lead with the Stripe customer and subscription IDs. Use for automated trial activation at lead conversion."
          inputParameters:
            - name: lead_id
              in: body
              type: string
              description: "Salesforce lead ID to activate trial for."
            - name: trial_price_id
              in: body
              type: string
              description: "Stripe price ID for the trial plan."
            - name: trial_days
              in: body
              type: integer
              description: "Number of trial days to grant."
          steps:
            - name: get-lead
              type: call
              call: salesforce-leads.get-lead
              with:
                lead_id: "{{lead_id}}"
            - name: create-trial-customer
              type: call
              call: stripe-trial.create-customer
              with:
                email: "{{get-lead.Email}}"
                name: "{{get-lead.Name}}"
            - name: start-trial
              type: call
              call: stripe-trial-subs.create-subscription
              with:
                customer: "{{create-trial-customer.id}}"
                price: "{{trial_price_id}}"
                trial_period_days: "{{trial_days}}"
            - name: update-lead
              type: call
              call: salesforce-leads-update.update-lead
              with:
                lead_id: "{{lead_id}}"
                Stripe_Customer_ID__c: "{{create-trial-customer.id}}"
                Stripe_Subscription_ID__c: "{{start-trial.id}}"
  consumes:
    - type: http
      namespace: salesforce-leads
      baseUri: "https://stripe.my.salesforce.com/services/data/v58.0"
      authentication:
        type: bearer
        token: "$secrets.salesforce_access_token"
      resources:
        - name: leads
          path: "/sobjects/Lead/{{lead_id}}"
          inputParameters:
            - name: lead_id
              in: path
          operations:
            - name: get-lead
              method: GET
    - type: http
      namespace: stripe-trial
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: customers
          path: "/customers"
          operations:
            - name: create-customer
              method: POST
    - type: http
      namespace: stripe-trial-subs
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: subscriptions
          path: "/subscriptions"
          operations:
            - name: create-subscription
              method: POST
    - type: http
      namespace: salesforce-leads-update
      baseUri: "https://stripe.my.salesforce.com/services/data/v58.0"
      authentication:
        type: bearer
        token: "$secrets.salesforce_access_token"
      resources:
        - name: lead-update
          path: "/sobjects/Lead/{{lead_id}}"
          inputParameters:
            - name: lead_id
              in: path
          operations:
            - name: update-lead
              method: PATCH

When a Salesforce opportunity closes as Won, automatically creates a matching Stripe subscription for the customer and updates the Salesforce record with the subscription ID.

naftiko: "0.5"
info:
  label: "Salesforce Opportunity to Stripe Subscription Sync"
  description: "When a Salesforce opportunity closes as Won, automatically creates a matching Stripe subscription for the customer and updates the Salesforce record with the subscription ID."
  tags:
    - crm
    - finance
    - salesforce
    - stripe
    - billing
    - revenue-operations
capability:
  exposes:
    - type: mcp
      namespace: rev-ops
      port: 8080
      tools:
        - name: sync-opportunity-to-subscription
          description: "Given a closed-won Salesforce opportunity ID and Stripe price ID, retrieve opportunity details, create a Stripe subscription for the customer, and write the subscription ID back to the Salesforce opportunity. Use at deal close to automate billing activation."
          inputParameters:
            - name: opportunity_id
              in: body
              type: string
              description: "Salesforce opportunity ID (18-char format) of the closed-won deal."
            - name: stripe_price_id
              in: body
              type: string
              description: "Stripe price ID (price_xxxxx) for the subscription plan."
          steps:
            - name: get-opportunity
              type: call
              call: salesforce-opps.get-opportunity
              with:
                opportunity_id: "{{opportunity_id}}"
            - name: create-subscription
              type: call
              call: stripe-subscriptions.create-subscription
              with:
                customer: "{{get-opportunity.Stripe_Customer_ID__c}}"
                price: "{{stripe_price_id}}"
            - name: update-opportunity
              type: call
              call: salesforce-opps-update.update-opportunity
              with:
                opportunity_id: "{{opportunity_id}}"
                Stripe_Subscription_ID__c: "{{create-subscription.id}}"
  consumes:
    - type: http
      namespace: salesforce-opps
      baseUri: "https://stripe.my.salesforce.com/services/data/v58.0"
      authentication:
        type: bearer
        token: "$secrets.salesforce_access_token"
      resources:
        - name: opportunities
          path: "/sobjects/Opportunity/{{opportunity_id}}"
          inputParameters:
            - name: opportunity_id
              in: path
          operations:
            - name: get-opportunity
              method: GET
    - type: http
      namespace: stripe-subscriptions
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: subscriptions
          path: "/subscriptions"
          operations:
            - name: create-subscription
              method: POST
    - type: http
      namespace: salesforce-opps-update
      baseUri: "https://stripe.my.salesforce.com/services/data/v58.0"
      authentication:
        type: bearer
        token: "$secrets.salesforce_access_token"
      resources:
        - name: opportunity-update
          path: "/sobjects/Opportunity/{{opportunity_id}}"
          inputParameters:
            - name: opportunity_id
              in: path
          operations:
            - name: update-opportunity
              method: PATCH

When a security incident is detected, creates a Jira security ticket, logs in Snowflake for compliance, pages security on-call, and notifies leadership via Slack.

naftiko: "0.5"
info:
  label: "Security Incident Response Playbook"
  description: "When a security incident is detected, creates a Jira security ticket, logs in Snowflake for compliance, pages security on-call, and notifies leadership via Slack."
  tags:
    - security
    - incident-response
    - jira
    - snowflake
    - pagerduty
    - slack
capability:
  exposes:
    - type: mcp
      namespace: security-ir
      port: 8080
      tools:
        - name: execute-security-playbook
          description: "Given incident details, create security ticket, log for compliance, page on-call, and notify leadership."
          inputParameters:
            - name: incident_type
              in: body
              type: string
              description: "Type of security incident."
            - name: severity
              in: body
              type: string
              description: "Severity: critical, high, medium."
            - name: affected_systems
              in: body
              type: string
              description: "Comma-separated list of affected systems."
          steps:
            - name: create-security-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "SEC"
                issuetype: "Bug"
                summary: "[{{severity}}] Security incident: {{incident_type}}"
                description: "Affected systems: {{affected_systems}}"
                priority: "Highest"
            - name: log-incident
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "INSERT INTO security.incidents (type, severity, affected_systems, ticket_key, detected_at) VALUES ('{{incident_type}}', '{{severity}}', '{{affected_systems}}', '{{create-security-ticket.key}}', CURRENT_TIMESTAMP())"
            - name: page-security
              type: call
              call: "pagerduty.create-incident"
              with:
                title: "[{{severity}}] Security: {{incident_type}}"
                service_id: "SECURITY_OPS"
            - name: notify-leadership
              type: call
              call: "slack.post-message"
              with:
                channel: "security-leadership"
                text: "SECURITY INCIDENT [{{severity}}]: {{incident_type}}. Systems: {{affected_systems}}. Jira: {{create-security-ticket.key}}. PD: {{page-security.incident.id}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: pagerduty
      baseUri: "https://api.pagerduty.com"
      authentication:
        type: apikey
        key: "Authorization"
        value: "$secrets.pagerduty_token"
        placement: header
      resources:
        - name: incidents
          path: "/incidents"
          operations:
            - name: create-incident
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Queries GitHub for open pull requests and open Jira bugs, then posts a morning digest summary to the engineering Slack channel to kick off the day's prioritization.

naftiko: "0.5"
info:
  label: "Slack Engineering Channel Digest"
  description: "Queries GitHub for open pull requests and open Jira bugs, then posts a morning digest summary to the engineering Slack channel to kick off the day's prioritization."
  tags:
    - devops
    - github
    - jira
    - slack
    - reporting
    - engineering
capability:
  exposes:
    - type: mcp
      namespace: morning-digest
      port: 8080
      tools:
        - name: publish-engineering-digest
          description: "Given a GitHub repo and Jira project key, fetch open PRs awaiting review and open high-priority bugs, then post a consolidated morning digest to the #engineering Slack channel. Invoke as a daily scheduled agent."
          inputParameters:
            - name: owner
              in: body
              type: string
              description: "GitHub repository owner."
            - name: repo
              in: body
              type: string
              description: "GitHub repository name."
            - name: jira_project
              in: body
              type: string
              description: "Jira project key to check for open bugs."
          steps:
            - name: get-open-prs
              type: call
              call: github-open-prs.list-pull-requests
              with:
                owner: "{{owner}}"
                repo: "{{repo}}"
                state: "open"
            - name: get-open-bugs
              type: call
              call: jira-bugs.search-issues
              with:
                jql: "project={{jira_project}} AND issuetype=Bug AND status!=Done ORDER BY priority ASC"
            - name: post-digest
              type: call
              call: slack-morning.post-message
              with:
                channel: "engineering"
                text: "Good morning! Open PRs in {{repo}}: {{get-open-prs.total_count}}. Open bugs in {{jira_project}}: {{get-open-bugs.total}}. Let's ship!"
  consumes:
    - type: http
      namespace: github-open-prs
      baseUri: "https://api.github.com"
      authentication:
        type: bearer
        token: "$secrets.github_token"
      resources:
        - name: pull-requests
          path: "/repos/{{owner}}/{{repo}}/pulls"
          inputParameters:
            - name: owner
              in: path
            - name: repo
              in: path
            - name: state
              in: query
          operations:
            - name: list-pull-requests
              method: GET
    - type: http
      namespace: jira-bugs
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issue-search
          path: "/issue/search"
          inputParameters:
            - name: jql
              in: query
          operations:
            - name: search-issues
              method: GET
    - type: http
      namespace: slack-morning
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Queries a Snowflake task run history view to check for failed pipeline steps, and alerts the data engineering team in Slack if failures are detected.

naftiko: "0.5"
info:
  label: "Snowflake Data Pipeline Health Check"
  description: "Queries a Snowflake task run history view to check for failed pipeline steps, and alerts the data engineering team in Slack if failures are detected."
  tags:
    - data
    - snowflake
    - slack
    - monitoring
    - data-engineering
capability:
  exposes:
    - type: mcp
      namespace: data-ops
      port: 8080
      tools:
        - name: check-pipeline-health
          description: "Given a Snowflake database and schema, query recent task run history for failures in the past hour and post a Slack alert to #data-engineering if any failed runs are found. Use as a scheduled health check or ad-hoc diagnostic."
          inputParameters:
            - name: database
              in: body
              type: string
              description: "Snowflake database name to check pipeline tasks in."
            - name: schema
              in: body
              type: string
              description: "Snowflake schema containing the pipeline tasks."
          steps:
            - name: query-task-history
              type: call
              call: snowflake-tasks.query-task-history
              with:
                database: "{{database}}"
                schema: "{{schema}}"
            - name: post-health-status
              type: call
              call: slack-data.post-message
              with:
                channel: "data-engineering"
                text: "Pipeline health check for {{database}}.{{schema}}: Task history retrieved. Review failed runs: {{query-task-history.data}}"
  consumes:
    - type: http
      namespace: snowflake-tasks
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: task-history
          path: "/databases/{{database}}/schemas/{{schema}}/tasks"
          inputParameters:
            - name: database
              in: path
            - name: schema
              in: path
          operations:
            - name: query-task-history
              method: GET
    - type: http
      namespace: slack-data
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Executes a merchant analytics query against Snowflake and returns aggregated payment volume data.

naftiko: "0.5"
info:
  label: "Snowflake Merchant Analytics Query"
  description: "Executes a merchant analytics query against Snowflake and returns aggregated payment volume data."
  tags:
    - data
    - snowflake
    - analytics
capability:
  exposes:
    - type: mcp
      namespace: analytics
      port: 8080
      tools:
        - name: query-merchant-analytics
          description: "Given a merchant ID, return payment volume, transaction count, and average transaction value."
          inputParameters:
            - name: merchant_id
              in: body
              type: string
              description: "The merchant account ID."
          call: "snowflake-analytics.execute-statement"
          with:
            statement: "SELECT SUM(amount) as total_volume, COUNT(*) as txn_count, AVG(amount) as avg_txn FROM payments.transactions WHERE merchant_id='{{merchant_id}}' AND created_at>=DATEADD(day, -30, CURRENT_DATE())"
          outputParameters:
            - name: total_volume
              type: number
              mapping: "$.data[0][0]"
            - name: txn_count
              type: number
              mapping: "$.data[0][1]"
  consumes:
    - type: http
      namespace: snowflake-analytics
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST

When a Stripe API version is being deprecated, queries Snowflake for merchants using the old version, creates Jira migration tickets, and sends notification emails via SendGrid.

naftiko: "0.5"
info:
  label: "Stripe API Deprecation Notifier"
  description: "When a Stripe API version is being deprecated, queries Snowflake for merchants using the old version, creates Jira migration tickets, and sends notification emails via SendGrid."
  tags:
    - api-management
    - snowflake
    - jira
    - sendgrid
capability:
  exposes:
    - type: mcp
      namespace: api-lifecycle
      port: 8080
      tools:
        - name: notify-api-deprecation
          description: "Given an API version and deprecation date, find affected merchants, create tickets, and send notifications."
          inputParameters:
            - name: api_version
              in: body
              type: string
              description: "The API version being deprecated."
            - name: deprecation_date
              in: body
              type: string
              description: "Deprecation date."
            - name: replacement_version
              in: body
              type: string
              description: "The replacement API version."
          steps:
            - name: find-affected-merchants
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT merchant_id, merchant_email, api_version FROM merchants.api_usage WHERE api_version='{{api_version}}'"
            - name: create-migration-epic
              type: call
              call: "jira.create-issue"
              with:
                project_key: "API"
                issuetype: "Epic"
                summary: "API deprecation: v{{api_version}} -> v{{replacement_version}} by {{deprecation_date}}"
                description: "Affected merchants: {{find-affected-merchants.data}}"
            - name: send-notifications
              type: call
              call: "sendgrid.send-email"
              with:
                to: "api-deprecation-list@stripe.com"
                subject: "Stripe API version {{api_version}} deprecation notice"
                body: "API version {{api_version}} will be deprecated on {{deprecation_date}}. Please upgrade to {{replacement_version}}."
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: sendgrid
      baseUri: "https://api.sendgrid.com/v3"
      authentication:
        type: bearer
        token: "$secrets.sendgrid_api_key"
      resources:
        - name: mail
          path: "/mail/send"
          operations:
            - name: send-email
              method: POST

When a Stripe Atlas incorporation completes, creates a Salesforce lead, provisions the new company's Stripe account, and sends welcome email via SendGrid.

naftiko: "0.5"
info:
  label: "Stripe Atlas Incorporation Workflow"
  description: "When a Stripe Atlas incorporation completes, creates a Salesforce lead, provisions the new company's Stripe account, and sends welcome email via SendGrid."
  tags:
    - atlas
    - stripe
    - salesforce
    - sendgrid
capability:
  exposes:
    - type: mcp
      namespace: atlas-ops
      port: 8080
      tools:
        - name: process-atlas-incorporation
          description: "Given a newly incorporated company, create CRM lead, provision account, and send welcome."
          inputParameters:
            - name: company_name
              in: body
              type: string
              description: "The incorporated company name."
            - name: founder_email
              in: body
              type: string
              description: "Founder's email address."
            - name: incorporation_state
              in: body
              type: string
              description: "State of incorporation."
          steps:
            - name: create-lead
              type: call
              call: "salesforce.create-lead"
              with:
                Company: "{{company_name}}"
                Email: "{{founder_email}}"
                LeadSource: "Stripe Atlas"
            - name: send-welcome
              type: call
              call: "sendgrid.send-email"
              with:
                to: "{{founder_email}}"
                subject: "Welcome to Stripe, {{company_name}}!"
                body: "Your {{incorporation_state}} incorporation is complete. Your Stripe account is ready. Lead: {{create-lead.id}}"
  consumes:
    - type: http
      namespace: salesforce
      baseUri: "https://stripe.my.salesforce.com/services/data/v58.0"
      authentication:
        type: bearer
        token: "$secrets.salesforce_token"
      resources:
        - name: leads
          path: "/sobjects/Lead"
          operations:
            - name: create-lead
              method: POST
    - type: http
      namespace: sendgrid
      baseUri: "https://api.sendgrid.com/v3"
      authentication:
        type: bearer
        token: "$secrets.sendgrid_api_key"
      resources:
        - name: mail
          path: "/mail/send"
          operations:
            - name: send-email
              method: POST

Retrieves the current Stripe account balance including available and pending amounts by currency.

naftiko: "0.5"
info:
  label: "Stripe Balance Lookup"
  description: "Retrieves the current Stripe account balance including available and pending amounts by currency."
  tags:
    - finance
    - payments
    - stripe
capability:
  exposes:
    - type: mcp
      namespace: payments
      port: 8080
      tools:
        - name: get-stripe-balance
          description: "Return the current Stripe account balance with available and pending amounts. Use for reconciliation and treasury dashboards."
          inputParameters: []
          call: "stripe-balance.get-balance"
          with: {}
          outputParameters:
            - name: available
              type: array
              mapping: "$.available"
            - name: pending
              type: array
              mapping: "$.pending"
  consumes:
    - type: http
      namespace: stripe-balance
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: balance
          path: "/balance"
          operations:
            - name: get-balance
              method: GET

Queries Snowflake for metered billing usage, reconciles against Stripe meter records, and posts usage summary to the billing ops Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Billing Meter Usage Reporter"
  description: "Queries Snowflake for metered billing usage, reconciles against Stripe meter records, and posts usage summary to the billing ops Slack channel."
  tags:
    - billing
    - stripe
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: billing-ops
      port: 8080
      tools:
        - name: report-meter-usage
          description: "Given a meter ID and period, pull usage data, reconcile, and report."
          inputParameters:
            - name: meter_id
              in: body
              type: string
              description: "The Stripe billing meter ID."
            - name: billing_period
              in: body
              type: string
              description: "The billing period (e.g., 2026-03)."
          steps:
            - name: query-usage
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT customer_id, SUM(quantity) as total_usage FROM billing.meter_events WHERE meter_id='{{meter_id}}' AND period='{{billing_period}}' GROUP BY customer_id ORDER BY total_usage DESC LIMIT 20"
            - name: post-report
              type: call
              call: "slack.post-message"
              with:
                channel: "billing-operations"
                text: "Meter usage report for {{meter_id}} ({{billing_period}}): Top 20 customers:\n{{query-usage.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Creates a Stripe billing portal session for a customer and returns the portal URL, enabling self-service subscription management from the Stripe dashboard or embedded product.

naftiko: "0.5"
info:
  label: "Stripe Billing Portal Session Creation"
  description: "Creates a Stripe billing portal session for a customer and returns the portal URL, enabling self-service subscription management from the Stripe dashboard or embedded product."
  tags:
    - finance
    - stripe
    - billing
    - self-service
capability:
  exposes:
    - type: mcp
      namespace: self-service
      port: 8080
      tools:
        - name: create-billing-portal-session
          description: "Given a Stripe customer ID and return URL, create a billing portal session and return the session URL. Use when a customer requests access to manage their subscription, payment methods, or invoices."
          inputParameters:
            - name: customer_id
              in: body
              type: string
              description: "Stripe customer ID (cus_xxxxx) requesting portal access."
            - name: return_url
              in: body
              type: string
              description: "URL to redirect the customer to after leaving the billing portal."
          call: stripe-portal.create-session
          with:
            customer: "{{customer_id}}"
            return_url: "{{return_url}}"
          outputParameters:
            - name: portal_url
              type: string
              mapping: "$.url"
  consumes:
    - type: http
      namespace: stripe-portal
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: billing-portal-sessions
          path: "/billing_portal/sessions"
          operations:
            - name: create-session
              method: POST

Initiates a full or partial refund on a Stripe charge and notifies the support team in Slack. Triggered by a support escalation or automated dispute workflow.

naftiko: "0.5"
info:
  label: "Stripe Charge Refund"
  description: "Initiates a full or partial refund on a Stripe charge and notifies the support team in Slack. Triggered by a support escalation or automated dispute workflow."
  tags:
    - finance
    - payments
    - stripe
    - refund
    - slack
capability:
  exposes:
    - type: mcp
      namespace: payment-ops
      port: 8080
      tools:
        - name: refund-charge
          description: "Given a Stripe charge ID and optional partial amount, issue a refund and post a Slack notification to the payments-ops channel. Use when a customer refund is approved."
          inputParameters:
            - name: charge_id
              in: body
              type: string
              description: "The Stripe charge ID to refund (format: ch_xxxxx)."
            - name: amount
              in: body
              type: integer
              description: "Amount in cents to refund. Omit for full refund."
            - name: reason
              in: body
              type: string
              description: "Refund reason: duplicate, fraudulent, or requested_by_customer."
          steps:
            - name: issue-refund
              type: call
              call: stripe-refund.create-refund
              with:
                charge: "{{charge_id}}"
                amount: "{{amount}}"
                reason: "{{reason}}"
            - name: notify-slack
              type: call
              call: slack-notify.post-message
              with:
                channel: "payments-ops"
                text: "Refund issued: {{charge_id}} | Amount: {{amount}} cents | Reason: {{reason}} | Refund ID: {{issue-refund.id}}"
  consumes:
    - type: http
      namespace: stripe-refund
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: refunds
          path: "/refunds"
          operations:
            - name: create-refund
              method: POST
    - type: http
      namespace: slack-notify
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Queries Snowflake for checkout conversion funnel data, analyzes drop-off with Anthropic AI, and posts insights to the payments product Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Checkout Conversion Analyzer"
  description: "Queries Snowflake for checkout conversion funnel data, analyzes drop-off with Anthropic AI, and posts insights to the payments product Slack channel."
  tags:
    - analytics
    - snowflake
    - anthropic
    - slack
    - ai
capability:
  exposes:
    - type: mcp
      namespace: checkout-analytics
      port: 8080
      tools:
        - name: analyze-checkout-conversion
          description: "Given a merchant segment, pull funnel data, analyze with AI, and share insights."
          inputParameters:
            - name: merchant_segment
              in: body
              type: string
              description: "Merchant segment (e.g., smb, mid_market, enterprise)."
          steps:
            - name: query-funnel
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT step, count, conversion_rate FROM checkout.funnel_metrics WHERE segment='{{merchant_segment}}' AND date=CURRENT_DATE()-1"
            - name: analyze-dropoff
              type: call
              call: "anthropic.create-message"
              with:
                model: "claude-3-5-sonnet-20241022"
                max_tokens: 800
                messages: "[{\"role\": \"user\", \"content\": \"Analyze this checkout conversion funnel data for {{merchant_segment}} merchants and identify key drop-off points with recommendations:\\n{{query-funnel.data}}\"}]"
            - name: share-insights
              type: call
              call: "slack.post-message"
              with:
                channel: "checkout-product"
                text: "Checkout conversion analysis — {{merchant_segment}}:\n{{analyze-dropoff.content}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: anthropic
      baseUri: "https://api.anthropic.com/v1"
      authentication:
        type: apikey
        key: "x-api-key"
        value: "$secrets.anthropic_api_key"
        placement: header
      resources:
        - name: messages
          path: "/messages"
          operations:
            - name: create-message
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Lists recent Stripe Checkout sessions for a specified product, computes conversion rate and abandonment metrics, and posts an analytics summary to the growth team's Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Checkout Session Analytics"
  description: "Lists recent Stripe Checkout sessions for a specified product, computes conversion rate and abandonment metrics, and posts an analytics summary to the growth team's Slack channel."
  tags:
    - finance
    - stripe
    - analytics
    - growth
    - reporting
capability:
  exposes:
    - type: mcp
      namespace: growth-analytics
      port: 8080
      tools:
        - name: analyze-checkout-sessions
          description: "Fetch recent Stripe Checkout sessions for a date range, compute session counts by status (open, complete, expired), and post a conversion summary to the #growth Slack channel. Use for weekly funnel analysis or A/B test measurement."
          inputParameters:
            - name: start_date
              in: body
              type: string
              description: "Start of the reporting window in YYYY-MM-DD format."
            - name: end_date
              in: body
              type: string
              description: "End of the reporting window in YYYY-MM-DD format."
          steps:
            - name: list-sessions
              type: call
              call: stripe-checkout.list-sessions
              with:
                created_gte: "{{start_date}}"
                created_lte: "{{end_date}}"
                limit: 100
            - name: post-analytics
              type: call
              call: slack-growth.post-message
              with:
                channel: "growth"
                text: "Checkout session analytics {{start_date}} to {{end_date}}: Sessions retrieved {{list-sessions.data}}. Review conversion rates in Stripe dashboard."
  consumes:
    - type: http
      namespace: stripe-checkout
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: checkout-sessions
          path: "/checkout/sessions"
          inputParameters:
            - name: created_gte
              in: query
            - name: created_lte
              in: query
            - name: limit
              in: query
          operations:
            - name: list-sessions
              method: GET
    - type: http
      namespace: slack-growth
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Tracks Stripe Climate carbon removal orders, logs volume in Snowflake, and posts monthly carbon offset summary to the sustainability Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Climate Order Tracker"
  description: "Tracks Stripe Climate carbon removal orders, logs volume in Snowflake, and posts monthly carbon offset summary to the sustainability Slack channel."
  tags:
    - sustainability
    - stripe
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: climate-ops
      port: 8080
      tools:
        - name: track-climate-orders
          description: "Given a month, query climate order data and post summary."
          inputParameters:
            - name: month
              in: body
              type: string
              description: "Month in YYYY-MM format."
          steps:
            - name: query-climate-data
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT SUM(metric_tons) as total_tons, SUM(amount_usd) as total_spend FROM climate.carbon_orders WHERE order_month='{{month}}'"
            - name: post-summary
              type: call
              call: "slack.post-message"
              with:
                channel: "sustainability"
                text: "Stripe Climate report for {{month}}: {{query-climate-data.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Monitors Connect platform account health metrics, creates Jira tickets for accounts with compliance issues, and alerts the platform team via Slack.

naftiko: "0.5"
info:
  label: "Stripe Connect Account Health Monitor"
  description: "Monitors Connect platform account health metrics, creates Jira tickets for accounts with compliance issues, and alerts the platform team via Slack."
  tags:
    - connect
    - stripe
    - jira
    - slack
capability:
  exposes:
    - type: mcp
      namespace: connect-health
      port: 8080
      tools:
        - name: monitor-connect-health
          description: "Given a platform account ID, check compliance status and escalate issues."
          inputParameters:
            - name: platform_id
              in: body
              type: string
              description: "The Connect platform account ID."
            - name: issue_type
              in: body
              type: string
              description: "Type of compliance issue."
          steps:
            - name: create-compliance-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "CONNECT"
                issuetype: "Task"
                summary: "Connect compliance: {{platform_id}} — {{issue_type}}"
            - name: alert-platform-team
              type: call
              call: "slack.post-message"
              with:
                channel: "connect-platform-ops"
                text: "Connect compliance issue: Platform {{platform_id}} — {{issue_type}}. Ticket: {{create-compliance-ticket.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Creates a Stripe Connect account for a new marketplace seller, generates an onboarding link, and records the account in Salesforce. Used during partner or platform merchant activation.

naftiko: "0.5"
info:
  label: "Stripe Connect Account Onboarding"
  description: "Creates a Stripe Connect account for a new marketplace seller, generates an onboarding link, and records the account in Salesforce. Used during partner or platform merchant activation."
  tags:
    - finance
    - payments
    - stripe
    - salesforce
    - connect
    - onboarding
capability:
  exposes:
    - type: mcp
      namespace: connect-ops
      port: 8080
      tools:
        - name: onboard-connect-account
          description: "Given a seller email and business type, create a Stripe Connect Express account, generate an account link for KYC onboarding, and upsert the Salesforce partner record with the Stripe account ID. Invoke during marketplace seller registration."
          inputParameters:
            - name: seller_email
              in: body
              type: string
              description: "Primary email address for the marketplace seller."
            - name: business_type
              in: body
              type: string
              description: "Stripe business type: individual or company."
            - name: salesforce_account_id
              in: body
              type: string
              description: "Salesforce Account ID to update with the Stripe Connect ID."
          steps:
            - name: create-connect-account
              type: call
              call: stripe-connect.create-account
              with:
                type: "express"
                email: "{{seller_email}}"
                business_type: "{{business_type}}"
            - name: create-account-link
              type: call
              call: stripe-connect-links.create-link
              with:
                account: "{{create-connect-account.id}}"
                refresh_url: "https://dashboard.stripe.com/connect/accounts"
                return_url: "https://dashboard.stripe.com/connect/accounts"
                type: "account_onboarding"
            - name: update-sf-partner
              type: call
              call: salesforce-connect.update-account
              with:
                account_id: "{{salesforce_account_id}}"
                Stripe_Connect_ID__c: "{{create-connect-account.id}}"
  consumes:
    - type: http
      namespace: stripe-connect
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: connect-accounts
          path: "/accounts"
          operations:
            - name: create-account
              method: POST
    - type: http
      namespace: stripe-connect-links
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: account-links
          path: "/account_links"
          operations:
            - name: create-link
              method: POST
    - type: http
      namespace: salesforce-connect
      baseUri: "https://stripe.my.salesforce.com/services/data/v58.0"
      authentication:
        type: bearer
        token: "$secrets.salesforce_access_token"
      resources:
        - name: account-record
          path: "/sobjects/Account/{{account_id}}"
          inputParameters:
            - name: account_id
              in: path
          operations:
            - name: update-account
              method: PATCH

Queries Snowflake for Connect platform fees, reconciles against Stripe records, and posts a daily fee summary to the finance Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Connect Fee Reconciliation"
  description: "Queries Snowflake for Connect platform fees, reconciles against Stripe records, and posts a daily fee summary to the finance Slack channel."
  tags:
    - finance
    - stripe
    - connect
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: connect-finance
      port: 8080
      tools:
        - name: reconcile-connect-fees
          description: "Given a date, pull Connect fee data and share reconciliation."
          inputParameters:
            - name: reconciliation_date
              in: body
              type: string
              description: "Date YYYY-MM-DD."
          steps:
            - name: query-fees
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT platform_id, SUM(application_fee) as total_fees, COUNT(*) as txns FROM connect.application_fees WHERE fee_date='{{reconciliation_date}}' GROUP BY platform_id ORDER BY total_fees DESC LIMIT 10"
            - name: post-reconciliation
              type: call
              call: "slack.post-message"
              with:
                channel: "connect-finance"
                text: "Connect fee reconciliation for {{reconciliation_date}}:\n{{query-fees.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a Connect account's KYC verification fails, retrieves account requirements, creates a Jira compliance ticket, and notifies the partner via SendGrid.

naftiko: "0.5"
info:
  label: "Stripe Connect KYC Verification Flow"
  description: "When a Connect account's KYC verification fails, retrieves account requirements, creates a Jira compliance ticket, and notifies the partner via SendGrid."
  tags:
    - compliance
    - stripe
    - connect
    - jira
    - sendgrid
capability:
  exposes:
    - type: mcp
      namespace: connect-compliance
      port: 8080
      tools:
        - name: handle-kyc-failure
          description: "Given a Connect account ID, retrieve verification requirements, create a compliance ticket, and notify the partner."
          inputParameters:
            - name: account_id
              in: body
              type: string
              description: "The Stripe Connect account ID."
            - name: partner_email
              in: body
              type: string
              description: "Partner's email address."
          steps:
            - name: get-account
              type: call
              call: "stripe-connect.get-account"
              with:
                account_id: "{{account_id}}"
            - name: create-compliance-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "COMPLY"
                issuetype: "Task"
                summary: "KYC failure: Connect account {{account_id}}"
                description: "Requirements: {{get-account.requirements.currently_due}}"
            - name: notify-partner
              type: call
              call: "sendgrid.send-email"
              with:
                to: "{{partner_email}}"
                subject: "Action required: Complete your Stripe verification"
                body: "Your account {{account_id}} requires additional verification. Please complete the following: {{get-account.requirements.currently_due}}"
  consumes:
    - type: http
      namespace: stripe-connect
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: accounts
          path: "/accounts/{{account_id}}"
          inputParameters:
            - name: account_id
              in: path
          operations:
            - name: get-account
              method: GET
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: sendgrid
      baseUri: "https://api.sendgrid.com/v3"
      authentication:
        type: bearer
        token: "$secrets.sendgrid_api_key"
      resources:
        - name: mail
          path: "/mail/send"
          operations:
            - name: send-email
              method: POST

When a Connect payout fails, retrieves failure reason, creates a Jira support ticket, and notifies the Connect operations team via Slack.

naftiko: "0.5"
info:
  label: "Stripe Connect Payout Failure Handler"
  description: "When a Connect payout fails, retrieves failure reason, creates a Jira support ticket, and notifies the Connect operations team via Slack."
  tags:
    - payments
    - stripe
    - connect
    - jira
    - slack
capability:
  exposes:
    - type: mcp
      namespace: connect-ops
      port: 8080
      tools:
        - name: handle-payout-failure
          description: "Given a failed payout ID and account, create support ticket and notify ops."
          inputParameters:
            - name: payout_id
              in: body
              type: string
              description: "The failed payout ID."
            - name: account_id
              in: body
              type: string
              description: "The Connect account ID."
            - name: failure_code
              in: body
              type: string
              description: "The payout failure code."
          steps:
            - name: create-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "CONNECT"
                issuetype: "Bug"
                summary: "Payout failure: {{account_id}} — {{failure_code}}"
                description: "Payout {{payout_id}} failed with code {{failure_code}}."
            - name: notify-ops
              type: call
              call: "slack.post-message"
              with:
                channel: "connect-operations"
                text: "Payout failure: Account {{account_id}}, Payout {{payout_id}}, Code: {{failure_code}}. Ticket: {{create-ticket.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Creates a Stripe coupon and promotion code for a marketing campaign and logs the creation in Salesforce for CRM-level campaign tracking.

naftiko: "0.5"
info:
  label: "Stripe Coupon and Promotion Management"
  description: "Creates a Stripe coupon and promotion code for a marketing campaign and logs the creation in Salesforce for CRM-level campaign tracking."
  tags:
    - finance
    - stripe
    - salesforce
    - marketing
    - promotions
capability:
  exposes:
    - type: mcp
      namespace: promotions-ops
      port: 8080
      tools:
        - name: create-promotion
          description: "Given a discount percentage, duration, and campaign name, create a Stripe coupon, generate a promotion code, and log the promotion in Salesforce as a campaign activity. Use when launching a new customer acquisition or retention promotion."
          inputParameters:
            - name: percent_off
              in: body
              type: number
              description: "Discount percentage for the coupon (e.g. 20 for 20% off)."
            - name: duration
              in: body
              type: string
              description: "Stripe coupon duration: once, repeating, or forever."
            - name: campaign_name
              in: body
              type: string
              description: "Internal campaign name for tracking in Salesforce."
            - name: promo_code
              in: body
              type: string
              description: "Human-readable promotion code string (e.g. SAVE20)."
          steps:
            - name: create-coupon
              type: call
              call: stripe-coupons.create-coupon
              with:
                percent_off: "{{percent_off}}"
                duration: "{{duration}}"
                name: "{{campaign_name}}"
            - name: create-promo-code
              type: call
              call: stripe-promo-codes.create-code
              with:
                coupon: "{{create-coupon.id}}"
                code: "{{promo_code}}"
            - name: log-campaign
              type: call
              call: salesforce-campaigns.create-campaign
              with:
                Name: "{{campaign_name}}"
                Stripe_Coupon_ID__c: "{{create-coupon.id}}"
                Promo_Code__c: "{{promo_code}}"
  consumes:
    - type: http
      namespace: stripe-coupons
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: coupons
          path: "/coupons"
          operations:
            - name: create-coupon
              method: POST
    - type: http
      namespace: stripe-promo-codes
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: promotion-codes
          path: "/promotion_codes"
          operations:
            - name: create-code
              method: POST
    - type: http
      namespace: salesforce-campaigns
      baseUri: "https://stripe.my.salesforce.com/services/data/v58.0"
      authentication:
        type: bearer
        token: "$secrets.salesforce_access_token"
      resources:
        - name: campaigns
          path: "/sobjects/Campaign"
          operations:
            - name: create-campaign
              method: POST

Analyzes cross-border payment success rates from Snowflake, identifies routing optimizations, and posts recommendations to the payments infrastructure Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Cross-Border Payment Optimizer"
  description: "Analyzes cross-border payment success rates from Snowflake, identifies routing optimizations, and posts recommendations to the payments infrastructure Slack channel."
  tags:
    - payments
    - international
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: payments-infra
      port: 8080
      tools:
        - name: optimize-cross-border
          description: "Given a corridor, analyze success rates and post optimization recommendations."
          inputParameters:
            - name: source_country
              in: body
              type: string
              description: "Source country code."
            - name: destination_country
              in: body
              type: string
              description: "Destination country code."
          steps:
            - name: query-corridor-data
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT payment_method, success_rate, avg_latency_ms, volume FROM payments.cross_border_corridors WHERE source='{{source_country}}' AND destination='{{destination_country}}' ORDER BY success_rate DESC"
            - name: post-recommendations
              type: call
              call: "slack.post-message"
              with:
                channel: "payments-infrastructure"
                text: "Cross-border corridor {{source_country}} -> {{destination_country}}:\n{{query-corridor-data.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a customer cancels their subscription, cancels the Stripe subscription at period end, logs a churn event in Salesforce, and notifies the customer success team in Slack.

naftiko: "0.5"
info:
  label: "Stripe Customer Cancellation Workflow"
  description: "When a customer cancels their subscription, cancels the Stripe subscription at period end, logs a churn event in Salesforce, and notifies the customer success team in Slack."
  tags:
    - finance
    - stripe
    - salesforce
    - slack
    - churn
    - customer-success
capability:
  exposes:
    - type: mcp
      namespace: churn-ops
      port: 8080
      tools:
        - name: handle-cancellation
          description: "Given a Stripe subscription ID and Salesforce account ID, set the subscription to cancel at period end, update the Salesforce account stage to Churned, and notify #customer-success in Slack. Use when a customer cancellation request is confirmed."
          inputParameters:
            - name: subscription_id
              in: body
              type: string
              description: "Stripe subscription ID (sub_xxxxx) to cancel."
            - name: salesforce_account_id
              in: body
              type: string
              description: "Salesforce account ID to mark as churned."
          steps:
            - name: cancel-subscription
              type: call
              call: stripe-cancel.update-subscription
              with:
                subscription_id: "{{subscription_id}}"
                cancel_at_period_end: "true"
            - name: update-sf-stage
              type: call
              call: salesforce-churn.update-account
              with:
                account_id: "{{salesforce_account_id}}"
                CustomerStage__c: "Churned"
                ChurnDate__c: "{{cancel-subscription.current_period_end}}"
            - name: notify-cs-team
              type: call
              call: slack-cs.post-message
              with:
                channel: "customer-success"
                text: "Cancellation received: Subscription {{subscription_id}} set to cancel at period end. Salesforce account {{salesforce_account_id}} updated to Churned."
  consumes:
    - type: http
      namespace: stripe-cancel
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: subscription-update
          path: "/subscriptions/{{subscription_id}}"
          inputParameters:
            - name: subscription_id
              in: path
          operations:
            - name: update-subscription
              method: POST
    - type: http
      namespace: salesforce-churn
      baseUri: "https://stripe.my.salesforce.com/services/data/v58.0"
      authentication:
        type: bearer
        token: "$secrets.salesforce_access_token"
      resources:
        - name: account-churn
          path: "/sobjects/Account/{{account_id}}"
          inputParameters:
            - name: account_id
              in: path
          operations:
            - name: update-account
              method: PATCH
    - type: http
      namespace: slack-cs
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Retrieves a Stripe customer record by ID including email, subscription status, and payment methods.

naftiko: "0.5"
info:
  label: "Stripe Customer Lookup"
  description: "Retrieves a Stripe customer record by ID including email, subscription status, and payment methods."
  tags:
    - finance
    - payments
    - stripe
capability:
  exposes:
    - type: mcp
      namespace: payments
      port: 8080
      tools:
        - name: get-stripe-customer
          description: "Given a Stripe customer ID, return their profile, email, and default payment method. Use for support triage."
          inputParameters:
            - name: customer_id
              in: body
              type: string
              description: "The Stripe customer ID (format: cus_xxxxx)."
          call: "stripe-customers.get-customer"
          with:
            id: "{{customer_id}}"
          outputParameters:
            - name: email
              type: string
              mapping: "$.email"
            - name: name
              type: string
              mapping: "$.name"
            - name: default_source
              type: string
              mapping: "$.default_source"
  consumes:
    - type: http
      namespace: stripe-customers
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: customers
          path: "/customers/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-customer
              method: GET

When a new business customer is approved, creates a Stripe customer record, attaches a default payment method, and provisions a Salesforce account. Spans Stripe and Salesforce.

naftiko: "0.5"
info:
  label: "Stripe Customer Onboarding"
  description: "When a new business customer is approved, creates a Stripe customer record, attaches a default payment method, and provisions a Salesforce account. Spans Stripe and Salesforce."
  tags:
    - finance
    - payments
    - stripe
    - salesforce
    - onboarding
    - crm
capability:
  exposes:
    - type: mcp
      namespace: customer-onboarding
      port: 8080
      tools:
        - name: onboard-business-customer
          description: "Given a business name, email, and payment method token, create a Stripe customer, attach the payment method, then create or update the matching Salesforce account. Use during B2B customer activation."
          inputParameters:
            - name: business_name
              in: body
              type: string
              description: "Legal business name for the new customer."
            - name: email
              in: body
              type: string
              description: "Primary billing email address."
            - name: payment_method_id
              in: body
              type: string
              description: "Stripe payment method ID (pm_xxxxx) to attach as default."
          steps:
            - name: create-customer
              type: call
              call: stripe-customers.create-customer
              with:
                name: "{{business_name}}"
                email: "{{email}}"
            - name: attach-payment
              type: call
              call: stripe-payment-methods.attach-method
              with:
                payment_method_id: "{{payment_method_id}}"
                customer: "{{create-customer.id}}"
            - name: create-sf-account
              type: call
              call: salesforce-accounts.create-account
              with:
                Name: "{{business_name}}"
                Stripe_Customer_ID__c: "{{create-customer.id}}"
                BillingEmail: "{{email}}"
  consumes:
    - type: http
      namespace: stripe-customers
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: customers
          path: "/customers"
          operations:
            - name: create-customer
              method: POST
    - type: http
      namespace: stripe-payment-methods
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: payment-method-attach
          path: "/payment_methods/{{payment_method_id}}/attach"
          inputParameters:
            - name: payment_method_id
              in: path
          operations:
            - name: attach-method
              method: POST
    - type: http
      namespace: salesforce-accounts
      baseUri: "https://stripe.my.salesforce.com/services/data/v58.0"
      authentication:
        type: bearer
        token: "$secrets.salesforce_access_token"
      resources:
        - name: accounts
          path: "/sobjects/Account"
          operations:
            - name: create-account
              method: POST

When a Snowflake data pipeline fails, creates a PagerDuty incident, opens a Jira ticket, and alerts the data engineering Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Data Pipeline Failure Alert"
  description: "When a Snowflake data pipeline fails, creates a PagerDuty incident, opens a Jira ticket, and alerts the data engineering Slack channel."
  tags:
    - data-engineering
    - snowflake
    - pagerduty
    - jira
    - slack
capability:
  exposes:
    - type: mcp
      namespace: data-ops
      port: 8080
      tools:
        - name: handle-pipeline-failure
          description: "Given a pipeline name and error, page on-call, create ticket, and alert."
          inputParameters:
            - name: pipeline_name
              in: body
              type: string
              description: "Failed pipeline name."
            - name: error_message
              in: body
              type: string
              description: "Error message."
          steps:
            - name: page-data-oncall
              type: call
              call: "pagerduty.create-incident"
              with:
                title: "Pipeline failure: {{pipeline_name}}"
                service_id: "DATA_ENG"
            - name: create-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "DATA"
                issuetype: "Bug"
                summary: "Pipeline failure: {{pipeline_name}}"
                description: "Error: {{error_message}}"
            - name: alert-data-eng
              type: call
              call: "slack.post-message"
              with:
                channel: "data-engineering"
                text: "Pipeline failure: {{pipeline_name}}. Error: {{error_message}}. PD: {{page-data-oncall.incident.id}}. Jira: {{create-ticket.key}}"
  consumes:
    - type: http
      namespace: pagerduty
      baseUri: "https://api.pagerduty.com"
      authentication:
        type: apikey
        key: "Authorization"
        value: "$secrets.pagerduty_token"
        placement: header
      resources:
        - name: incidents
          path: "/incidents"
          operations:
            - name: create-incident
              method: POST
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Collects developer documentation feedback, creates Jira improvement tickets, and posts weekly feedback digest to the docs team Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Developer Docs Feedback Pipeline"
  description: "Collects developer documentation feedback, creates Jira improvement tickets, and posts weekly feedback digest to the docs team Slack channel."
  tags:
    - documentation
    - jira
    - slack
    - developer-experience
capability:
  exposes:
    - type: mcp
      namespace: docs-ops
      port: 8080
      tools:
        - name: process-docs-feedback
          description: "Given feedback details, create improvement tickets and notify the docs team."
          inputParameters:
            - name: page_url
              in: body
              type: string
              description: "Documentation page URL."
            - name: feedback_type
              in: body
              type: string
              description: "Type: unclear, outdated, missing_example, error."
            - name: feedback_text
              in: body
              type: string
              description: "Feedback text."
          steps:
            - name: create-improvement-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "DOCS"
                issuetype: "Task"
                summary: "Docs feedback ({{feedback_type}}): {{page_url}}"
                description: "{{feedback_text}}"
            - name: notify-docs-team
              type: call
              call: "slack.post-message"
              with:
                channel: "docs-team"
                text: "New docs feedback ({{feedback_type}}): {{page_url}}. Ticket: {{create-improvement-ticket.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a chargeback dispute is opened on Stripe, gathers transaction metadata and automatically submits evidence to contest the dispute. Reduces manual risk team workload.

naftiko: "0.5"
info:
  label: "Stripe Dispute Evidence Submission"
  description: "When a chargeback dispute is opened on Stripe, gathers transaction metadata and automatically submits evidence to contest the dispute. Reduces manual risk team workload."
  tags:
    - finance
    - payments
    - stripe
    - disputes
    - risk
capability:
  exposes:
    - type: mcp
      namespace: risk-ops
      port: 8080
      tools:
        - name: submit-dispute-evidence
          description: "Given a Stripe dispute ID, retrieve the associated charge, build an evidence payload from transaction metadata, and submit it to Stripe dispute evidence API. Use when responding to stripe.charge.dispute.created events."
          inputParameters:
            - name: dispute_id
              in: body
              type: string
              description: "Stripe dispute ID (dp_xxxxx) to contest."
            - name: customer_email_evidence
              in: body
              type: string
              description: "Customer communication evidence text to include."
            - name: service_date
              in: body
              type: string
              description: "Date of service or product delivery (YYYY-MM-DD)."
          steps:
            - name: get-dispute
              type: call
              call: stripe-disputes.get-dispute
              with:
                id: "{{dispute_id}}"
            - name: submit-evidence
              type: call
              call: stripe-dispute-evidence.update-evidence
              with:
                id: "{{dispute_id}}"
                customer_email_address: "{{customer_email_evidence}}"
                service_date: "{{service_date}}"
                billing_address: "{{get-dispute.charge}}"
  consumes:
    - type: http
      namespace: stripe-disputes
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: disputes
          path: "/disputes/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-dispute
              method: GET
    - type: http
      namespace: stripe-dispute-evidence
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: dispute-evidence
          path: "/disputes/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: update-evidence
              method: POST

Retrieves details of a Stripe dispute by ID including reason, amount, and evidence deadline.

naftiko: "0.5"
info:
  label: "Stripe Dispute Lookup"
  description: "Retrieves details of a Stripe dispute by ID including reason, amount, and evidence deadline."
  tags:
    - finance
    - payments
    - stripe
    - disputes
capability:
  exposes:
    - type: mcp
      namespace: disputes
      port: 8080
      tools:
        - name: get-dispute
          description: "Given a Stripe dispute ID, return its status, reason, amount, and evidence due date."
          inputParameters:
            - name: dispute_id
              in: body
              type: string
              description: "The Stripe dispute ID (format: dp_xxxxx)."
          call: "stripe-disputes.get-dispute"
          with:
            id: "{{dispute_id}}"
          outputParameters:
            - name: status
              type: string
              mapping: "$.status"
            - name: reason
              type: string
              mapping: "$.reason"
            - name: amount
              type: number
              mapping: "$.amount"
  consumes:
    - type: http
      namespace: stripe-disputes
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: disputes
          path: "/disputes/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-dispute
              method: GET

Queries dispute outcome data from Snowflake and posts a monthly win rate analysis to the risk operations Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Dispute Win Rate Tracker"
  description: "Queries dispute outcome data from Snowflake and posts a monthly win rate analysis to the risk operations Slack channel."
  tags:
    - disputes
    - snowflake
    - slack
    - analytics
capability:
  exposes:
    - type: mcp
      namespace: dispute-analytics
      port: 8080
      tools:
        - name: track-dispute-win-rate
          description: "Given a month, pull dispute outcomes and share analysis."
          inputParameters:
            - name: month
              in: body
              type: string
              description: "Month in YYYY-MM format."
          steps:
            - name: query-outcomes
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT reason, COUNT(*) as total, SUM(CASE WHEN outcome='won' THEN 1 ELSE 0 END) as won, ROUND(SUM(CASE WHEN outcome='won' THEN 1 ELSE 0 END)*100.0/COUNT(*),1) as win_rate FROM disputes.outcomes WHERE month='{{month}}' GROUP BY reason"
            - name: post-analysis
              type: call
              call: "slack.post-message"
              with:
                channel: "risk-operations"
                text: "Dispute win rates for {{month}}:\n{{query-outcomes.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Tracks adoption of Stripe embedded UI components, queries Snowflake for usage metrics, and posts a weekly adoption report to the product Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Embedded Components Adoption Tracker"
  description: "Tracks adoption of Stripe embedded UI components, queries Snowflake for usage metrics, and posts a weekly adoption report to the product Slack channel."
  tags:
    - product
    - stripe
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: embedded-ops
      port: 8080
      tools:
        - name: track-embedded-adoption
          description: "Given a component name, pull usage data and post adoption report."
          inputParameters:
            - name: component_name
              in: body
              type: string
              description: "Embedded component name (e.g., PaymentElement, ExpressCheckout)."
          steps:
            - name: query-adoption
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT week, merchant_count, integration_count, volume FROM product.embedded_adoption WHERE component='{{component_name}}' ORDER BY week DESC LIMIT 4"
            - name: post-report
              type: call
              call: "slack.post-message"
              with:
                channel: "embedded-product"
                text: "{{component_name}} adoption (last 4 weeks):\n{{query-adoption.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Retrieves a Stripe event by ID including type, data, and timestamp.

naftiko: "0.5"
info:
  label: "Stripe Event Lookup"
  description: "Retrieves a Stripe event by ID including type, data, and timestamp."
  tags:
    - integrations
    - stripe
capability:
  exposes:
    - type: mcp
      namespace: events
      port: 8080
      tools:
        - name: get-event
          description: "Given a Stripe event ID, return its type, data object, and creation time."
          inputParameters:
            - name: event_id
              in: body
              type: string
              description: "The Stripe event ID."
          call: "stripe-events.get-event"
          with:
            id: "{{event_id}}"
          outputParameters:
            - name: type
              type: string
              mapping: "$.type"
            - name: created
              type: number
              mapping: "$.created"
  consumes:
    - type: http
      namespace: stripe-events
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: events
          path: "/events/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-event
              method: GET

When a Financial Connections account link is established, logs the connection in Snowflake, updates Salesforce, and notifies the partnerships team via Slack.

naftiko: "0.5"
info:
  label: "Stripe Financial Connections Sync"
  description: "When a Financial Connections account link is established, logs the connection in Snowflake, updates Salesforce, and notifies the partnerships team via Slack."
  tags:
    - financial-services
    - stripe
    - snowflake
    - salesforce
    - slack
capability:
  exposes:
    - type: mcp
      namespace: finconn-ops
      port: 8080
      tools:
        - name: sync-financial-connection
          description: "Given a Financial Connections session, log the link, update CRM, and notify team."
          inputParameters:
            - name: session_id
              in: body
              type: string
              description: "Financial Connections session ID."
            - name: institution_name
              in: body
              type: string
              description: "Connected financial institution name."
            - name: merchant_id
              in: body
              type: string
              description: "The merchant account ID."
          steps:
            - name: log-connection
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "INSERT INTO finconn.linked_accounts (session_id, institution, merchant_id, linked_at) VALUES ('{{session_id}}', '{{institution_name}}', '{{merchant_id}}', CURRENT_TIMESTAMP())"
            - name: notify-partnerships
              type: call
              call: "slack.post-message"
              with:
                channel: "financial-partnerships"
                text: "New Financial Connection: {{institution_name}} linked for merchant {{merchant_id}}."
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When Stripe Radar flags a high-risk payment, looks up the customer profile, creates a Jira security ticket, and notifies the fraud team in Slack for manual review.

naftiko: "0.5"
info:
  label: "Stripe Fraud Alert Triage"
  description: "When Stripe Radar flags a high-risk payment, looks up the customer profile, creates a Jira security ticket, and notifies the fraud team in Slack for manual review."
  tags:
    - finance
    - payments
    - stripe
    - jira
    - slack
    - fraud
    - risk
capability:
  exposes:
    - type: mcp
      namespace: fraud-ops
      port: 8080
      tools:
        - name: triage-fraud-alert
          description: "Given a Stripe payment intent ID flagged by Radar, retrieve the full charge and customer details, open a Jira fraud-review ticket, and alert the #fraud-ops Slack channel with context for manual review."
          inputParameters:
            - name: payment_intent_id
              in: body
              type: string
              description: "Stripe payment intent ID flagged by Radar (pi_xxxxx)."
            - name: radar_score
              in: body
              type: number
              description: "Stripe Radar risk score (0-100) attached to the payment."
          steps:
            - name: get-charge-details
              type: call
              call: stripe-fraud.get-payment-intent
              with:
                id: "{{payment_intent_id}}"
            - name: create-fraud-ticket
              type: call
              call: jira-fraud.create-issue
              with:
                project_key: "FRAUD"
                issuetype: "Task"
                summary: "Radar fraud alert: {{payment_intent_id}} score {{radar_score}}"
                description: "Payment intent {{payment_intent_id}} flagged with Radar score {{radar_score}}. Amount: {{get-charge-details.amount}}. Customer: {{get-charge-details.customer}}"
            - name: notify-fraud-team
              type: call
              call: slack-fraud.post-message
              with:
                channel: "fraud-ops"
                text: "Fraud Alert: {{payment_intent_id}} | Radar Score: {{radar_score}} | Jira: {{create-fraud-ticket.key}} | Requires manual review"
  consumes:
    - type: http
      namespace: stripe-fraud
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: payment-intents
          path: "/payment_intents/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-payment-intent
              method: GET
    - type: http
      namespace: jira-fraud
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack-fraud
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a Stripe Identity verification session completes, updates Salesforce contact record, logs in Snowflake, and notifies compliance team via Slack.

naftiko: "0.5"
info:
  label: "Stripe Identity Verification Handler"
  description: "When a Stripe Identity verification session completes, updates Salesforce contact record, logs in Snowflake, and notifies compliance team via Slack."
  tags:
    - compliance
    - stripe
    - salesforce
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: identity-ops
      port: 8080
      tools:
        - name: handle-verification-result
          description: "Given a verification session ID and result, update CRM, log for audit, and notify compliance."
          inputParameters:
            - name: session_id
              in: body
              type: string
              description: "Stripe Identity verification session ID."
            - name: result
              in: body
              type: string
              description: "Verification result: verified, unverified, or requires_input."
            - name: customer_id
              in: body
              type: string
              description: "Salesforce contact ID."
          steps:
            - name: update-crm
              type: call
              call: "salesforce.update-contact"
              with:
                contact_id: "{{customer_id}}"
                Identity_Verified__c: "{{result}}"
            - name: log-verification
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "INSERT INTO compliance.identity_verifications (session_id, result, customer_id, verified_at) VALUES ('{{session_id}}', '{{result}}', '{{customer_id}}', CURRENT_TIMESTAMP())"
            - name: notify-compliance
              type: call
              call: "slack.post-message"
              with:
                channel: "compliance-verifications"
                text: "Identity verification {{result}}: Session {{session_id}} for customer {{customer_id}}"
  consumes:
    - type: http
      namespace: salesforce
      baseUri: "https://stripe.my.salesforce.com/services/data/v58.0"
      authentication:
        type: bearer
        token: "$secrets.salesforce_token"
      resources:
        - name: contacts
          path: "/sobjects/Contact/{{contact_id}}"
          inputParameters:
            - name: contact_id
              in: path
          operations:
            - name: update-contact
              method: PATCH
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When launching in a new country, creates a Jira expansion epic, documents regulatory requirements in Confluence, and notifies the international team via Slack.

naftiko: "0.5"
info:
  label: "Stripe International Expansion Tracker"
  description: "When launching in a new country, creates a Jira expansion epic, documents regulatory requirements in Confluence, and notifies the international team via Slack."
  tags:
    - international
    - jira
    - confluence
    - slack
capability:
  exposes:
    - type: mcp
      namespace: intl-ops
      port: 8080
      tools:
        - name: track-country-launch
          description: "Given a country and launch details, create tracking epic, document requirements, and notify team."
          inputParameters:
            - name: country
              in: body
              type: string
              description: "Country name."
            - name: launch_date
              in: body
              type: string
              description: "Target launch date."
            - name: payment_methods
              in: body
              type: string
              description: "Supported payment methods."
          steps:
            - name: create-expansion-epic
              type: call
              call: "jira.create-issue"
              with:
                project_key: "INTL"
                issuetype: "Epic"
                summary: "Country launch: {{country}} — target {{launch_date}}"
            - name: create-requirements-doc
              type: call
              call: "confluence.create-page"
              with:
                spaceKey: "INTL"
                title: "Launch: {{country}}"
                body: "Target date: {{launch_date}}\nPayment methods: {{payment_methods}}\nEpic: {{create-expansion-epic.key}}"
            - name: notify-intl-team
              type: call
              call: "slack.post-message"
              with:
                channel: "international-expansion"
                text: "Country launch: {{country}} targeting {{launch_date}}. Methods: {{payment_methods}}. Epic: {{create-expansion-epic.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: confluence
      baseUri: "https://stripe.atlassian.net/wiki/rest/api"
      authentication:
        type: basic
        username: "$secrets.confluence_user"
        password: "$secrets.confluence_api_token"
      resources:
        - name: pages
          path: "/content"
          operations:
            - name: create-page
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Creates a Stripe invoice for a customer, adds line items, finalizes it, and sends it via email. Used by the billing team or automated billing agents at the end of a billing cycle.

naftiko: "0.5"
info:
  label: "Stripe Invoice Generation and Delivery"
  description: "Creates a Stripe invoice for a customer, adds line items, finalizes it, and sends it via email. Used by the billing team or automated billing agents at the end of a billing cycle."
  tags:
    - finance
    - stripe
    - billing
    - invoicing
capability:
  exposes:
    - type: mcp
      namespace: invoicing
      port: 8080
      tools:
        - name: generate-and-send-invoice
          description: "Given a Stripe customer ID, price ID, and quantity, create a draft invoice, add the line item, finalize the invoice, and trigger email delivery to the customer. Use at billing cycle close or for one-off manual billing."
          inputParameters:
            - name: customer_id
              in: body
              type: string
              description: "Stripe customer ID (cus_xxxxx) to invoice."
            - name: price_id
              in: body
              type: string
              description: "Stripe price ID (price_xxxxx) to add as line item."
            - name: quantity
              in: body
              type: integer
              description: "Quantity of the price units to invoice."
          steps:
            - name: create-invoice
              type: call
              call: stripe-invoice-create.create-invoice
              with:
                customer: "{{customer_id}}"
            - name: add-line-item
              type: call
              call: stripe-invoice-items.create-invoice-item
              with:
                customer: "{{customer_id}}"
                invoice: "{{create-invoice.id}}"
                price: "{{price_id}}"
                quantity: "{{quantity}}"
            - name: finalize-invoice
              type: call
              call: stripe-invoice-finalize.finalize-invoice
              with:
                invoice_id: "{{create-invoice.id}}"
            - name: send-invoice
              type: call
              call: stripe-invoice-send.send-invoice
              with:
                invoice_id: "{{create-invoice.id}}"
  consumes:
    - type: http
      namespace: stripe-invoice-create
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: invoices
          path: "/invoices"
          operations:
            - name: create-invoice
              method: POST
    - type: http
      namespace: stripe-invoice-items
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: invoice-items
          path: "/invoiceitems"
          operations:
            - name: create-invoice-item
              method: POST
    - type: http
      namespace: stripe-invoice-finalize
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: invoice-finalize
          path: "/invoices/{{invoice_id}}/finalize"
          inputParameters:
            - name: invoice_id
              in: path
          operations:
            - name: finalize-invoice
              method: POST
    - type: http
      namespace: stripe-invoice-send
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: invoice-send
          path: "/invoices/{{invoice_id}}/send"
          inputParameters:
            - name: invoice_id
              in: path
          operations:
            - name: send-invoice
              method: POST

Retrieves a Stripe invoice by ID including line items, amount due, and payment status.

naftiko: "0.5"
info:
  label: "Stripe Invoice Lookup"
  description: "Retrieves a Stripe invoice by ID including line items, amount due, and payment status."
  tags:
    - finance
    - payments
    - stripe
    - billing
capability:
  exposes:
    - type: mcp
      namespace: billing
      port: 8080
      tools:
        - name: get-invoice
          description: "Given a Stripe invoice ID, return its status, amount due, and line items."
          inputParameters:
            - name: invoice_id
              in: body
              type: string
              description: "The Stripe invoice ID (format: in_xxxxx)."
          call: "stripe-invoices.get-invoice"
          with:
            id: "{{invoice_id}}"
          outputParameters:
            - name: status
              type: string
              mapping: "$.status"
            - name: amount_due
              type: number
              mapping: "$.amount_due"
            - name: currency
              type: string
              mapping: "$.currency"
  consumes:
    - type: http
      namespace: stripe-invoices
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: invoices
          path: "/invoices/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-invoice
              method: GET

When a Stripe Issuing card fraud alert is triggered, freezes the card, creates a Jira investigation ticket, and notifies the fraud team via Slack.

naftiko: "0.5"
info:
  label: "Stripe Issuing Card Fraud Alert"
  description: "When a Stripe Issuing card fraud alert is triggered, freezes the card, creates a Jira investigation ticket, and notifies the fraud team via Slack."
  tags:
    - fraud
    - stripe
    - issuing
    - jira
    - slack
capability:
  exposes:
    - type: mcp
      namespace: issuing-fraud
      port: 8080
      tools:
        - name: handle-card-fraud
          description: "Given a card ID and fraud details, freeze the card, create investigation ticket, and alert fraud team."
          inputParameters:
            - name: card_id
              in: body
              type: string
              description: "The Stripe Issuing card ID."
            - name: fraud_type
              in: body
              type: string
              description: "Type of fraud detected."
            - name: transaction_id
              in: body
              type: string
              description: "The suspicious transaction ID."
          steps:
            - name: create-investigation
              type: call
              call: "jira.create-issue"
              with:
                project_key: "FRAUD"
                issuetype: "Bug"
                summary: "Issuing fraud: Card {{card_id}} — {{fraud_type}}"
                description: "Transaction: {{transaction_id}}"
                priority: "High"
            - name: alert-fraud-team
              type: call
              call: "slack.post-message"
              with:
                channel: "issuing-fraud-alerts"
                text: "Card fraud alert: {{card_id}} — {{fraud_type}}. Transaction: {{transaction_id}}. Ticket: {{create-investigation.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a corporate card spend limit is breached, creates a Jira ticket for the finance team and alerts the cardholder's manager via Slack.

naftiko: "0.5"
info:
  label: "Stripe Issuing Spend Controls Manager"
  description: "When a corporate card spend limit is breached, creates a Jira ticket for the finance team and alerts the cardholder's manager via Slack."
  tags:
    - finance
    - stripe
    - issuing
    - jira
    - slack
capability:
  exposes:
    - type: mcp
      namespace: issuing-ops
      port: 8080
      tools:
        - name: handle-spend-limit-breach
          description: "Given a card ID and spend details, create finance ticket and alert manager."
          inputParameters:
            - name: card_id
              in: body
              type: string
              description: "Stripe Issuing card ID."
            - name: cardholder_name
              in: body
              type: string
              description: "Cardholder name."
            - name: spend_amount
              in: body
              type: number
              description: "Transaction amount."
            - name: limit_amount
              in: body
              type: number
              description: "Configured spend limit."
          steps:
            - name: create-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "FIN"
                issuetype: "Task"
                summary: "Spend limit breach: {{cardholder_name}} — ${{spend_amount}} (limit: ${{limit_amount}})"
            - name: alert-finance
              type: call
              call: "slack.post-message"
              with:
                channel: "finance-alerts"
                text: "Spend limit breach: {{cardholder_name}} card {{card_id}} — ${{spend_amount}} (limit: ${{limit_amount}}). Ticket: {{create-ticket.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Queries Link adoption metrics from Snowflake and posts a weekly adoption report to the product Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Link Adoption Dashboard Sync"
  description: "Queries Link adoption metrics from Snowflake and posts a weekly adoption report to the product Slack channel."
  tags:
    - payments
    - stripe
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: link-ops
      port: 8080
      tools:
        - name: sync-link-adoption
          description: "Pull Link adoption data and share weekly summary."
          inputParameters:
            - name: week_start
              in: body
              type: string
              description: "Week start date YYYY-MM-DD."
          steps:
            - name: query-link-metrics
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT new_users, returning_users, conversion_rate FROM product.link_metrics WHERE week_start='{{week_start}}'"
            - name: post-report
              type: call
              call: "slack.post-message"
              with:
                channel: "link-product"
                text: "Link adoption week of {{week_start}}: {{query-link-metrics.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a merchant support ticket is created, uses Anthropic to draft a response based on the ticket context, posts the draft for agent review in Slack.

naftiko: "0.5"
info:
  label: "Stripe Merchant Support AI Responder"
  description: "When a merchant support ticket is created, uses Anthropic to draft a response based on the ticket context, posts the draft for agent review in Slack."
  tags:
    - support
    - anthropic
    - slack
    - ai
capability:
  exposes:
    - type: mcp
      namespace: support-ai
      port: 8080
      tools:
        - name: draft-support-response
          description: "Given a support ticket, generate an AI response draft and share with agents."
          inputParameters:
            - name: ticket_subject
              in: body
              type: string
              description: "Support ticket subject."
            - name: ticket_body
              in: body
              type: string
              description: "Support ticket body."
            - name: merchant_id
              in: body
              type: string
              description: "Merchant account ID."
          steps:
            - name: generate-draft
              type: call
              call: "anthropic.create-message"
              with:
                model: "claude-3-5-sonnet-20241022"
                max_tokens: 500
                messages: "[{\"role\": \"user\", \"content\": \"Draft a helpful, professional support response for this Stripe merchant inquiry:\\nSubject: {{ticket_subject}}\\nBody: {{ticket_body}}\"}]"
            - name: post-draft
              type: call
              call: "slack.post-message"
              with:
                channel: "support-ai-drafts"
                text: "AI draft for merchant {{merchant_id}}:\nSubject: {{ticket_subject}}\n---\n{{generate-draft.content}}"
  consumes:
    - type: http
      namespace: anthropic
      baseUri: "https://api.anthropic.com/v1"
      authentication:
        type: apikey
        key: "x-api-key"
        value: "$secrets.anthropic_api_key"
        placement: header
      resources:
        - name: messages
          path: "/messages"
          operations:
            - name: create-message
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a payment fails, retrieves the payment intent, creates a Jira support ticket, and notifies the merchant success team via Slack.

naftiko: "0.5"
info:
  label: "Stripe Payment Failure Recovery Workflow"
  description: "When a payment fails, retrieves the payment intent, creates a Jira support ticket, and notifies the merchant success team via Slack."
  tags:
    - payments
    - stripe
    - jira
    - slack
capability:
  exposes:
    - type: mcp
      namespace: payment-recovery
      port: 8080
      tools:
        - name: recover-failed-payment
          description: "Given a failed payment intent ID, fetch details, create support ticket, and notify the team."
          inputParameters:
            - name: payment_intent_id
              in: body
              type: string
              description: "The failed Stripe payment intent ID."
            - name: merchant_name
              in: body
              type: string
              description: "The merchant name."
          steps:
            - name: get-payment
              type: call
              call: "stripe.get-payment-intent"
              with:
                id: "{{payment_intent_id}}"
            - name: create-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "SUPPORT"
                issuetype: "Bug"
                summary: "Payment failure: {{merchant_name}} — {{payment_intent_id}}"
                description: "Status: {{get-payment.status}}. Amount: {{get-payment.amount}}. Error: {{get-payment.last_payment_error}}"
            - name: notify-team
              type: call
              call: "slack.post-message"
              with:
                channel: "merchant-success"
                text: "Payment failure for {{merchant_name}}: {{payment_intent_id}} (${{get-payment.amount}}). Ticket: {{create-ticket.key}}"
  consumes:
    - type: http
      namespace: stripe
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: payment-intents
          path: "/payment_intents/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-payment-intent
              method: GET
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Queries Snowflake for Payment Links conversion and revenue data, and posts performance summary to the product Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Payment Links Performance"
  description: "Queries Snowflake for Payment Links conversion and revenue data, and posts performance summary to the product Slack channel."
  tags:
    - payments
    - stripe
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: payment-links
      port: 8080
      tools:
        - name: get-payment-links-performance
          description: "Given a date range, pull Payment Links metrics and share."
          inputParameters:
            - name: start_date
              in: body
              type: string
              description: "Start date YYYY-MM-DD."
          steps:
            - name: query-metrics
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT COUNT(*) as links_created, SUM(revenue) as total_revenue, AVG(conversion_rate) as avg_conversion FROM product.payment_links WHERE created_date>='{{start_date}}'"
            - name: post-summary
              type: call
              call: "slack.post-message"
              with:
                channel: "payment-links-product"
                text: "Payment Links performance since {{start_date}}: {{query-metrics.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Tracks merchants migrating to new payment methods, queries Snowflake for adoption metrics, and posts progress to the payments product Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Payment Method Migration Tracker"
  description: "Tracks merchants migrating to new payment methods, queries Snowflake for adoption metrics, and posts progress to the payments product Slack channel."
  tags:
    - payments
    - stripe
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: pm-migration
      port: 8080
      tools:
        - name: track-pm-migration
          description: "Given a payment method type, query adoption metrics and share progress."
          inputParameters:
            - name: payment_method
              in: body
              type: string
              description: "Payment method type (e.g., link, apple_pay, google_pay)."
          steps:
            - name: query-adoption
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT COUNT(DISTINCT merchant_id) as merchants, SUM(volume) as total_volume FROM payments.pm_adoption WHERE payment_method='{{payment_method}}' AND month=DATE_TRUNC('month', CURRENT_DATE())"
            - name: post-progress
              type: call
              call: "slack.post-message"
              with:
                channel: "payments-product"
                text: "{{payment_method}} adoption: {{query-adoption.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Lists Stripe payouts for a date range, compares totals against internal ledger entries in Snowflake, and flags discrepancies to the finance team via Slack.

naftiko: "0.5"
info:
  label: "Stripe Payout Reconciliation"
  description: "Lists Stripe payouts for a date range, compares totals against internal ledger entries in Snowflake, and flags discrepancies to the finance team via Slack."
  tags:
    - finance
    - payments
    - stripe
    - snowflake
    - slack
    - reconciliation
capability:
  exposes:
    - type: mcp
      namespace: finance-ops
      port: 8080
      tools:
        - name: reconcile-payouts
          description: "Given a start and end date, fetch Stripe payout records and compare against the Snowflake ledger view. Post a Slack summary with any discrepancies to #finance-reconciliation. Use for month-end close or daily cash reconciliation."
          inputParameters:
            - name: start_date
              in: body
              type: string
              description: "Reconciliation window start date in YYYY-MM-DD format."
            - name: end_date
              in: body
              type: string
              description: "Reconciliation window end date in YYYY-MM-DD format."
          steps:
            - name: list-payouts
              type: call
              call: stripe-payouts.list-payouts
              with:
                arrival_date_gte: "{{start_date}}"
                arrival_date_lte: "{{end_date}}"
            - name: query-ledger
              type: call
              call: snowflake-ledger.query-payouts
              with:
                start_date: "{{start_date}}"
                end_date: "{{end_date}}"
            - name: post-reconciliation
              type: call
              call: slack-recon.post-message
              with:
                channel: "finance-reconciliation"
                text: "Payout reconciliation {{start_date}} to {{end_date}}: Stripe payouts retrieved. Ledger query complete. Review discrepancies manually."
  consumes:
    - type: http
      namespace: stripe-payouts
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: payouts
          path: "/payouts"
          inputParameters:
            - name: arrival_date_gte
              in: query
            - name: arrival_date_lte
              in: query
          operations:
            - name: list-payouts
              method: GET
    - type: http
      namespace: snowflake-ledger
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: ledger-statements
          path: "/statements"
          inputParameters:
            - name: start_date
              in: query
            - name: end_date
              in: query
          operations:
            - name: query-payouts
              method: POST
    - type: http
      namespace: slack-recon
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Retrieves status and arrival date of a Stripe payout.

naftiko: "0.5"
info:
  label: "Stripe Payout Status Lookup"
  description: "Retrieves status and arrival date of a Stripe payout."
  tags:
    - finance
    - stripe
    - payouts
capability:
  exposes:
    - type: mcp
      namespace: treasury
      port: 8080
      tools:
        - name: get-payout-status
          description: "Given a payout ID, return status and estimated arrival date."
          inputParameters:
            - name: payout_id
              in: body
              type: string
              description: "The Stripe payout ID."
          call: "stripe-payouts.get-payout"
          with:
            id: "{{payout_id}}"
          outputParameters:
            - name: status
              type: string
              mapping: "$.status"
            - name: arrival_date
              type: number
              mapping: "$.arrival_date"
  consumes:
    - type: http
      namespace: stripe-payouts
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: payouts
          path: "/payouts/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-payout
              method: GET

Retrieves a Stripe price object by ID including unit amount, currency, and billing scheme.

naftiko: "0.5"
info:
  label: "Stripe Price Lookup"
  description: "Retrieves a Stripe price object by ID including unit amount, currency, and billing scheme."
  tags:
    - billing
    - stripe
    - pricing
capability:
  exposes:
    - type: mcp
      namespace: billing
      port: 8080
      tools:
        - name: get-price
          description: "Given a Stripe price ID, return its unit amount, currency, and type."
          inputParameters:
            - name: price_id
              in: body
              type: string
              description: "The Stripe price ID."
          call: "stripe-prices.get-price"
          with:
            id: "{{price_id}}"
          outputParameters:
            - name: unit_amount
              type: number
              mapping: "$.unit_amount"
            - name: currency
              type: string
              mapping: "$.currency"
  consumes:
    - type: http
      namespace: stripe-prices
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: prices
          path: "/prices/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-price
              method: GET

Retrieves a Stripe product by ID including name, description, and active status.

naftiko: "0.5"
info:
  label: "Stripe Product Catalog Lookup"
  description: "Retrieves a Stripe product by ID including name, description, and active status."
  tags:
    - billing
    - stripe
    - catalog
capability:
  exposes:
    - type: mcp
      namespace: catalog
      port: 8080
      tools:
        - name: get-product
          description: "Given a Stripe product ID, return its name, description, and status."
          inputParameters:
            - name: product_id
              in: body
              type: string
              description: "The Stripe product ID."
          call: "stripe-products.get-product"
          with:
            id: "{{product_id}}"
          outputParameters:
            - name: name
              type: string
              mapping: "$.name"
            - name: active
              type: boolean
              mapping: "$.active"
  consumes:
    - type: http
      namespace: stripe-products
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: products
          path: "/products/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-product
              method: GET

Lists Stripe products and prices, then upserts matching product records in Salesforce for CRM-level revenue reporting and quoting accuracy.

naftiko: "0.5"
info:
  label: "Stripe Product Catalog Sync to Salesforce"
  description: "Lists Stripe products and prices, then upserts matching product records in Salesforce for CRM-level revenue reporting and quoting accuracy."
  tags:
    - finance
    - stripe
    - salesforce
    - product-catalog
    - sync
capability:
  exposes:
    - type: mcp
      namespace: catalog-ops
      port: 8080
      tools:
        - name: sync-products-to-salesforce
          description: "Retrieve the active Stripe product catalog and upsert each product into Salesforce as a Product2 record with the Stripe price. Use weekly or post-product-launch to keep CRM and billing catalogs in sync."
          inputParameters:
            - name: active_only
              in: body
              type: boolean
              description: "If true, only sync active Stripe products."
          steps:
            - name: list-stripe-products
              type: call
              call: stripe-products.list-products
              with:
                active: "{{active_only}}"
                limit: 100
            - name: upsert-sf-products
              type: call
              call: salesforce-products.upsert-product
              with:
                Name: "{{list-stripe-products.data}}"
                ExternalId__c: "{{list-stripe-products.id}}"
  consumes:
    - type: http
      namespace: stripe-products
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: products
          path: "/products"
          inputParameters:
            - name: active
              in: query
            - name: limit
              in: query
          operations:
            - name: list-products
              method: GET
    - type: http
      namespace: salesforce-products
      baseUri: "https://stripe.my.salesforce.com/services/data/v58.0"
      authentication:
        type: bearer
        token: "$secrets.salesforce_access_token"
      resources:
        - name: product2
          path: "/sobjects/Product2"
          operations:
            - name: upsert-product
              method: POST

Queries Snowflake for Radar ML model performance metrics, analyzes trends, and posts a weekly model health report to the risk team Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Radar Model Performance Monitor"
  description: "Queries Snowflake for Radar ML model performance metrics, analyzes trends, and posts a weekly model health report to the risk team Slack channel."
  tags:
    - fraud
    - machine-learning
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: radar-ml
      port: 8080
      tools:
        - name: monitor-radar-model
          description: "Given a model version, pull performance metrics and share report."
          inputParameters:
            - name: model_version
              in: body
              type: string
              description: "Radar model version."
          steps:
            - name: query-performance
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT date, precision, recall, f1_score, false_positive_rate FROM ml.radar_model_metrics WHERE model_version='{{model_version}}' ORDER BY date DESC LIMIT 7"
            - name: post-report
              type: call
              call: "slack.post-message"
              with:
                channel: "radar-ml-team"
                text: "Radar model {{model_version}} performance (last 7 days):\n{{query-performance.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a new fraud pattern is detected, creates a Stripe Radar rule, logs the rule in Jira for audit, and notifies the risk team via Slack.

naftiko: "0.5"
info:
  label: "Stripe Radar Rule Deployment"
  description: "When a new fraud pattern is detected, creates a Stripe Radar rule, logs the rule in Jira for audit, and notifies the risk team via Slack."
  tags:
    - fraud
    - stripe
    - jira
    - slack
    - security
capability:
  exposes:
    - type: mcp
      namespace: fraud-ops
      port: 8080
      tools:
        - name: deploy-radar-rule
          description: "Given a fraud pattern and rule definition, create a Radar rule, log in Jira, and notify risk team."
          inputParameters:
            - name: rule_name
              in: body
              type: string
              description: "Name for the new Radar rule."
            - name: rule_predicate
              in: body
              type: string
              description: "The Radar rule predicate expression."
            - name: fraud_pattern
              in: body
              type: string
              description: "Description of the fraud pattern detected."
          steps:
            - name: create-audit-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "RISK"
                issuetype: "Task"
                summary: "Radar rule deployment: {{rule_name}}"
                description: "Pattern: {{fraud_pattern}}\nRule: {{rule_predicate}}"
            - name: notify-risk
              type: call
              call: "slack.post-message"
              with:
                channel: "risk-operations"
                text: "New Radar rule deployed: {{rule_name}}. Pattern: {{fraud_pattern}}. Audit: {{create-audit-ticket.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Retrieves a Stripe refund by ID including amount, status, and reason.

naftiko: "0.5"
info:
  label: "Stripe Refund Lookup"
  description: "Retrieves a Stripe refund by ID including amount, status, and reason."
  tags:
    - finance
    - payments
    - stripe
capability:
  exposes:
    - type: mcp
      namespace: payments
      port: 8080
      tools:
        - name: get-refund
          description: "Given a refund ID, return its status, amount, and reason."
          inputParameters:
            - name: refund_id
              in: body
              type: string
              description: "The Stripe refund ID."
          call: "stripe-refunds.get-refund"
          with:
            id: "{{refund_id}}"
          outputParameters:
            - name: status
              type: string
              mapping: "$.status"
            - name: amount
              type: number
              mapping: "$.amount"
  consumes:
    - type: http
      namespace: stripe-refunds
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: refunds
          path: "/refunds/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-refund
              method: GET

When a new regulatory change is identified, creates a Jira compliance epic, documents requirements in Confluence, and notifies the legal team via Slack.

naftiko: "0.5"
info:
  label: "Stripe Regulatory Change Tracker"
  description: "When a new regulatory change is identified, creates a Jira compliance epic, documents requirements in Confluence, and notifies the legal team via Slack."
  tags:
    - legal
    - regulatory
    - jira
    - confluence
    - slack
capability:
  exposes:
    - type: mcp
      namespace: regulatory
      port: 8080
      tools:
        - name: track-regulatory-change
          description: "Given a regulation and jurisdiction, create compliance tracking and notify legal."
          inputParameters:
            - name: regulation_name
              in: body
              type: string
              description: "Name of the regulation."
            - name: jurisdiction
              in: body
              type: string
              description: "Jurisdiction (e.g., EU, US, UK)."
            - name: effective_date
              in: body
              type: string
              description: "Effective date."
          steps:
            - name: create-compliance-epic
              type: call
              call: "jira.create-issue"
              with:
                project_key: "LEGAL"
                issuetype: "Epic"
                summary: "Regulatory: {{regulation_name}} ({{jurisdiction}}) — effective {{effective_date}}"
            - name: create-requirements-doc
              type: call
              call: "confluence.create-page"
              with:
                spaceKey: "LEGAL"
                title: "{{regulation_name}} — {{jurisdiction}}"
                body: "Effective: {{effective_date}}\nEpic: {{create-compliance-epic.key}}\nStatus: Analysis"
            - name: notify-legal
              type: call
              call: "slack.post-message"
              with:
                channel: "legal-regulatory"
                text: "New regulatory change: {{regulation_name}} ({{jurisdiction}}), effective {{effective_date}}. Epic: {{create-compliance-epic.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: confluence
      baseUri: "https://stripe.atlassian.net/wiki/rest/api"
      authentication:
        type: basic
        username: "$secrets.confluence_user"
        password: "$secrets.confluence_api_token"
      resources:
        - name: pages
          path: "/content"
          operations:
            - name: create-page
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Fetches Stripe balance transactions for the prior day, aggregates MRR and churn metrics, and posts a digest to a Slack finance channel. Runs on a daily schedule.

naftiko: "0.5"
info:
  label: "Stripe Revenue Metrics Daily Digest"
  description: "Fetches Stripe balance transactions for the prior day, aggregates MRR and churn metrics, and posts a digest to a Slack finance channel. Runs on a daily schedule."
  tags:
    - finance
    - payments
    - stripe
    - slack
    - reporting
    - mrr
capability:
  exposes:
    - type: mcp
      namespace: finance-reporting
      port: 8080
      tools:
        - name: digest-daily-revenue
          description: "Retrieve Stripe balance transactions for a given date, compute total volume and refund rate, and post a formatted summary to the Slack #finance-daily channel. Invoke as a scheduled daily agent task."
          inputParameters:
            - name: report_date
              in: body
              type: string
              description: "Date to report on in YYYY-MM-DD format."
          steps:
            - name: get-balance-transactions
              type: call
              call: stripe-balance.list-transactions
              with:
                created_gte: "{{report_date}}"
                limit: 100
            - name: post-digest
              type: call
              call: slack-finance.post-message
              with:
                channel: "finance-daily"
                text: "Stripe Daily Digest for {{report_date}}: Transactions fetched. Review balance data: {{get-balance-transactions.data}}"
  consumes:
    - type: http
      namespace: stripe-balance
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: balance-transactions
          path: "/balance_transactions"
          inputParameters:
            - name: created_gte
              in: query
            - name: limit
              in: query
          operations:
            - name: list-transactions
              method: GET
    - type: http
      namespace: slack-finance
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Queries Snowflake for monthly revenue data, reconciles deferred revenue entries, and posts a revenue recognition summary to the finance Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Revenue Recognition Pipeline"
  description: "Queries Snowflake for monthly revenue data, reconciles deferred revenue entries, and posts a revenue recognition summary to the finance Slack channel."
  tags:
    - finance
    - revenue
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: rev-rec
      port: 8080
      tools:
        - name: run-rev-rec
          description: "Given a fiscal month, pull revenue data and post recognition summary."
          inputParameters:
            - name: fiscal_month
              in: body
              type: string
              description: "Fiscal month (e.g., 2026-03)."
          steps:
            - name: query-revenue
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT revenue_type, SUM(recognized_amount) as recognized, SUM(deferred_amount) as deferred FROM finance.rev_rec WHERE month='{{fiscal_month}}' GROUP BY revenue_type"
            - name: post-summary
              type: call
              call: "slack.post-message"
              with:
                channel: "finance-accounting"
                text: "Revenue recognition for {{fiscal_month}}:\n{{query-revenue.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a new integration partner needs a test environment, provisions sandbox credentials, creates a Jira onboarding ticket, and sends credentials via SendGrid.

naftiko: "0.5"
info:
  label: "Stripe Sandbox Environment Provisioner"
  description: "When a new integration partner needs a test environment, provisions sandbox credentials, creates a Jira onboarding ticket, and sends credentials via SendGrid."
  tags:
    - partnerships
    - jira
    - sendgrid
    - sandbox
capability:
  exposes:
    - type: mcp
      namespace: sandbox-ops
      port: 8080
      tools:
        - name: provision-sandbox
          description: "Given partner details, create onboarding ticket and send sandbox credentials."
          inputParameters:
            - name: partner_name
              in: body
              type: string
              description: "Partner company name."
            - name: partner_email
              in: body
              type: string
              description: "Partner technical contact."
            - name: integration_type
              in: body
              type: string
              description: "Type of integration."
          steps:
            - name: create-onboarding-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "PARTNER"
                issuetype: "Task"
                summary: "Sandbox provisioning: {{partner_name}} — {{integration_type}}"
            - name: send-credentials
              type: call
              call: "sendgrid.send-email"
              with:
                to: "{{partner_email}}"
                subject: "Your Stripe sandbox is ready"
                body: "Welcome {{partner_name}}! Your sandbox for {{integration_type}} is provisioned. Ticket: {{create-onboarding-ticket.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: sendgrid
      baseUri: "https://api.sendgrid.com/v3"
      authentication:
        type: bearer
        token: "$secrets.sendgrid_api_key"
      resources:
        - name: mail
          path: "/mail/send"
          operations:
            - name: send-email
              method: POST

Queries Snowflake for custom payment analytics, generates a summary with Anthropic AI, and posts the report to the analytics Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Sigma Report Generator"
  description: "Queries Snowflake for custom payment analytics, generates a summary with Anthropic AI, and posts the report to the analytics Slack channel."
  tags:
    - analytics
    - snowflake
    - anthropic
    - slack
    - ai
capability:
  exposes:
    - type: mcp
      namespace: analytics
      port: 8080
      tools:
        - name: generate-sigma-report
          description: "Given a report type and date range, query data, summarize with AI, and share."
          inputParameters:
            - name: report_type
              in: body
              type: string
              description: "Type of report (e.g., revenue, disputes, churn)."
            - name: date_range
              in: body
              type: string
              description: "Date range (e.g., last_30_days)."
          steps:
            - name: query-data
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT * FROM analytics.{{report_type}}_summary WHERE period='{{date_range}}'"
            - name: summarize
              type: call
              call: "anthropic.create-message"
              with:
                model: "claude-3-5-sonnet-20241022"
                max_tokens: 1000
                messages: "[{\"role\": \"user\", \"content\": \"Analyze this {{report_type}} data and provide key insights and trends:\\n{{query-data.data}}\"}]"
            - name: post-report
              type: call
              call: "slack.post-message"
              with:
                channel: "analytics"
                text: "{{report_type}} report ({{date_range}}):\n{{summarize.content}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: anthropic
      baseUri: "https://api.anthropic.com/v1"
      authentication:
        type: apikey
        key: "x-api-key"
        value: "$secrets.anthropic_api_key"
        placement: header
      resources:
        - name: messages
          path: "/messages"
          operations:
            - name: create-message
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a subscription is about to cancel, queries usage data from Snowflake, generates a retention offer with AI, and notifies the customer success team via Slack.

naftiko: "0.5"
info:
  label: "Stripe Subscription Churn Prevention"
  description: "When a subscription is about to cancel, queries usage data from Snowflake, generates a retention offer with AI, and notifies the customer success team via Slack."
  tags:
    - subscriptions
    - stripe
    - snowflake
    - anthropic
    - slack
    - ai
capability:
  exposes:
    - type: mcp
      namespace: retention
      port: 8080
      tools:
        - name: prevent-subscription-churn
          description: "Given a subscription ID, analyze usage, generate retention offer, and notify CS."
          inputParameters:
            - name: subscription_id
              in: body
              type: string
              description: "The Stripe subscription ID."
            - name: customer_name
              in: body
              type: string
              description: "Customer name."
            - name: cancel_reason
              in: body
              type: string
              description: "Stated cancellation reason."
          steps:
            - name: query-usage
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT feature, usage_count FROM billing.feature_usage WHERE subscription_id='{{subscription_id}}' AND month=DATE_TRUNC('month', CURRENT_DATE()) ORDER BY usage_count DESC LIMIT 5"
            - name: generate-offer
              type: call
              call: "anthropic.create-message"
              with:
                model: "claude-3-5-sonnet-20241022"
                max_tokens: 500
                messages: "[{\"role\": \"user\", \"content\": \"Generate a retention offer for {{customer_name}} who wants to cancel because: {{cancel_reason}}. Their top used features: {{query-usage.data}}\"}]"
            - name: notify-cs
              type: call
              call: "slack.post-message"
              with:
                channel: "customer-success"
                text: "Churn prevention — {{customer_name}} ({{subscription_id}}): Cancel reason: {{cancel_reason}}\nSuggested offer: {{generate-offer.content}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: anthropic
      baseUri: "https://api.anthropic.com/v1"
      authentication:
        type: apikey
        key: "x-api-key"
        value: "$secrets.anthropic_api_key"
        placement: header
      resources:
        - name: messages
          path: "/messages"
          operations:
            - name: create-message
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Retrieves a Stripe subscription by ID including current period, plan, and billing status.

naftiko: "0.5"
info:
  label: "Stripe Subscription Lookup"
  description: "Retrieves a Stripe subscription by ID including current period, plan, and billing status."
  tags:
    - finance
    - payments
    - stripe
    - subscriptions
capability:
  exposes:
    - type: mcp
      namespace: billing
      port: 8080
      tools:
        - name: get-subscription
          description: "Given a Stripe subscription ID, return its status, plan, and current period details."
          inputParameters:
            - name: subscription_id
              in: body
              type: string
              description: "The Stripe subscription ID (format: sub_xxxxx)."
          call: "stripe-subs.get-subscription"
          with:
            id: "{{subscription_id}}"
          outputParameters:
            - name: status
              type: string
              mapping: "$.status"
            - name: plan_id
              type: string
              mapping: "$.plan.id"
            - name: current_period_end
              type: number
              mapping: "$.current_period_end"
  consumes:
    - type: http
      namespace: stripe-subs
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: subscriptions
          path: "/subscriptions/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-subscription
              method: GET

Looks up a Stripe subscription by ID and returns plan, status, current period end, and trial information. Used by support and billing agents to answer customer inquiries.

naftiko: "0.5"
info:
  label: "Stripe Subscription Status Check"
  description: "Looks up a Stripe subscription by ID and returns plan, status, current period end, and trial information. Used by support and billing agents to answer customer inquiries."
  tags:
    - finance
    - payments
    - stripe
    - billing
    - subscriptions
    - lookup
capability:
  exposes:
    - type: mcp
      namespace: billing
      port: 8080
      tools:
        - name: get-subscription
          description: "Given a Stripe subscription ID, return current plan name, status, current period end date, and trial end date. Invoke for customer billing inquiries or churn risk analysis."
          inputParameters:
            - name: subscription_id
              in: body
              type: string
              description: "Stripe subscription ID (format: sub_xxxxx)."
          call: stripe-subs.get-subscription
          with:
            id: "{{subscription_id}}"
          outputParameters:
            - name: status
              type: string
              mapping: "$.status"
            - name: current_period_end
              type: number
              mapping: "$.current_period_end"
            - name: plan_id
              type: string
              mapping: "$.plan.id"
            - name: trial_end
              type: number
              mapping: "$.trial_end"
  consumes:
    - type: http
      namespace: stripe-subs
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: subscriptions
          path: "/subscriptions/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-subscription
              method: GET

Retrieves Stripe Tax Rate objects for a given jurisdiction to support tax calculation and compliance reporting workflows.

naftiko: "0.5"
info:
  label: "Stripe Tax Rate Lookup"
  description: "Retrieves Stripe Tax Rate objects for a given jurisdiction to support tax calculation and compliance reporting workflows."
  tags:
    - finance
    - stripe
    - tax
    - compliance
    - lookup
capability:
  exposes:
    - type: mcp
      namespace: tax-ops
      port: 8080
      tools:
        - name: get-tax-rate
          description: "Given a Stripe tax rate ID, return the display name, percentage, jurisdiction, and inclusive/exclusive type. Use during invoice generation or tax compliance review."
          inputParameters:
            - name: tax_rate_id
              in: body
              type: string
              description: "Stripe tax rate ID (txr_xxxxx) to retrieve."
          call: stripe-tax.get-tax-rate
          with:
            id: "{{tax_rate_id}}"
          outputParameters:
            - name: display_name
              type: string
              mapping: "$.display_name"
            - name: percentage
              type: number
              mapping: "$.percentage"
            - name: jurisdiction
              type: string
              mapping: "$.jurisdiction"
            - name: inclusive
              type: boolean
              mapping: "$.inclusive"
  consumes:
    - type: http
      namespace: stripe-tax
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: tax-rates
          path: "/tax_rates/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-tax-rate
              method: GET

Queries Snowflake for tax obligation data, generates tax summary reports, and posts them to the tax operations Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Tax Reporting Generator"
  description: "Queries Snowflake for tax obligation data, generates tax summary reports, and posts them to the tax operations Slack channel."
  tags:
    - finance
    - tax
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: tax-ops
      port: 8080
      tools:
        - name: generate-tax-report
          description: "Given a jurisdiction and period, pull tax data and share report."
          inputParameters:
            - name: jurisdiction
              in: body
              type: string
              description: "Tax jurisdiction (e.g., US, EU, UK)."
            - name: tax_period
              in: body
              type: string
              description: "Tax period (e.g., 2026-Q1)."
          steps:
            - name: query-tax-data
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT tax_type, SUM(tax_amount) as total, COUNT(*) as transactions FROM tax.obligations WHERE jurisdiction='{{jurisdiction}}' AND period='{{tax_period}}' GROUP BY tax_type"
            - name: post-report
              type: call
              call: "slack.post-message"
              with:
                channel: "tax-operations"
                text: "Tax report for {{jurisdiction}} — {{tax_period}}:\n{{query-tax-data.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Monitors Stripe Terminal device fleet health, creates Jira tickets for offline devices, and alerts the hardware operations team via Slack.

naftiko: "0.5"
info:
  label: "Stripe Terminal Device Health Monitor"
  description: "Monitors Stripe Terminal device fleet health, creates Jira tickets for offline devices, and alerts the hardware operations team via Slack."
  tags:
    - hardware
    - stripe
    - jira
    - slack
    - terminal
capability:
  exposes:
    - type: mcp
      namespace: terminal-ops
      port: 8080
      tools:
        - name: monitor-terminal-health
          description: "Given a location ID, check terminal device health and escalate offline devices."
          inputParameters:
            - name: location_id
              in: body
              type: string
              description: "The Stripe Terminal location ID."
            - name: merchant_name
              in: body
              type: string
              description: "The merchant name."
          steps:
            - name: create-hw-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "HW"
                issuetype: "Bug"
                summary: "Terminal offline: Location {{location_id}} — {{merchant_name}}"
            - name: alert-hw-ops
              type: call
              call: "slack.post-message"
              with:
                channel: "terminal-operations"
                text: "Terminal device offline at {{merchant_name}} (location: {{location_id}}). Ticket: {{create-hw-ticket.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Retrieves a Stripe Connect transfer by ID including amount, destination, and status.

naftiko: "0.5"
info:
  label: "Stripe Transfer Lookup"
  description: "Retrieves a Stripe Connect transfer by ID including amount, destination, and status."
  tags:
    - finance
    - payments
    - stripe
    - connect
capability:
  exposes:
    - type: mcp
      namespace: connect
      port: 8080
      tools:
        - name: get-transfer
          description: "Given a Stripe transfer ID, return its amount, destination account, and status."
          inputParameters:
            - name: transfer_id
              in: body
              type: string
              description: "The Stripe transfer ID (format: tr_xxxxx)."
          call: "stripe-transfers.get-transfer"
          with:
            id: "{{transfer_id}}"
          outputParameters:
            - name: amount
              type: number
              mapping: "$.amount"
            - name: destination
              type: string
              mapping: "$.destination"
  consumes:
    - type: http
      namespace: stripe-transfers
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: transfers
          path: "/transfers/{{id}}"
          inputParameters:
            - name: id
              in: path
          operations:
            - name: get-transfer
              method: GET

Pulls daily Stripe payout data, reconciles against Snowflake ledger entries, and posts a reconciliation summary to the finance Slack channel.

naftiko: "0.5"
info:
  label: "Stripe Treasury Reconciliation"
  description: "Pulls daily Stripe payout data, reconciles against Snowflake ledger entries, and posts a reconciliation summary to the finance Slack channel."
  tags:
    - finance
    - stripe
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: treasury
      port: 8080
      tools:
        - name: run-daily-reconciliation
          description: "Given a date, pull Stripe payouts, compare with Snowflake ledger, and report discrepancies."
          inputParameters:
            - name: reconciliation_date
              in: body
              type: string
              description: "Date to reconcile in YYYY-MM-DD format."
          steps:
            - name: query-ledger
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT SUM(amount) as ledger_total, COUNT(*) as entries FROM finance.payout_ledger WHERE payout_date='{{reconciliation_date}}'"
            - name: post-reconciliation
              type: call
              call: "slack.post-message"
              with:
                channel: "finance-treasury"
                text: "Daily reconciliation for {{reconciliation_date}}: Ledger total: {{query-ledger.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Creates or updates a Stripe webhook endpoint registration for a given URL and event list, enabling automated webhook infrastructure provisioning for new environments.

naftiko: "0.5"
info:
  label: "Stripe Webhook Endpoint Management"
  description: "Creates or updates a Stripe webhook endpoint registration for a given URL and event list, enabling automated webhook infrastructure provisioning for new environments."
  tags:
    - devops
    - stripe
    - webhooks
    - infrastructure
capability:
  exposes:
    - type: mcp
      namespace: webhook-infra
      port: 8080
      tools:
        - name: register-webhook-endpoint
          description: "Given a target URL and list of Stripe event types, create a new webhook endpoint registration in Stripe. Use during environment provisioning or when adding new event subscriptions."
          inputParameters:
            - name: url
              in: body
              type: string
              description: "HTTPS URL that Stripe will deliver webhook events to."
            - name: events
              in: body
              type: string
              description: "Comma-separated list of Stripe event types to subscribe (e.g. payment_intent.succeeded,invoice.payment_failed)."
          call: stripe-webhooks.create-endpoint
          with:
            url: "{{url}}"
            enabled_events: "{{events}}"
          outputParameters:
            - name: endpoint_id
              type: string
              mapping: "$.id"
            - name: secret
              type: string
              mapping: "$.secret"
  consumes:
    - type: http
      namespace: stripe-webhooks
      baseUri: "https://api.stripe.com/v1"
      authentication:
        type: bearer
        token: "$secrets.stripe_secret_key"
      resources:
        - name: webhook-endpoints
          path: "/webhook_endpoints"
          operations:
            - name: create-endpoint
              method: POST

Validates an incoming Stripe webhook signature, parses the event type, and routes it to the appropriate internal processing queue via GitHub Actions dispatch.

naftiko: "0.5"
info:
  label: "Stripe Webhook Event Validator"
  description: "Validates an incoming Stripe webhook signature, parses the event type, and routes it to the appropriate internal processing queue via GitHub Actions dispatch."
  tags:
    - devops
    - stripe
    - github
    - webhooks
    - automation
capability:
  exposes:
    - type: mcp
      namespace: webhook-ops
      port: 8080
      tools:
        - name: validate-and-route-webhook
          description: "Given a raw Stripe webhook payload and signature header, verify the signature, extract the event type, and trigger a GitHub Actions repository dispatch to route processing. Use as the first handler in the Stripe webhook ingestion pipeline."
          inputParameters:
            - name: event_type
              in: body
              type: string
              description: "Stripe event type extracted after signature validation (e.g. invoice.payment_failed)."
            - name: event_id
              in: body
              type: string
              description: "Stripe event ID (evt_xxxxx) for idempotency tracking."
            - name: repo_owner
              in: body
              type: string
              description: "GitHub repository owner for dispatch target."
            - name: repo_name
              in: body
              type: string
              description: "GitHub repository name for dispatch target."
          steps:
            - name: dispatch-workflow
              type: call
              call: github-dispatch.trigger-dispatch
              with:
                owner: "{{repo_owner}}"
                repo: "{{repo_name}}"
                event_type: "{{event_type}}"
                client_payload: "{{event_id}}"
  consumes:
    - type: http
      namespace: github-dispatch
      baseUri: "https://api.github.com"
      authentication:
        type: bearer
        token: "$secrets.github_token"
      resources:
        - name: repo-dispatches
          path: "/repos/{{owner}}/{{repo}}/dispatches"
          inputParameters:
            - name: owner
              in: path
            - name: repo
              in: path
          operations:
            - name: trigger-dispatch
              method: POST

When webhook deliveries fail repeatedly, creates a Jira incident ticket, queries Snowflake for failure patterns, and alerts the integrations team via Slack.

naftiko: "0.5"
info:
  label: "Stripe Webhook Failure Handler"
  description: "When webhook deliveries fail repeatedly, creates a Jira incident ticket, queries Snowflake for failure patterns, and alerts the integrations team via Slack."
  tags:
    - integrations
    - stripe
    - jira
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: webhook-ops
      port: 8080
      tools:
        - name: handle-webhook-failures
          description: "Given a webhook endpoint and failure count, investigate, create ticket, and alert."
          inputParameters:
            - name: endpoint_url
              in: body
              type: string
              description: "The webhook endpoint URL."
            - name: failure_count
              in: body
              type: number
              description: "Number of consecutive failures."
            - name: merchant_id
              in: body
              type: string
              description: "The merchant account ID."
          steps:
            - name: query-failure-pattern
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT event_type, status_code, COUNT(*) FROM webhooks.delivery_logs WHERE merchant_id='{{merchant_id}}' AND status_code>=400 AND created_at>=DATEADD(hour, -24, CURRENT_TIMESTAMP()) GROUP BY event_type, status_code"
            - name: create-incident
              type: call
              call: "jira.create-issue"
              with:
                project_key: "INT"
                issuetype: "Bug"
                summary: "Webhook failures: {{merchant_id}} — {{failure_count}} consecutive failures"
                description: "Endpoint: {{endpoint_url}}\nFailure pattern: {{query-failure-pattern.data}}"
            - name: alert-integrations
              type: call
              call: "slack.post-message"
              with:
                channel: "integrations-alerts"
                text: "Webhook failures: {{merchant_id}} endpoint {{endpoint_url}} — {{failure_count}} failures. Pattern: {{query-failure-pattern.data}}. Ticket: {{create-incident.key}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a new service is created, triggers a Terraform run, creates a Jira provisioning ticket, and notifies platform engineering via Slack.

naftiko: "0.5"
info:
  label: "Terraform Infrastructure Provisioning"
  description: "When a new service is created, triggers a Terraform run, creates a Jira provisioning ticket, and notifies platform engineering via Slack."
  tags:
    - infrastructure
    - terraform
    - jira
    - slack
capability:
  exposes:
    - type: mcp
      namespace: infra-ops
      port: 8080
      tools:
        - name: provision-infrastructure
          description: "Given service details, trigger Terraform, create ticket, and notify team."
          inputParameters:
            - name: service_name
              in: body
              type: string
              description: "New service name."
            - name: environment
              in: body
              type: string
              description: "Target environment."
          steps:
            - name: create-provisioning-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "INFRA"
                issuetype: "Task"
                summary: "Provision: {{service_name}} in {{environment}}"
            - name: notify-platform
              type: call
              call: "slack.post-message"
              with:
                channel: "platform-engineering"
                text: "Infrastructure provisioning: {{service_name}} in {{environment}}. Ticket: {{create-provisioning-ticket.key}}"
  consumes:
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When an employee departs, revokes GitHub access, disables Okta account, creates a Jira deprovisioning ticket, and notifies the team via Slack.

naftiko: "0.5"
info:
  label: "Workday Employee Offboarding Orchestrator"
  description: "When an employee departs, revokes GitHub access, disables Okta account, creates a Jira deprovisioning ticket, and notifies the team via Slack."
  tags:
    - hr
    - offboarding
    - workday
    - github
    - okta
    - jira
    - slack
capability:
  exposes:
    - type: mcp
      namespace: hr-offboarding
      port: 8080
      tools:
        - name: offboard-employee
          description: "Given employee details, revoke all access, create deprovisioning ticket, and notify."
          inputParameters:
            - name: employee_id
              in: body
              type: string
              description: "Workday employee ID."
            - name: github_username
              in: body
              type: string
              description: "GitHub username."
            - name: employee_name
              in: body
              type: string
              description: "Employee name."
            - name: team_name
              in: body
              type: string
              description: "Team name."
          steps:
            - name: revoke-github
              type: call
              call: "github.remove-org-member"
              with:
                username: "{{github_username}}"
            - name: create-deprov-ticket
              type: call
              call: "jira.create-issue"
              with:
                project_key: "IT"
                issuetype: "Task"
                summary: "Offboarding: {{employee_name}} — access deprovisioning"
            - name: notify-team
              type: call
              call: "slack.post-message"
              with:
                channel: "{{team_name}}-engineering"
                text: "{{employee_name}} has departed. Access revoked. Deprovisioning: {{create-deprov-ticket.key}}"
  consumes:
    - type: http
      namespace: github
      baseUri: "https://api.github.com"
      authentication:
        type: bearer
        token: "$secrets.github_token"
      resources:
        - name: org-members
          path: "/orgs/stripe/members/{{username}}"
          inputParameters:
            - name: username
              in: path
          operations:
            - name: remove-org-member
              method: DELETE
    - type: http
      namespace: jira
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

On employee termination in Workday, deactivates the Salesforce user license, closes all open Jira tasks assigned to the employee, and notifies HR in Slack.

naftiko: "0.5"
info:
  label: "Workday Employee Offboarding"
  description: "On employee termination in Workday, deactivates the Salesforce user license, closes all open Jira tasks assigned to the employee, and notifies HR in Slack."
  tags:
    - hr
    - workday
    - salesforce
    - jira
    - slack
    - offboarding
capability:
  exposes:
    - type: mcp
      namespace: hr-offboarding
      port: 8080
      tools:
        - name: offboard-employee
          description: "Given a Workday worker ID, deactivate the matching Salesforce user, close their open Jira issues, and post an offboarding completion notice to #hr-ops in Slack. Invoke on confirmed employee termination events."
          inputParameters:
            - name: worker_id
              in: body
              type: string
              description: "Workday worker ID of the departing employee."
            - name: salesforce_user_id
              in: body
              type: string
              description: "Salesforce user ID to deactivate."
            - name: jira_account_id
              in: body
              type: string
              description: "Jira account ID to reassign or close open issues for."
          steps:
            - name: deactivate-sf-user
              type: call
              call: salesforce-users.update-user
              with:
                user_id: "{{salesforce_user_id}}"
                IsActive: "false"
            - name: close-jira-issues
              type: call
              call: jira-offboard.search-issues
              with:
                jql: "assignee={{jira_account_id}} AND status!=Done"
            - name: notify-hr
              type: call
              call: slack-offboard.post-message
              with:
                channel: "hr-ops"
                text: "Offboarding complete for worker {{worker_id}}. Salesforce user {{salesforce_user_id}} deactivated. Open Jira issues identified for reassignment."
  consumes:
    - type: http
      namespace: salesforce-users
      baseUri: "https://stripe.my.salesforce.com/services/data/v58.0"
      authentication:
        type: bearer
        token: "$secrets.salesforce_access_token"
      resources:
        - name: user-record
          path: "/sobjects/User/{{user_id}}"
          inputParameters:
            - name: user_id
              in: path
          operations:
            - name: update-user
              method: PATCH
    - type: http
      namespace: jira-offboard
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issue-search
          path: "/issue/search"
          inputParameters:
            - name: jql
              in: query
          operations:
            - name: search-issues
              method: GET
    - type: http
      namespace: slack-offboard
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Queries Workday for active headcount by department and posts a formatted report to the #finance-ops Slack channel for monthly workforce planning review.

naftiko: "0.5"
info:
  label: "Workday Headcount Report"
  description: "Queries Workday for active headcount by department and posts a formatted report to the #finance-ops Slack channel for monthly workforce planning review."
  tags:
    - hr
    - workday
    - slack
    - reporting
    - headcount
capability:
  exposes:
    - type: mcp
      namespace: workforce-reporting
      port: 8080
      tools:
        - name: publish-headcount-report
          description: "Fetch active worker counts by department from Workday and post a headcount summary to the Slack #finance-ops channel. Invoke monthly for workforce planning or on-demand for budget reviews."
          inputParameters:
            - name: as_of_date
              in: body
              type: string
              description: "Report as-of date in YYYY-MM-DD format."
          steps:
            - name: get-headcount
              type: call
              call: workday-headcount.get-workers
              with:
                as_of_date: "{{as_of_date}}"
            - name: post-report
              type: call
              call: slack-workforce.post-message
              with:
                channel: "finance-ops"
                text: "Workday Headcount Report as of {{as_of_date}}: Total active workers retrieved. Department breakdown available in Workday."
  consumes:
    - type: http
      namespace: workday-headcount
      baseUri: "https://wd2-impl-services1.workday.com/ccx/api/v1"
      authentication:
        type: bearer
        token: "$secrets.workday_token"
      resources:
        - name: workers
          path: "/workers"
          inputParameters:
            - name: as_of_date
              in: query
          operations:
            - name: get-workers
              method: GET
    - type: http
      namespace: slack-workforce
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

Queries Workday for current headcount, compares against plan in Snowflake, and posts variance report to the people ops Slack channel.

naftiko: "0.5"
info:
  label: "Workday Headcount Variance Reporter"
  description: "Queries Workday for current headcount, compares against plan in Snowflake, and posts variance report to the people ops Slack channel."
  tags:
    - hr
    - workday
    - snowflake
    - slack
capability:
  exposes:
    - type: mcp
      namespace: people-ops
      port: 8080
      tools:
        - name: report-headcount-variance
          description: "Given a department, compare actual vs planned headcount and report."
          inputParameters:
            - name: department
              in: body
              type: string
              description: "Department name."
          steps:
            - name: query-variance
              type: call
              call: "snowflake.execute-statement"
              with:
                statement: "SELECT planned_hc, actual_hc, actual_hc-planned_hc as variance FROM hr.headcount_plan WHERE department='{{department}}' AND quarter=DATE_TRUNC('quarter', CURRENT_DATE())"
            - name: post-report
              type: call
              call: "slack.post-message"
              with:
                channel: "people-ops"
                text: "Headcount variance for {{department}}: {{query-variance.data}}"
  consumes:
    - type: http
      namespace: snowflake
      baseUri: "https://stripe.snowflakecomputing.com/api/v2"
      authentication:
        type: bearer
        token: "$secrets.snowflake_token"
      resources:
        - name: statements
          path: "/statements"
          operations:
            - name: execute-statement
              method: POST
    - type: http
      namespace: slack
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST

When a new employee record is created in Workday, creates a Jira onboarding task, sends a Slack welcome message to the team channel, and registers the employee in the internal identity directory.

naftiko: "0.5"
info:
  label: "Workday New Hire Provisioning"
  description: "When a new employee record is created in Workday, creates a Jira onboarding task, sends a Slack welcome message to the team channel, and registers the employee in the internal identity directory."
  tags:
    - hr
    - workday
    - jira
    - slack
    - onboarding
capability:
  exposes:
    - type: mcp
      namespace: hr-ops
      port: 8080
      tools:
        - name: provision-new-hire
          description: "Given a Workday worker ID and start date, fetch employee details, open a Jira onboarding task, and post a Slack welcome message to the employee's team channel. Use when HR confirms a new hire record in Workday."
          inputParameters:
            - name: worker_id
              in: body
              type: string
              description: "Workday worker ID for the new hire."
            - name: start_date
              in: body
              type: string
              description: "Employee start date in YYYY-MM-DD format."
            - name: team_channel
              in: body
              type: string
              description: "Slack channel for the employee's team."
          steps:
            - name: get-worker
              type: call
              call: workday-workers.get-worker
              with:
                worker_id: "{{worker_id}}"
            - name: create-onboarding-task
              type: call
              call: jira-hr.create-issue
              with:
                project_key: "HR"
                issuetype: "Task"
                summary: "Onboarding: {{get-worker.fullName}} starting {{start_date}}"
                description: "New hire onboarding for {{get-worker.fullName}}. Worker ID: {{worker_id}}. Start: {{start_date}}. Department: {{get-worker.department}}"
            - name: post-welcome
              type: call
              call: slack-hr.post-message
              with:
                channel: "{{team_channel}}"
                text: "Please welcome {{get-worker.fullName}} to the team! They start on {{start_date}}. Onboarding task: {{create-onboarding-task.key}}"
  consumes:
    - type: http
      namespace: workday-workers
      baseUri: "https://wd2-impl-services1.workday.com/ccx/api/v1"
      authentication:
        type: bearer
        token: "$secrets.workday_token"
      resources:
        - name: workers
          path: "/workers/{{worker_id}}"
          inputParameters:
            - name: worker_id
              in: path
          operations:
            - name: get-worker
              method: GET
    - type: http
      namespace: jira-hr
      baseUri: "https://stripe.atlassian.net/rest/api/3"
      authentication:
        type: basic
        username: "$secrets.jira_user"
        password: "$secrets.jira_api_token"
      resources:
        - name: issues
          path: "/issue"
          operations:
            - name: create-issue
              method: POST
    - type: http
      namespace: slack-hr
      baseUri: "https://slack.com/api"
      authentication:
        type: bearer
        token: "$secrets.slack_bot_token"
      resources:
        - name: messages
          path: "/chat.postMessage"
          operations:
            - name: post-message
              method: POST