Block Capabilities
Naftiko 0.5 capability definitions for Block - 100 capabilities showing integration workflows and service orchestrations.
Onboards a new Afterpay merchant by creating the account, configuring webhooks, setting up a Datadog monitor, and notifying the partnerships team via HubSpot.
naftiko: "0.5"
info:
label: "Afterpay Merchant Integration Orchestrator"
description: "Onboards a new Afterpay merchant by creating the account, configuring webhooks, setting up a Datadog monitor, and notifying the partnerships team via HubSpot."
tags:
- onboarding
- afterpay
- datadog
- hubspot
capability:
exposes:
- type: mcp
namespace: afterpay-onboarding
port: 8080
tools:
- name: onboard-afterpay-merchant
description: "Provision a new Afterpay merchant with monitoring and CRM updates."
inputParameters:
- name: merchant_name
in: body
type: string
description: "Merchant business name."
- name: webhook_url
in: body
type: string
description: "Merchant webhook endpoint URL."
- name: partner_email
in: body
type: string
description: "Partnership manager email."
steps:
- name: create-merchant
type: call
call: "afterpay.create-merchant"
with:
name: "{{merchant_name}}"
webhook_url: "{{webhook_url}}"
- name: create-monitor
type: call
call: "datadog.create-monitor"
with:
name: "Afterpay — {{merchant_name}} Error Rate"
query: "sum(last_5m):sum:afterpay.errors{merchant:{{create-merchant.merchant_id}}}.as_rate() > 0.05"
type: "metric alert"
- name: update-crm
type: call
call: "hubspot.create-deal"
with:
dealname: "Afterpay Integration: {{merchant_name}}"
pipeline: "afterpay-partnerships"
dealstage: "live"
- name: notify-partner
type: call
call: "hubspot.send-email"
with:
to: "{{partner_email}}"
subject: "Afterpay Integration Live: {{merchant_name}}"
body: "Merchant {{merchant_name}} is live on Afterpay. ID: {{create-merchant.merchant_id}}. Monitor: {{create-monitor.id}}."
consumes:
- type: http
namespace: afterpay
baseUri: "https://global-api.afterpay.com/v2"
authentication:
type: basic
username: "$secrets.afterpay_merchant_id"
password: "$secrets.afterpay_secret_key"
resources:
- name: merchants
path: "/merchants"
operations:
- name: create-merchant
method: POST
- type: http
namespace: datadog
baseUri: "https://api.datadoghq.com/api/v1"
authentication:
type: apiKey
name: "DD-API-KEY"
in: header
value: "$secrets.datadog_api_key"
resources:
- name: monitors
path: "/monitor"
operations:
- name: create-monitor
method: POST
- type: http
namespace: hubspot
baseUri: "https://api.hubapi.com"
authentication:
type: bearer
token: "$secrets.hubspot_token"
resources:
- name: deals
path: "/crm/v3/objects/deals"
operations:
- name: create-deal
method: POST
- name: emails
path: "/marketing/v3/transactional/single-email/send"
operations:
- name: send-email
method: POST
Checks the status of an Afterpay buy-now-pay-later order by token, returning payment schedule, installment amounts, and current payment status.
naftiko: "0.5"
info:
label: "Afterpay Payment Status"
description: "Checks the status of an Afterpay buy-now-pay-later order by token, returning payment schedule, installment amounts, and current payment status."
tags:
- payments
- afterpay
capability:
exposes:
- type: mcp
namespace: afterpay
port: 8080
tools:
- name: get-payment-status
description: "Retrieve Afterpay order status by order token."
inputParameters:
- name: token
in: body
type: string
description: "The Afterpay order token."
call: "afterpay.get-order"
with:
token: "{{token}}"
consumes:
- type: http
namespace: afterpay
baseUri: "https://global-api.afterpay.com/v2"
authentication:
type: basic
username: "$secrets.afterpay_merchant_id"
password: "$secrets.afterpay_secret_key"
resources:
- name: orders
path: "/payments/{{token}}"
inputParameters:
- name: token
in: path
operations:
- name: get-order
method: GET
When a BigCommerce order is placed, creates a corresponding Square order and payment, then updates the BigCommerce order with the Square payment reference.
naftiko: "0.5"
info:
label: "BigCommerce Order to Square Sync"
description: "When a BigCommerce order is placed, creates a corresponding Square order and payment, then updates the BigCommerce order with the Square payment reference."
tags:
- ecommerce
- bigcommerce
- square
- order-sync
capability:
exposes:
- type: mcp
namespace: bigcommerce-square-sync
port: 8080
tools:
- name: sync-bigcommerce-order
description: "Sync a BigCommerce order into Square and update the source order with payment details."
inputParameters:
- name: bigcommerce_order_id
in: body
type: string
description: "The BigCommerce order ID."
- name: location_id
in: body
type: string
description: "The Square location ID for the order."
steps:
- name: get-bc-order
type: call
call: "bigcommerce.get-order"
with:
order_id: "{{bigcommerce_order_id}}"
- name: create-square-order
type: call
call: "square.create-order"
with:
order:
location_id: "{{location_id}}"
reference_id: "bc-{{bigcommerce_order_id}}"
line_items:
- name: "{{get-bc-order.items.0.name}}"
quantity: "{{get-bc-order.items.0.quantity}}"
base_price_money:
amount: "{{get-bc-order.total_inc_tax_cents}}"
currency: "{{get-bc-order.currency_code}}"
- name: update-bc-order
type: call
call: "bigcommerce.update-order"
with:
order_id: "{{bigcommerce_order_id}}"
staff_notes: "Square order: {{create-square-order.order.id}}"
consumes:
- type: http
namespace: bigcommerce
baseUri: "https://api.bigcommerce.com/stores/$secrets.bigcommerce_store_hash/v2"
authentication:
type: bearer
token: "$secrets.bigcommerce_access_token"
resources:
- name: orders
path: "/orders/{{order_id}}"
inputParameters:
- name: order_id
in: path
operations:
- name: get-order
method: GET
- name: update-order
method: PUT
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: orders
path: "/orders"
operations:
- name: create-order
method: POST
Monitors Lightning Network channel capacity, rebalances channels when liquidity is low, logs actions in CloudWatch, and notifies the infrastructure team via Slack.
naftiko: "0.5"
info:
label: "Bitcoin Lightning Channel Management"
description: "Monitors Lightning Network channel capacity, rebalances channels when liquidity is low, logs actions in CloudWatch, and notifies the infrastructure team via Slack."
tags:
- bitcoin
- lightning-network
- cloudwatch
- slack
capability:
exposes:
- type: mcp
namespace: lightning-channels
port: 8080
tools:
- name: manage-channels
description: "Monitor and rebalance Lightning Network channels with logging and alerting."
inputParameters:
- name: node_id
in: body
type: string
description: "Lightning node public key."
- name: min_capacity_sats
in: body
type: integer
description: "Minimum channel capacity in satoshis."
steps:
- name: get-channels
type: call
call: "lightning.list-channels"
with:
node_id: "{{node_id}}"
- name: rebalance
type: call
call: "lightning.rebalance-channel"
with:
node_id: "{{node_id}}"
min_capacity: "{{min_capacity_sats}}"
- name: log-metrics
type: call
call: "cloudwatch.put-metric"
with:
namespace: "Lightning/Channels"
metric_name: "ChannelCapacity"
value: "{{rebalance.total_capacity}}"
- name: notify-team
type: call
call: "slack.post-message"
with:
channel: "#lightning-ops"
text: "Lightning channel rebalance complete. Node: {{node_id}}. Channels rebalanced: {{rebalance.count}}. Total capacity: {{rebalance.total_capacity}} sats."
consumes:
- type: http
namespace: lightning
baseUri: "https://lightning.block.xyz/api/v1"
authentication:
type: bearer
token: "$secrets.lightning_api_token"
resources:
- name: channels
path: "/nodes/{{node_id}}/channels"
inputParameters:
- name: node_id
in: path
operations:
- name: list-channels
method: GET
- name: rebalance
path: "/nodes/{{node_id}}/rebalance"
inputParameters:
- name: node_id
in: path
operations:
- name: rebalance-channel
method: POST
- type: http
namespace: cloudwatch
baseUri: "https://monitoring.us-east-1.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: metrics
path: "/"
operations:
- name: put-metric
method: POST
- type: http
namespace: slack
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
Fetches the current Bitcoin-to-USD exchange rate from the Block Bitcoin API for use in Cash App pricing and merchant settlement calculations.
naftiko: "0.5"
info:
label: "Bitcoin Price Ticker"
description: "Fetches the current Bitcoin-to-USD exchange rate from the Block Bitcoin API for use in Cash App pricing and merchant settlement calculations."
tags:
- bitcoin
- crypto
- fintech
- cash-app
capability:
exposes:
- type: mcp
namespace: bitcoin-pricing
port: 8080
tools:
- name: get-btc-usd-price
description: "Retrieve the current BTC/USD exchange rate."
inputParameters: []
call: "bitcoin.get-price"
with:
currency_pair: "BTC-USD"
consumes:
- type: http
namespace: bitcoin
baseUri: "https://api.blockchain.info/v2"
authentication:
type: bearer
token: "$secrets.blockchain_api_token"
resources:
- name: ticker
path: "/ticker"
operations:
- name: get-price
method: GET
Checks Bitcoin price via Bloomberg, evaluates treasury allocation, executes a rebalance trade, and logs the transaction in Snowflake for audit.
naftiko: "0.5"
info:
label: "Bitcoin Treasury Rebalance Workflow"
description: "Checks Bitcoin price via Bloomberg, evaluates treasury allocation, executes a rebalance trade, and logs the transaction in Snowflake for audit."
tags:
- treasury
- bitcoin
- bloomberg
- snowflake
capability:
exposes:
- type: mcp
namespace: btc-treasury
port: 8080
tools:
- name: rebalance-treasury
description: "Evaluate and execute a Bitcoin treasury rebalance with audit logging."
inputParameters:
- name: target_allocation_pct
in: body
type: number
description: "Target Bitcoin allocation percentage."
- name: treasury_account
in: body
type: string
description: "Treasury account identifier."
steps:
- name: get-btc-price
type: call
call: "bloomberg.get-quote"
with:
ticker: "XBTUSD"
- name: get-holdings
type: call
call: "treasury.get-balance"
with:
account: "{{treasury_account}}"
- name: execute-trade
type: call
call: "treasury.execute-trade"
with:
asset: "BTC"
target_pct: "{{target_allocation_pct}}"
current_price: "{{get-btc-price.last_price}}"
- name: log-audit
type: call
call: "snowflake.execute-statement"
with:
statement: "INSERT INTO TREASURY.REBALANCE_LOG (account, asset, price, amount, timestamp) VALUES ('{{treasury_account}}', 'BTC', {{get-btc-price.last_price}}, {{execute-trade.amount}}, CURRENT_TIMESTAMP())"
consumes:
- type: http
namespace: bloomberg
baseUri: "https://api.bloomberg.com/eap/catalogs/bbg/fields"
authentication:
type: bearer
token: "$secrets.bloomberg_api_key"
resources:
- name: quotes
path: "/snapshots/{{ticker}}"
inputParameters:
- name: ticker
in: path
operations:
- name: get-quote
method: GET
- type: http
namespace: treasury
baseUri: "https://treasury.block.xyz/api/v1"
authentication:
type: bearer
token: "$secrets.treasury_api_token"
resources:
- name: balances
path: "/accounts/{{account}}/balance"
inputParameters:
- name: account
in: path
operations:
- name: get-balance
method: GET
- name: trades
path: "/trades"
operations:
- name: execute-trade
method: POST
- type: http
namespace: snowflake
baseUri: "https://block.snowflakecomputing.com/api/v2"
authentication:
type: bearer
token: "$secrets.snowflake_token"
resources:
- name: statements
path: "/statements"
operations:
- name: execute-statement
method: POST
Retrieves the current Bitcoin wallet balance for a Cash App business account, converts to USD, and logs the balance snapshot in PostgreSQL.
naftiko: "0.5"
info:
label: "Bitcoin Wallet Balance Check"
description: "Retrieves the current Bitcoin wallet balance for a Cash App business account, converts to USD, and logs the balance snapshot in PostgreSQL."
tags:
- bitcoin
- crypto
- cash-app
- postgresql
- fintech
capability:
exposes:
- type: mcp
namespace: btc-wallet
port: 8080
tools:
- name: check-btc-balance
description: "Fetch BTC wallet balance, convert to USD, and log the snapshot."
inputParameters:
- name: wallet_address
in: body
type: string
description: "The Bitcoin wallet address."
steps:
- name: get-balance
type: call
call: "bitcoin.get-wallet-balance"
with:
address: "{{wallet_address}}"
- name: get-rate
type: call
call: "bitcoin.get-price"
with:
currency_pair: "BTC-USD"
- name: log-snapshot
type: call
call: "postgresql.insert-row"
with:
table: "btc_balance_snapshots"
wallet_address: "{{wallet_address}}"
btc_balance: "{{get-balance.balance}}"
usd_rate: "{{get-rate.USD.last}}"
snapshot_time: "{{now}}"
consumes:
- type: http
namespace: bitcoin
baseUri: "https://api.blockchain.info/v2"
authentication:
type: bearer
token: "$secrets.blockchain_api_token"
resources:
- name: wallet
path: "/address/{{address}}/balance"
inputParameters:
- name: address
in: path
operations:
- name: get-wallet-balance
method: GET
- name: ticker
path: "/ticker"
operations:
- name: get-price
method: GET
- type: http
namespace: postgresql
baseUri: "https://block-data.internal/api/v1"
authentication:
type: bearer
token: "$secrets.internal_db_token"
resources:
- name: rows
path: "/tables/{{table}}/rows"
inputParameters:
- name: table
in: path
operations:
- name: insert-row
method: POST
Fetches Bloomberg Intelligence market data for treasury management decisions related to Block's cash reserves and Bitcoin holdings.
naftiko: "0.5"
info:
label: "Bloomberg Market Data for Treasury"
description: "Fetches Bloomberg Intelligence market data for treasury management decisions related to Block's cash reserves and Bitcoin holdings."
tags:
- treasury
- bloomberg-intelligence
- fintech
capability:
exposes:
- type: mcp
namespace: treasury-data
port: 8080
tools:
- name: get-market-data
description: "Retrieve Bloomberg market data for a given security ticker."
inputParameters:
- name: ticker
in: body
type: string
description: "The Bloomberg security ticker (e.g. SQ US Equity, XBTUSD)."
call: "bloomberg.get-security-data"
with:
securities:
- "{{ticker}}"
fields:
- "PX_LAST"
- "PX_VOLUME"
- "VOLATILITY_30D"
consumes:
- type: http
namespace: bloomberg
baseUri: "https://bql.bloomberg.com/api/v1"
authentication:
type: bearer
token: "$secrets.bloomberg_token"
resources:
- name: security-data
path: "/data"
operations:
- name: get-security-data
method: POST
Verifies a Cash App account by cashtag, returning account status, verification level, and basic profile information for compliance checks.
naftiko: "0.5"
info:
label: "Cash App Account Verification"
description: "Verifies a Cash App account by cashtag, returning account status, verification level, and basic profile information for compliance checks."
tags:
- verification
- cash-app
capability:
exposes:
- type: mcp
namespace: cash-app-verify
port: 8080
tools:
- name: verify-account
description: "Verify a Cash App account by cashtag."
inputParameters:
- name: cashtag
in: body
type: string
description: "The Cash App cashtag (e.g. $username)."
call: "cashapp.verify-account"
with:
cashtag: "{{cashtag}}"
consumes:
- type: http
namespace: cashapp
baseUri: "https://api.cash.app/v1"
authentication:
type: bearer
token: "$secrets.cashapp_api_token"
resources:
- name: accounts
path: "/accounts/verify"
inputParameters:
- name: cashtag
in: query
operations:
- name: verify-account
method: GET
Processes a Bitcoin purchase through Cash App by verifying the user, fetching the current price from Bloomberg, executing the buy, and sending a receipt via SendGrid.
naftiko: "0.5"
info:
label: "Cash App Bitcoin Purchase Flow"
description: "Processes a Bitcoin purchase through Cash App by verifying the user, fetching the current price from Bloomberg, executing the buy, and sending a receipt via SendGrid."
tags:
- bitcoin
- cash-app
- bloomberg
- sendgrid
capability:
exposes:
- type: mcp
namespace: btc-purchase
port: 8080
tools:
- name: purchase-bitcoin
description: "Execute a Bitcoin purchase with price verification and receipt delivery."
inputParameters:
- name: user_id
in: body
type: string
description: "Cash App user ID."
- name: amount_usd
in: body
type: number
description: "Amount in USD to spend."
- name: user_email
in: body
type: string
description: "User email for receipt."
steps:
- name: verify-user
type: call
call: "cashapp.verify-identity"
with:
user_id: "{{user_id}}"
- name: get-price
type: call
call: "bloomberg.get-quote"
with:
ticker: "XBTUSD"
- name: execute-buy
type: call
call: "cashapp.buy-bitcoin"
with:
user_id: "{{user_id}}"
amount_usd: "{{amount_usd}}"
price: "{{get-price.last_price}}"
- name: send-receipt
type: call
call: "sendgrid.send-email"
with:
to: "{{user_email}}"
subject: "Bitcoin Purchase Confirmation"
body: "You purchased {{execute-buy.btc_amount}} BTC at ${{get-price.last_price}} for ${{amount_usd}}. Transaction: {{execute-buy.transaction_id}}."
consumes:
- type: http
namespace: cashapp
baseUri: "https://api.cash.app/v1"
authentication:
type: bearer
token: "$secrets.cashapp_api_token"
resources:
- name: identity
path: "/users/{{user_id}}/verify"
inputParameters:
- name: user_id
in: path
operations:
- name: verify-identity
method: POST
- name: bitcoin
path: "/bitcoin/buy"
operations:
- name: buy-bitcoin
method: POST
- type: http
namespace: bloomberg
baseUri: "https://api.bloomberg.com/eap/catalogs/bbg/fields"
authentication:
type: bearer
token: "$secrets.bloomberg_api_key"
resources:
- name: quotes
path: "/snapshots/{{ticker}}"
inputParameters:
- name: ticker
in: path
operations:
- name: get-quote
method: GET
- 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 a support ticket from ServiceNow, looks up the Cash App user profile, generates a response draft via OpenAI, and notifies the support lead via Slack.
naftiko: "0.5"
info:
label: "Cash App Customer Support Escalation"
description: "Retrieves a support ticket from ServiceNow, looks up the Cash App user profile, generates a response draft via OpenAI, and notifies the support lead via Slack."
tags:
- support
- servicenow
- cash-app
- openai
- slack
capability:
exposes:
- type: mcp
namespace: support-escalation
port: 8080
tools:
- name: escalate-ticket
description: "Escalate a support ticket with AI-assisted response drafting."
inputParameters:
- name: incident_number
in: body
type: string
description: "ServiceNow incident number."
- name: user_id
in: body
type: string
description: "Cash App user ID."
steps:
- name: get-ticket
type: call
call: "servicenow.get-incident"
with:
number: "{{incident_number}}"
- name: get-user
type: call
call: "cashapp.get-user-profile"
with:
user_id: "{{user_id}}"
- name: draft-response
type: call
call: "openai.create-completion"
with:
model: "gpt-4"
prompt: "Draft a support response for: {{get-ticket.description}}. User: {{get-user.display_name}}. Account status: {{get-user.status}}."
- name: notify-lead
type: call
call: "slack.post-message"
with:
channel: "#support-escalations"
text: "Escalation: {{incident_number}}. User: {{get-user.display_name}}. Issue: {{get-ticket.short_description}}. Draft response ready for review."
consumes:
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: incidents
path: "/table/incident"
inputParameters:
- name: number
in: query
operations:
- name: get-incident
method: GET
- type: http
namespace: cashapp
baseUri: "https://api.cash.app/v1"
authentication:
type: bearer
token: "$secrets.cashapp_api_token"
resources:
- name: users
path: "/users/{{user_id}}"
inputParameters:
- name: user_id
in: path
operations:
- name: get-user-profile
method: GET
- type: http
namespace: openai
baseUri: "https://api.openai.com/v1"
authentication:
type: bearer
token: "$secrets.openai_api_key"
resources:
- name: completions
path: "/chat/completions"
operations:
- name: create-completion
method: POST
- type: http
namespace: slack
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
Enrolls a Cash App user in direct deposit by verifying identity, provisioning a routing number, updating the user profile, and sending confirmation via SendGrid.
naftiko: "0.5"
info:
label: "Cash App Direct Deposit Enrollment"
description: "Enrolls a Cash App user in direct deposit by verifying identity, provisioning a routing number, updating the user profile, and sending confirmation via SendGrid."
tags:
- banking
- cash-app
- sendgrid
capability:
exposes:
- type: mcp
namespace: direct-deposit
port: 8080
tools:
- name: enroll-direct-deposit
description: "Set up direct deposit for a Cash App user with identity verification and confirmation."
inputParameters:
- name: user_id
in: body
type: string
description: "Cash App user identifier."
- name: user_email
in: body
type: string
description: "User email for confirmation."
steps:
- name: verify-identity
type: call
call: "cashapp.verify-identity"
with:
user_id: "{{user_id}}"
- name: provision-routing
type: call
call: "cashapp.create-direct-deposit"
with:
user_id: "{{user_id}}"
- name: send-confirmation
type: call
call: "sendgrid.send-email"
with:
to: "{{user_email}}"
subject: "Direct Deposit Activated"
body: "Your direct deposit is set up! Routing: {{provision-routing.routing_number}}. Account: {{provision-routing.account_number_last4}}."
consumes:
- type: http
namespace: cashapp
baseUri: "https://api.cash.app/v1"
authentication:
type: bearer
token: "$secrets.cashapp_api_token"
resources:
- name: identity
path: "/users/{{user_id}}/verify"
inputParameters:
- name: user_id
in: path
operations:
- name: verify-identity
method: POST
- name: direct-deposit
path: "/users/{{user_id}}/direct-deposit"
inputParameters:
- name: user_id
in: path
operations:
- name: create-direct-deposit
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
Investigates a flagged Cash App transaction by retrieving details, running risk scoring via Mastercard, logging findings in ServiceNow, and alerting the fraud team via Slack.
naftiko: "0.5"
info:
label: "Cash App Fraud Investigation Pipeline"
description: "Investigates a flagged Cash App transaction by retrieving details, running risk scoring via Mastercard, logging findings in ServiceNow, and alerting the fraud team via Slack."
tags:
- fraud
- cash-app
- mastercard
- servicenow
- slack
capability:
exposes:
- type: mcp
namespace: fraud-investigation
port: 8080
tools:
- name: investigate-transaction
description: "Investigate a flagged transaction across Cash App, Mastercard risk, and ServiceNow."
inputParameters:
- name: transaction_id
in: body
type: string
description: "The Cash App transaction identifier."
steps:
- name: get-transaction
type: call
call: "cashapp.get-transaction"
with:
transaction_id: "{{transaction_id}}"
- name: score-risk
type: call
call: "mastercard.score-transaction"
with:
amount: "{{get-transaction.amount}}"
merchant_category: "{{get-transaction.merchant_category}}"
country: "{{get-transaction.country}}"
- name: log-case
type: call
call: "servicenow.create-incident"
with:
short_description: "Fraud investigation: txn {{transaction_id}}"
description: "Amount: ${{get-transaction.amount}}. Risk score: {{score-risk.score}}. Category: {{get-transaction.merchant_category}}."
category: "fraud"
urgency: "1"
- name: alert-team
type: call
call: "slack.post-message"
with:
channel: "#fraud-ops"
text: "Fraud case opened: {{transaction_id}}. Amount: ${{get-transaction.amount}}. Risk: {{score-risk.score}}. ServiceNow: {{log-case.number}}."
consumes:
- type: http
namespace: cashapp
baseUri: "https://api.cash.app/v1"
authentication:
type: bearer
token: "$secrets.cashapp_api_token"
resources:
- name: transactions
path: "/transactions/{{transaction_id}}"
inputParameters:
- name: transaction_id
in: path
operations:
- name: get-transaction
method: GET
- type: http
namespace: mastercard
baseUri: "https://api.mastercard.com/fraud/v1"
authentication:
type: oauth1
consumer_key: "$secrets.mastercard_consumer_key"
signing_key: "$secrets.mastercard_signing_key"
resources:
- name: scoring
path: "/transaction-risk"
operations:
- name: score-transaction
method: POST
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: incidents
path: "/table/incident"
operations:
- name: create-incident
method: POST
- type: http
namespace: slack
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
Checks the status of a Cash App Pay transaction by payment ID, returning approval state, sender, and settlement timestamp.
naftiko: "0.5"
info:
label: "Cash App Pay Status Check"
description: "Checks the status of a Cash App Pay transaction by payment ID, returning approval state, sender, and settlement timestamp."
tags:
- payments
- cash-app
- fintech
capability:
exposes:
- type: mcp
namespace: cashapp-payments
port: 8080
tools:
- name: get-cashapp-payment
description: "Retrieve the status and details of a Cash App Pay payment."
inputParameters:
- name: payment_id
in: body
type: string
description: "The Cash App payment identifier."
call: "square.get-payment"
with:
payment_id: "{{payment_id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: payments
path: "/payments/{{payment_id}}"
inputParameters:
- name: payment_id
in: path
operations:
- name: get-payment
method: GET
Queries recent Cash App P2P transfers for a given cashtag, enriches with Bitcoin conversion rates, and stores the summary in PostgreSQL for compliance reporting.
naftiko: "0.5"
info:
label: "Cash App Peer-to-Peer Transfer Tracker"
description: "Queries recent Cash App P2P transfers for a given cashtag, enriches with Bitcoin conversion rates, and stores the summary in PostgreSQL for compliance reporting."
tags:
- cash-app
- bitcoin
- postgresql
- compliance
- fintech
capability:
exposes:
- type: mcp
namespace: cashapp-p2p
port: 8080
tools:
- name: track-p2p-transfers
description: "Query recent P2P transfers, enrich with BTC rates, and store for compliance."
inputParameters:
- name: cashtag
in: body
type: string
description: "The Cash App cashtag to query."
- name: start_date
in: body
type: string
description: "Start date in YYYY-MM-DD format."
- name: end_date
in: body
type: string
description: "End date in YYYY-MM-DD format."
steps:
- name: get-transfers
type: call
call: "cashapp.list-transfers"
with:
cashtag: "{{cashtag}}"
start_date: "{{start_date}}"
end_date: "{{end_date}}"
- name: get-btc-rate
type: call
call: "bitcoin.get-price"
with:
currency_pair: "BTC-USD"
- name: store-summary
type: call
call: "postgresql.insert-row"
with:
table: "p2p_transfer_audit"
cashtag: "{{cashtag}}"
period_start: "{{start_date}}"
period_end: "{{end_date}}"
transfer_count: "{{get-transfers.total_count}}"
total_usd: "{{get-transfers.total_amount}}"
btc_rate_at_query: "{{get-btc-rate.USD.last}}"
consumes:
- type: http
namespace: cashapp
baseUri: "https://api.cash.app/v1"
authentication:
type: bearer
token: "$secrets.cashapp_api_token"
resources:
- name: transfers
path: "/transfers"
operations:
- name: list-transfers
method: GET
- type: http
namespace: bitcoin
baseUri: "https://api.blockchain.info/v2"
authentication:
type: bearer
token: "$secrets.blockchain_api_token"
resources:
- name: ticker
path: "/ticker"
operations:
- name: get-price
method: GET
- type: http
namespace: postgresql
baseUri: "https://block-data.internal/api/v1"
authentication:
type: bearer
token: "$secrets.internal_db_token"
resources:
- name: rows
path: "/tables/{{table}}/rows"
inputParameters:
- name: table
in: path
operations:
- name: insert-row
method: POST
Creates a Cloudflare WAF rule to protect Block's payment API endpoints from suspicious traffic patterns.
naftiko: "0.5"
info:
label: "Cloudflare WAF Rule for Payment Endpoints"
description: "Creates a Cloudflare WAF rule to protect Block's payment API endpoints from suspicious traffic patterns."
tags:
- security
- cloudflare
- payments
- waf
capability:
exposes:
- type: mcp
namespace: waf-management
port: 8080
tools:
- name: create-payment-waf-rule
description: "Create a Cloudflare WAF rule to protect payment endpoints."
inputParameters:
- name: zone_id
in: body
type: string
description: "The Cloudflare zone ID."
- name: rule_expression
in: body
type: string
description: "The WAF rule expression (Cloudflare filter syntax)."
- name: action
in: body
type: string
description: "The action to take (block, challenge, managed_challenge)."
call: "cloudflare.create-firewall-rule"
with:
zone_id: "{{zone_id}}"
filter:
expression: "{{rule_expression}}"
action: "{{action}}"
consumes:
- type: http
namespace: cloudflare
baseUri: "https://api.cloudflare.com/client/v4"
authentication:
type: bearer
token: "$secrets.cloudflare_api_token"
resources:
- name: firewall-rules
path: "/zones/{{zone_id}}/firewall/rules"
inputParameters:
- name: zone_id
in: path
operations:
- name: create-firewall-rule
method: POST
Checks the status of an AWS CloudFormation stack deployment used for Block's infrastructure provisioning.
naftiko: "0.5"
info:
label: "CloudFormation Stack Deployment Status"
description: "Checks the status of an AWS CloudFormation stack deployment used for Block's infrastructure provisioning."
tags:
- infrastructure
- cloudformation
- amazon-web-services
capability:
exposes:
- type: mcp
namespace: infra-stacks
port: 8080
tools:
- name: get-stack-status
description: "Retrieve the status of a CloudFormation stack."
inputParameters:
- name: stack_name
in: body
type: string
description: "The CloudFormation stack name."
call: "cloudformation.describe-stack"
with:
StackName: "{{stack_name}}"
consumes:
- type: http
namespace: cloudformation
baseUri: "https://cloudformation.us-east-1.amazonaws.com"
authentication:
type: awsSigV4
accessKeyId: "$secrets.aws_access_key_id"
secretAccessKey: "$secrets.aws_secret_access_key"
region: "us-east-1"
service: "cloudformation"
resources:
- name: stacks
path: "/"
operations:
- name: describe-stack
method: GET
Queries CloudWatch metrics for Block's Bitcoin node infrastructure, returning block height sync status, peer connections, and mempool size.
naftiko: "0.5"
info:
label: "CloudWatch Bitcoin Node Monitor"
description: "Queries CloudWatch metrics for Block's Bitcoin node infrastructure, returning block height sync status, peer connections, and mempool size."
tags:
- bitcoin
- cloudwatch
capability:
exposes:
- type: mcp
namespace: btc-node-monitor
port: 8080
tools:
- name: get-node-metrics
description: "Retrieve CloudWatch metrics for Bitcoin node health."
inputParameters:
- name: node_id
in: body
type: string
description: "The Bitcoin node instance identifier."
call: "cloudwatch.get-metrics"
with:
namespace: "Bitcoin/Nodes"
dimensions: "NodeId={{node_id}}"
consumes:
- type: http
namespace: cloudwatch
baseUri: "https://monitoring.us-east-1.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: metrics
path: "/"
inputParameters:
- name: namespace
in: query
- name: dimensions
in: query
operations:
- name: get-metrics
method: GET
Queries CloudWatch metrics for Square payment API p99 latency and triggers a Datadog alert when the threshold is exceeded.
naftiko: "0.5"
info:
label: "CloudWatch Payment Latency Monitor"
description: "Queries CloudWatch metrics for Square payment API p99 latency and triggers a Datadog alert when the threshold is exceeded."
tags:
- monitoring
- cloudwatch
- datadog
- payments
- observability
capability:
exposes:
- type: mcp
namespace: latency-monitor
port: 8080
tools:
- name: check-payment-latency
description: "Query CloudWatch for payment API latency and alert via Datadog if above threshold."
inputParameters:
- name: metric_name
in: body
type: string
description: "The CloudWatch metric name."
- name: threshold_ms
in: body
type: integer
description: "The latency threshold in milliseconds."
steps:
- name: get-metric
type: call
call: "cloudwatch.get-metric-statistics"
with:
Namespace: "Block/Payments"
MetricName: "{{metric_name}}"
Period: 300
Statistics:
- "p99"
- name: create-alert
type: call
call: "datadog.create-event"
with:
title: "Payment latency alert: {{metric_name}} p99 exceeded {{threshold_ms}}ms"
text: "CloudWatch metric {{metric_name}} p99 value: {{get-metric.Datapoints.0.p99}}ms (threshold: {{threshold_ms}}ms)."
alert_type: "warning"
tags:
- "service:payments"
- "metric:{{metric_name}}"
consumes:
- type: http
namespace: cloudwatch
baseUri: "https://monitoring.us-east-1.amazonaws.com"
authentication:
type: awsSigV4
accessKeyId: "$secrets.aws_access_key_id"
secretAccessKey: "$secrets.aws_secret_access_key"
region: "us-east-1"
service: "monitoring"
resources:
- name: metrics
path: "/"
operations:
- name: get-metric-statistics
method: GET
- type: http
namespace: datadog
baseUri: "https://api.datadoghq.com/api/v1"
authentication:
type: apiKey
name: "DD-API-KEY"
in: header
value: "$secrets.datadog_api_key"
resources:
- name: events
path: "/events"
operations:
- name: create-event
method: POST
Screens a Cash App user against sanctions lists, logs results in S3, creates a compliance case in ServiceNow, and alerts the compliance team via Slack.
naftiko: "0.5"
info:
label: "Compliance AML Screening Pipeline"
description: "Screens a Cash App user against sanctions lists, logs results in S3, creates a compliance case in ServiceNow, and alerts the compliance team via Slack."
tags:
- compliance
- cash-app
- amazon-s3
- servicenow
- slack
capability:
exposes:
- type: mcp
namespace: aml-screening
port: 8080
tools:
- name: screen-user
description: "Run AML screening for a Cash App user with case creation and alerting."
inputParameters:
- name: user_id
in: body
type: string
description: "Cash App user identifier."
- name: full_name
in: body
type: string
description: "User full legal name."
steps:
- name: run-screening
type: call
call: "cashapp.screen-user"
with:
user_id: "{{user_id}}"
name: "{{full_name}}"
- name: store-results
type: call
call: "s3.put-object"
with:
bucket: "compliance-screening"
key: "aml/{{user_id}}/{{run-screening.screening_id}}.json"
body: "{{run-screening.results}}"
- name: create-case
type: call
call: "servicenow.create-incident"
with:
short_description: "AML screening: {{full_name}} ({{user_id}})"
description: "Screening ID: {{run-screening.screening_id}}. Matches: {{run-screening.match_count}}. Results stored in S3."
category: "compliance"
- name: alert-compliance
type: call
call: "slack.post-message"
with:
channel: "#compliance-alerts"
text: "AML screening complete: {{full_name}}. Matches: {{run-screening.match_count}}. Case: {{create-case.number}}."
consumes:
- type: http
namespace: cashapp
baseUri: "https://api.cash.app/v1"
authentication:
type: bearer
token: "$secrets.cashapp_api_token"
resources:
- name: screening
path: "/compliance/screen"
operations:
- name: screen-user
method: POST
- type: http
namespace: s3
baseUri: "https://s3.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: objects
path: "/{{bucket}}/{{key}}"
inputParameters:
- name: bucket
in: path
- name: key
in: path
operations:
- name: put-object
method: PUT
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: incidents
path: "/table/incident"
operations:
- name: create-incident
method: POST
- type: http
namespace: slack
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 merchant applies, validates their identity through the Square Merchants API, cross-references with Mastercard sanctions screening, and logs the KYC decision in PostgreSQL.
naftiko: "0.5"
info:
label: "Compliance KYC Verification Pipeline"
description: "When a new merchant applies, validates their identity through the Square Merchants API, cross-references with Mastercard sanctions screening, and logs the KYC decision in PostgreSQL."
tags:
- compliance
- kyc
- square
- mastercard
- postgresql
- fintech
capability:
exposes:
- type: mcp
namespace: kyc-verification
port: 8080
tools:
- name: verify-merchant-kyc
description: "Run KYC checks on a merchant application using Square and Mastercard, then log the result."
inputParameters:
- name: merchant_id
in: body
type: string
description: "The Square merchant ID."
- name: business_name
in: body
type: string
description: "The registered business name."
- name: country
in: body
type: string
description: "Country of incorporation."
steps:
- name: get-merchant
type: call
call: "square.get-merchant"
with:
merchant_id: "{{merchant_id}}"
- name: sanctions-check
type: call
call: "mastercard.screen-entity"
with:
entity_name: "{{business_name}}"
country: "{{country}}"
- name: log-kyc-result
type: call
call: "postgresql.insert-row"
with:
table: "kyc_decisions"
merchant_id: "{{merchant_id}}"
business_name: "{{business_name}}"
sanctions_status: "{{sanctions-check.status}}"
merchant_status: "{{get-merchant.merchant.status}}"
decision_date: "{{now}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: merchants
path: "/merchants/{{merchant_id}}"
inputParameters:
- name: merchant_id
in: path
operations:
- name: get-merchant
method: GET
- type: http
namespace: mastercard
baseUri: "https://api.mastercard.com/screening/v1"
authentication:
type: oauth1
consumerKey: "$secrets.mastercard_consumer_key"
signingKey: "$secrets.mastercard_signing_key"
resources:
- name: entities
path: "/entities/screen"
operations:
- name: screen-entity
method: POST
- type: http
namespace: postgresql
baseUri: "https://block-data.internal/api/v1"
authentication:
type: bearer
token: "$secrets.internal_db_token"
resources:
- name: rows
path: "/tables/{{table}}/rows"
inputParameters:
- name: table
in: path
operations:
- name: insert-row
method: POST
Triggers a database backup via AWS RDS, verifies backup integrity, stores verification logs in S3, and notifies the DBA team via Slack.
naftiko: "0.5"
info:
label: "Database Backup Verification Pipeline"
description: "Triggers a database backup via AWS RDS, verifies backup integrity, stores verification logs in S3, and notifies the DBA team via Slack."
tags:
- database
- amazon-web-services
- amazon-s3
- slack
capability:
exposes:
- type: mcp
namespace: db-backup
port: 8080
tools:
- name: verify-backup
description: "Trigger and verify a database backup with logging and notification."
inputParameters:
- name: db_instance_id
in: body
type: string
description: "RDS database instance identifier."
steps:
- name: create-snapshot
type: call
call: "rds.create-snapshot"
with:
db_instance_id: "{{db_instance_id}}"
snapshot_id: "{{db_instance_id}}-backup"
- name: verify-snapshot
type: call
call: "rds.describe-snapshot"
with:
snapshot_id: "{{create-snapshot.snapshot_id}}"
- name: log-result
type: call
call: "s3.put-object"
with:
bucket: "backup-verification"
key: "{{db_instance_id}}/{{create-snapshot.snapshot_id}}.json"
body: "{{verify-snapshot.status}}"
- name: notify-dba
type: call
call: "slack.post-message"
with:
channel: "#dba-ops"
text: "Backup verified: {{db_instance_id}}. Snapshot: {{create-snapshot.snapshot_id}}. Status: {{verify-snapshot.status}}. Size: {{verify-snapshot.allocated_storage}}GB."
consumes:
- type: http
namespace: rds
baseUri: "https://rds.us-east-1.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: snapshots
path: "/"
operations:
- name: create-snapshot
method: POST
- name: describe-snapshot
method: GET
- type: http
namespace: s3
baseUri: "https://s3.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: objects
path: "/{{bucket}}/{{key}}"
inputParameters:
- name: bucket
in: path
- name: key
in: path
operations:
- name: put-object
method: PUT
- type: http
namespace: slack
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 Datadog APM trace by trace ID for debugging Square API latency issues.
naftiko: "0.5"
info:
label: "Datadog APM Trace Lookup"
description: "Retrieves a Datadog APM trace by trace ID for debugging Square API latency issues."
tags:
- observability
- datadog
- debugging
capability:
exposes:
- type: mcp
namespace: apm-traces
port: 8080
tools:
- name: get-trace
description: "Retrieve a Datadog APM trace by its ID."
inputParameters:
- name: trace_id
in: body
type: string
description: "The Datadog trace ID."
call: "datadog.get-trace"
with:
trace_id: "{{trace_id}}"
consumes:
- type: http
namespace: datadog
baseUri: "https://api.datadoghq.com/api/v2"
authentication:
type: apiKey
name: "DD-API-KEY"
in: header
value: "$secrets.datadog_api_key"
resources:
- name: traces
path: "/traces/{{trace_id}}"
inputParameters:
- name: trace_id
in: path
operations:
- name: get-trace
method: GET
Queries Datadog for payment processing error rates across Square services, returning error counts, rates, and top error codes for a given time window.
naftiko: "0.5"
info:
label: "Datadog Payment Error Rate"
description: "Queries Datadog for payment processing error rates across Square services, returning error counts, rates, and top error codes for a given time window."
tags:
- observability
- datadog
capability:
exposes:
- type: mcp
namespace: payment-errors
port: 8080
tools:
- name: get-error-rate
description: "Retrieve payment error rate metrics from Datadog."
inputParameters:
- name: service
in: body
type: string
description: "The payment service name."
- name: period
in: body
type: string
description: "Time period to query (e.g. 1h, 6h, 24h)."
call: "datadog.query-metrics"
with:
query: "sum:payments.errors{service:{{service}}}.as_rate()"
from: "{{period}}"
consumes:
- type: http
namespace: datadog
baseUri: "https://api.datadoghq.com/api/v1"
authentication:
type: apiKey
name: "DD-API-KEY"
in: header
value: "$secrets.datadog_api_key"
resources:
- name: metrics
path: "/query"
inputParameters:
- name: query
in: query
- name: from
in: query
operations:
- name: query-metrics
method: GET
Manages API key rotation by generating a new key in Square, updating the secret in AWS Secrets Manager, notifying the developer via SendGrid, and logging in ServiceNow.
naftiko: "0.5"
info:
label: "Developer API Key Lifecycle Pipeline"
description: "Manages API key rotation by generating a new key in Square, updating the secret in AWS Secrets Manager, notifying the developer via SendGrid, and logging in ServiceNow."
tags:
- developer-platform
- square
- amazon-web-services
- sendgrid
- servicenow
capability:
exposes:
- type: mcp
namespace: api-key-lifecycle
port: 8080
tools:
- name: rotate-api-key
description: "Rotate a developer API key with secret storage update and notification."
inputParameters:
- name: application_id
in: body
type: string
description: "The Square application identifier."
- name: developer_email
in: body
type: string
description: "Developer contact email."
steps:
- name: generate-key
type: call
call: "square.rotate-access-token"
with:
application_id: "{{application_id}}"
- name: store-secret
type: call
call: "aws-secrets.update-secret"
with:
secret_id: "square/{{application_id}}/access-token"
secret_value: "{{generate-key.access_token}}"
- name: notify-developer
type: call
call: "sendgrid.send-email"
with:
to: "{{developer_email}}"
subject: "API Key Rotated — {{application_id}}"
body: "Your Square API key has been rotated. Please update your integration. New key prefix: {{generate-key.token_prefix}}."
- name: log-rotation
type: call
call: "servicenow.create-change-request"
with:
short_description: "API key rotation: {{application_id}}"
description: "API key rotated for application {{application_id}}. Developer: {{developer_email}}."
category: "security"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: oauth
path: "/oauth2/token/revoke"
operations:
- name: rotate-access-token
method: POST
- type: http
namespace: aws-secrets
baseUri: "https://secretsmanager.us-east-1.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: secrets
path: "/"
operations:
- name: update-secret
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
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: changes
path: "/table/change_request"
operations:
- name: create-change-request
method: POST
Rotates a Square developer application OAuth token, stores the new credentials in AWS Secrets Manager, and logs the rotation event in CloudWatch.
naftiko: "0.5"
info:
label: "Developer Application Key Rotation"
description: "Rotates a Square developer application OAuth token, stores the new credentials in AWS Secrets Manager, and logs the rotation event in CloudWatch."
tags:
- developer-platform
- security
- square
- amazon-web-services
- cloudwatch
capability:
exposes:
- type: mcp
namespace: key-rotation
port: 8080
tools:
- name: rotate-oauth-token
description: "Rotate a Square OAuth token, update secrets storage, and log the rotation."
inputParameters:
- name: application_id
in: body
type: string
description: "The Square application ID."
- name: current_refresh_token
in: body
type: string
description: "The current OAuth refresh token."
steps:
- name: refresh-token
type: call
call: "square.obtain-token"
with:
client_id: "{{application_id}}"
grant_type: "refresh_token"
refresh_token: "{{current_refresh_token}}"
- name: store-secret
type: call
call: "aws.update-secret"
with:
SecretId: "square/oauth/{{application_id}}"
SecretString: "{\"access_token\":\"{{refresh-token.access_token}}\",\"refresh_token\":\"{{refresh-token.refresh_token}}\"}"
- name: log-rotation
type: call
call: "cloudwatch.put-log-event"
with:
logGroupName: "/block/key-rotation"
logStreamName: "square-oauth"
message: "Token rotated for application {{application_id}} at {{refresh-token.expires_at}}."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/oauth2"
authentication:
type: bearer
token: "$secrets.square_client_secret"
resources:
- name: token
path: "/token"
operations:
- name: obtain-token
method: POST
- type: http
namespace: aws
baseUri: "https://secretsmanager.us-east-1.amazonaws.com"
authentication:
type: awsSigV4
accessKeyId: "$secrets.aws_access_key_id"
secretAccessKey: "$secrets.aws_secret_access_key"
region: "us-east-1"
service: "secretsmanager"
resources:
- name: secrets
path: "/"
operations:
- name: update-secret
method: POST
- type: http
namespace: cloudwatch
baseUri: "https://logs.us-east-1.amazonaws.com"
authentication:
type: awsSigV4
accessKeyId: "$secrets.aws_access_key_id"
secretAccessKey: "$secrets.aws_secret_access_key"
region: "us-east-1"
service: "logs"
resources:
- name: log-events
path: "/"
operations:
- name: put-log-event
method: POST
When a new hire is added, provisions laptop and equipment in ServiceNow, creates shipping labels, and sends onboarding instructions via SendGrid.
naftiko: "0.5"
info:
label: "Employee Equipment Provisioning Workflow"
description: "When a new hire is added, provisions laptop and equipment in ServiceNow, creates shipping labels, and sends onboarding instructions via SendGrid."
tags:
- hr
- servicenow
- sendgrid
capability:
exposes:
- type: mcp
namespace: equipment-provisioning
port: 8080
tools:
- name: provision-equipment
description: "Provision and ship equipment for a new Block employee."
inputParameters:
- name: employee_name
in: body
type: string
description: "New hire full name."
- name: employee_email
in: body
type: string
description: "New hire email."
- name: shipping_address
in: body
type: string
description: "Shipping address for equipment delivery."
steps:
- name: create-request
type: call
call: "servicenow.create-request"
with:
short_description: "Equipment for {{employee_name}}"
description: "Laptop, monitor, and peripherals for new hire {{employee_name}}. Ship to: {{shipping_address}}."
category: "hardware"
- name: create-asset
type: call
call: "servicenow.create-asset"
with:
name: "Laptop — {{employee_name}}"
assigned_to: "{{employee_email}}"
category: "Laptop"
- name: send-instructions
type: call
call: "sendgrid.send-email"
with:
to: "{{employee_email}}"
subject: "Welcome to Block — Equipment Shipping"
body: "Welcome {{employee_name}}! Your equipment is being prepared. Request: {{create-request.number}}. Shipping to: {{shipping_address}}."
consumes:
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: requests
path: "/table/sc_request"
operations:
- name: create-request
method: POST
- name: assets
path: "/table/alm_hardware"
operations:
- name: create-asset
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 health status of F5 load balancer pool members for Block's payment API gateway.
naftiko: "0.5"
info:
label: "F5 Load Balancer Pool Status"
description: "Retrieves the health status of F5 load balancer pool members for Block's payment API gateway."
tags:
- load-balancing
- f5-networks
- infrastructure
- payments
capability:
exposes:
- type: mcp
namespace: f5-health
port: 8080
tools:
- name: get-pool-status
description: "Retrieve F5 load balancer pool member health."
inputParameters:
- name: pool_name
in: body
type: string
description: "The F5 pool name."
call: "f5.get-pool-members"
with:
pool_name: "{{pool_name}}"
consumes:
- type: http
namespace: f5
baseUri: "https://f5-bigip.block.internal/mgmt/tm/ltm"
authentication:
type: basic
username: "$secrets.f5_user"
password: "$secrets.f5_password"
resources:
- name: pool-members
path: "/pool/~Common~{{pool_name}}/members"
inputParameters:
- name: pool_name
in: path
operations:
- name: get-pool-members
method: GET
Retrieves the latest commit status and branch protection details for a Block GitHub repository, returning CI check results and merge requirements.
naftiko: "0.5"
info:
label: "GitHub Repository Status"
description: "Retrieves the latest commit status and branch protection details for a Block GitHub repository, returning CI check results and merge requirements."
tags:
- devops
- github
capability:
exposes:
- type: mcp
namespace: github-repo
port: 8080
tools:
- name: get-repo-status
description: "Get the latest commit status for a repository branch."
inputParameters:
- name: repo
in: body
type: string
description: "Repository name in owner/repo format."
- name: branch
in: body
type: string
description: "Branch name."
call: "github.get-status"
with:
repo: "{{repo}}"
branch: "{{branch}}"
consumes:
- type: http
namespace: github
baseUri: "https://api.github.com"
authentication:
type: bearer
token: "$secrets.github_token"
resources:
- name: statuses
path: "/repos/{{repo}}/commits/{{branch}}/status"
inputParameters:
- name: repo
in: path
- name: branch
in: path
operations:
- name: get-status
method: GET
Retrieves the status of the latest GitLab CI pipeline for a Block payment service repository.
naftiko: "0.5"
info:
label: "GitLab CI Pipeline Status"
description: "Retrieves the status of the latest GitLab CI pipeline for a Block payment service repository."
tags:
- ci-cd
- gitlab
- developer-platform
capability:
exposes:
- type: mcp
namespace: gitlab-ci
port: 8080
tools:
- name: get-pipeline-status
description: "Fetch the latest GitLab CI pipeline status for a project."
inputParameters:
- name: project_id
in: body
type: string
description: "The GitLab project ID."
call: "gitlab.get-latest-pipeline"
with:
project_id: "{{project_id}}"
consumes:
- type: http
namespace: gitlab
baseUri: "https://gitlab.block.internal/api/v4"
authentication:
type: bearer
token: "$secrets.gitlab_token"
resources:
- name: pipelines
path: "/projects/{{project_id}}/pipelines/latest"
inputParameters:
- name: project_id
in: path
operations:
- name: get-latest-pipeline
method: GET
Creates a HubSpot contact when a new merchant lead signs up for Square, enriches with ZoomInfo data, and sends a welcome email via MailChimp.
naftiko: "0.5"
info:
label: "HubSpot Merchant Lead Capture"
description: "Creates a HubSpot contact when a new merchant lead signs up for Square, enriches with ZoomInfo data, and sends a welcome email via MailChimp."
tags:
- sales
- hubspot
- zoominfo
- mailchimp
- merchant-services
capability:
exposes:
- type: mcp
namespace: lead-capture
port: 8080
tools:
- name: capture-merchant-lead
description: "Create a CRM contact, enrich with firmographics, and send a welcome campaign."
inputParameters:
- name: email
in: body
type: string
description: "The merchant lead's email address."
- name: business_name
in: body
type: string
description: "The business name."
- name: first_name
in: body
type: string
description: "Contact first name."
- name: last_name
in: body
type: string
description: "Contact last name."
steps:
- name: create-contact
type: call
call: "hubspot.create-contact"
with:
properties:
email: "{{email}}"
firstname: "{{first_name}}"
lastname: "{{last_name}}"
company: "{{business_name}}"
- name: enrich
type: call
call: "zoominfo.search-company"
with:
companyName: "{{business_name}}"
- name: send-welcome
type: call
call: "mailchimp.send-transactional"
with:
to: "{{email}}"
subject: "Welcome to Square, {{first_name}}!"
body: "Thank you for your interest in Square. We see {{business_name}} is in the {{enrich.data.0.industry}} industry with approximately {{enrich.data.0.employeeCount}} employees. Let us tailor a solution for you."
consumes:
- type: http
namespace: hubspot
baseUri: "https://api.hubapi.com"
authentication:
type: bearer
token: "$secrets.hubspot_token"
resources:
- name: contacts
path: "/crm/v3/objects/contacts"
operations:
- name: create-contact
method: POST
- type: http
namespace: zoominfo
baseUri: "https://api.zoominfo.com/search"
authentication:
type: bearer
token: "$secrets.zoominfo_token"
resources:
- name: companies
path: "/company"
operations:
- name: search-company
method: POST
- type: http
namespace: mailchimp
baseUri: "https://mandrillapp.com/api/1.0"
authentication:
type: apiKey
name: "key"
in: body
value: "$secrets.mandrill_api_key"
resources:
- name: messages
path: "/messages/send"
operations:
- name: send-transactional
method: POST
When a payment processing outage is detected via Datadog, creates a ServiceNow P1 incident, posts a status update to the Square developer status page, and alerts the on-call team in CloudWatch.
naftiko: "0.5"
info:
label: "Incident Response for Payment Outage"
description: "When a payment processing outage is detected via Datadog, creates a ServiceNow P1 incident, posts a status update to the Square developer status page, and alerts the on-call team in CloudWatch."
tags:
- incident-response
- datadog
- servicenow
- cloudwatch
- payments
capability:
exposes:
- type: mcp
namespace: incident-response
port: 8080
tools:
- name: trigger-payment-outage-response
description: "Orchestrate the incident response flow for a payment processing outage."
inputParameters:
- name: alert_id
in: body
type: string
description: "The Datadog alert ID."
- name: severity
in: body
type: string
description: "Incident severity (P1, P2, P3)."
- name: affected_service
in: body
type: string
description: "The affected service name."
steps:
- name: get-alert
type: call
call: "datadog.get-event"
with:
event_id: "{{alert_id}}"
- name: create-incident
type: call
call: "servicenow.create-incident"
with:
short_description: "{{severity}} Payment outage: {{affected_service}}"
description: "Datadog alert {{alert_id}} triggered. Service: {{affected_service}}. Alert details: {{get-alert.event.text}}."
urgency: "1"
category: "payment_outage"
assigned_group: "Payments_Oncall"
- name: log-incident
type: call
call: "cloudwatch.put-log-event"
with:
logGroupName: "/block/incidents"
logStreamName: "payment-outages"
message: "{{severity}} incident {{create-incident.number}} created for {{affected_service}}. Datadog alert: {{alert_id}}."
consumes:
- type: http
namespace: datadog
baseUri: "https://api.datadoghq.com/api/v1"
authentication:
type: apiKey
name: "DD-API-KEY"
in: header
value: "$secrets.datadog_api_key"
resources:
- name: events
path: "/events/{{event_id}}"
inputParameters:
- name: event_id
in: path
operations:
- name: get-event
method: GET
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: incidents
path: "/table/incident"
operations:
- name: create-incident
method: POST
- type: http
namespace: cloudwatch
baseUri: "https://logs.us-east-1.amazonaws.com"
authentication:
type: awsSigV4
accessKeyId: "$secrets.aws_access_key_id"
secretAccessKey: "$secrets.aws_secret_access_key"
region: "us-east-1"
service: "logs"
resources:
- name: log-events
path: "/"
operations:
- name: put-log-event
method: POST
Monitors CloudWatch metrics for payment service load, scales EC2 instances via CloudFormation, updates the load balancer in F5, and logs the scaling event in ServiceNow.
naftiko: "0.5"
info:
label: "Infrastructure Scaling Automation"
description: "Monitors CloudWatch metrics for payment service load, scales EC2 instances via CloudFormation, updates the load balancer in F5, and logs the scaling event in ServiceNow."
tags:
- infrastructure
- cloudwatch
- cloudformation
- f5-networks
- servicenow
capability:
exposes:
- type: mcp
namespace: infra-scaling
port: 8080
tools:
- name: auto-scale-service
description: "Monitor load and scale payment infrastructure with tracking."
inputParameters:
- name: service_name
in: body
type: string
description: "Payment service name."
- name: target_capacity
in: body
type: integer
description: "Target instance count."
steps:
- name: check-load
type: call
call: "cloudwatch.get-metrics"
with:
namespace: "Payments"
metric_name: "RequestCount"
dimensions: "Service={{service_name}}"
- name: scale-instances
type: call
call: "cloudformation.update-stack"
with:
stack_name: "{{service_name}}-stack"
parameter_overrides: "DesiredCapacity={{target_capacity}}"
- name: update-lb
type: call
call: "f5.update-pool"
with:
pool_name: "{{service_name}}-pool"
member_count: "{{target_capacity}}"
- name: log-event
type: call
call: "servicenow.create-change-request"
with:
short_description: "Auto-scale: {{service_name}} to {{target_capacity}} instances"
description: "Load: {{check-load.average}}. Scaled from current to {{target_capacity}} instances."
category: "auto_scaling"
consumes:
- type: http
namespace: cloudwatch
baseUri: "https://monitoring.us-east-1.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: metrics
path: "/"
operations:
- name: get-metrics
method: GET
- type: http
namespace: cloudformation
baseUri: "https://cloudformation.us-east-1.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: stacks
path: "/"
operations:
- name: update-stack
method: POST
- type: http
namespace: f5
baseUri: "https://f5.block.xyz/mgmt/tm/ltm"
authentication:
type: basic
username: "$secrets.f5_user"
password: "$secrets.f5_password"
resources:
- name: pools
path: "/pool/{{pool_name}}"
inputParameters:
- name: pool_name
in: path
operations:
- name: update-pool
method: PATCH
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: changes
path: "/table/change_request"
operations:
- name: create-change-request
method: POST
After a Kotlin SDK build passes quality gates in GitLab, tags the release in GitLab, uploads the artifact to Amazon S3, and creates a YouTube developer tutorial notification.
naftiko: "0.5"
info:
label: "Kotlin SDK Release Publisher"
description: "After a Kotlin SDK build passes quality gates in GitLab, tags the release in GitLab, uploads the artifact to Amazon S3, and creates a YouTube developer tutorial notification."
tags:
- developer-platform
- kotlin
- gitlab
- amazon-s3
- youtube
- sdk
capability:
exposes:
- type: mcp
namespace: sdk-release
port: 8080
tools:
- name: publish-kotlin-sdk
description: "Tag, archive, and announce a new Kotlin SDK release."
inputParameters:
- name: project_id
in: body
type: string
description: "The GitLab project ID."
- name: version
in: body
type: string
description: "The semantic version for the release."
- name: release_notes
in: body
type: string
description: "Release notes for the changelog."
steps:
- name: create-release
type: call
call: "gitlab.create-release"
with:
project_id: "{{project_id}}"
tag_name: "v{{version}}"
description: "{{release_notes}}"
- name: upload-artifact
type: call
call: "s3.put-object"
with:
Bucket: "block-sdk-releases"
Key: "kotlin/square-sdk-{{version}}.jar"
ContentType: "application/java-archive"
- name: post-announcement
type: call
call: "youtube.insert-community-post"
with:
text: "Square Kotlin SDK v{{version}} is now available! Check the changelog and migration guide in our developer docs."
consumes:
- type: http
namespace: gitlab
baseUri: "https://gitlab.block.internal/api/v4"
authentication:
type: bearer
token: "$secrets.gitlab_token"
resources:
- name: releases
path: "/projects/{{project_id}}/releases"
inputParameters:
- name: project_id
in: path
operations:
- name: create-release
method: POST
- type: http
namespace: s3
baseUri: "https://s3.us-east-1.amazonaws.com"
authentication:
type: awsSigV4
accessKeyId: "$secrets.aws_access_key_id"
secretAccessKey: "$secrets.aws_secret_access_key"
region: "us-east-1"
service: "s3"
resources:
- name: objects
path: "/{{Bucket}}/{{Key}}"
inputParameters:
- name: Bucket
in: path
- name: Key
in: path
operations:
- name: put-object
method: PUT
- type: http
namespace: youtube
baseUri: "https://www.googleapis.com/youtube/v3"
authentication:
type: bearer
token: "$secrets.youtube_token"
resources:
- name: community-posts
path: "/activities"
operations:
- name: insert-community-post
method: POST
Monitors Square inventory counts, and when stock falls below a threshold, sends a reorder notification via MailChimp to the supplier and creates a ServiceNow procurement request.
naftiko: "0.5"
info:
label: "Low Inventory Reorder Alert"
description: "Monitors Square inventory counts, and when stock falls below a threshold, sends a reorder notification via MailChimp to the supplier and creates a ServiceNow procurement request."
tags:
- inventory
- square
- mailchimp
- servicenow
- merchant-services
capability:
exposes:
- type: mcp
namespace: inventory-alerts
port: 8080
tools:
- name: trigger-reorder-alert
description: "Check inventory and trigger reorder notifications when stock is low."
inputParameters:
- name: catalog_object_id
in: body
type: string
description: "The Square catalog item variation ID."
- name: location_id
in: body
type: string
description: "The Square location ID."
- name: supplier_email
in: body
type: string
description: "The supplier's email address."
- name: item_name
in: body
type: string
description: "The product name for the reorder."
steps:
- name: get-count
type: call
call: "square.get-inventory-count"
with:
catalog_object_id: "{{catalog_object_id}}"
location_ids:
- "{{location_id}}"
- name: send-supplier-email
type: call
call: "mailchimp.send-transactional"
with:
to: "{{supplier_email}}"
subject: "Reorder Request: {{item_name}}"
body: "Current stock for {{item_name}} at location {{location_id}} is {{get-count.counts.0.quantity}}. Please prepare a reorder shipment."
- name: create-procurement-request
type: call
call: "servicenow.create-incident"
with:
short_description: "Reorder needed: {{item_name}}"
description: "Inventory for {{item_name}} ({{catalog_object_id}}) at location {{location_id}} is {{get-count.counts.0.quantity}} units. Supplier notified: {{supplier_email}}."
category: "procurement"
assigned_group: "Supply_Chain"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: inventory
path: "/inventory/counts/batch-retrieve"
operations:
- name: get-inventory-count
method: POST
- type: http
namespace: mailchimp
baseUri: "https://mandrillapp.com/api/1.0"
authentication:
type: apiKey
name: "key"
in: body
value: "$secrets.mandrill_api_key"
resources:
- name: messages
path: "/messages/send"
operations:
- name: send-transactional
method: POST
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: incidents
path: "/table/incident"
operations:
- name: create-incident
method: POST
Scores a transaction through Mastercard's fraud detection API and, if the risk score exceeds a threshold, blocks the payment in Square and logs the event in Elasticsearch.
naftiko: "0.5"
info:
label: "Mastercard Transaction Risk Scoring"
description: "Scores a transaction through Mastercard's fraud detection API and, if the risk score exceeds a threshold, blocks the payment in Square and logs the event in Elasticsearch."
tags:
- fraud
- risk
- mastercard
- square
- elasticsearch
capability:
exposes:
- type: mcp
namespace: fraud-scoring
port: 8080
tools:
- name: score-and-block-transaction
description: "Score a transaction for fraud via Mastercard and block it in Square if risk is high."
inputParameters:
- name: payment_id
in: body
type: string
description: "The Square payment ID."
- name: card_number_hash
in: body
type: string
description: "SHA-256 hash of the card number."
- name: amount_cents
in: body
type: integer
description: "Transaction amount in cents."
- name: merchant_category_code
in: body
type: string
description: "The MCC for the merchant."
steps:
- name: score-transaction
type: call
call: "mastercard.score-transaction"
with:
cardNumberHash: "{{card_number_hash}}"
amount: "{{amount_cents}}"
mcc: "{{merchant_category_code}}"
- name: cancel-payment
type: call
call: "square.cancel-payment"
with:
payment_id: "{{payment_id}}"
- name: log-fraud-event
type: call
call: "elasticsearch.index-document"
with:
index: "fraud-events"
document:
payment_id: "{{payment_id}}"
risk_score: "{{score-transaction.riskScore}}"
action: "blocked"
mcc: "{{merchant_category_code}}"
consumes:
- type: http
namespace: mastercard
baseUri: "https://api.mastercard.com/fraud/merchant/v3"
authentication:
type: oauth1
consumerKey: "$secrets.mastercard_consumer_key"
signingKey: "$secrets.mastercard_signing_key"
resources:
- name: scoring
path: "/score"
operations:
- name: score-transaction
method: POST
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: payments
path: "/payments/{{payment_id}}/cancel"
inputParameters:
- name: payment_id
in: path
operations:
- name: cancel-payment
method: POST
- type: http
namespace: elasticsearch
baseUri: "https://block-es.internal:9200"
authentication:
type: bearer
token: "$secrets.elasticsearch_token"
resources:
- name: documents
path: "/{{index}}/_doc"
inputParameters:
- name: index
in: path
operations:
- name: index-document
method: POST
Pulls Square transaction analytics for a location, transforms the data, and sends it to Google Analytics for merchant business intelligence.
naftiko: "0.5"
info:
label: "Merchant Analytics to Google Analytics"
description: "Pulls Square transaction analytics for a location, transforms the data, and sends it to Google Analytics for merchant business intelligence."
tags:
- analytics
- square
- google-analytics
- merchant-services
capability:
exposes:
- type: mcp
namespace: merchant-analytics
port: 8080
tools:
- name: sync-sales-to-ga
description: "Push Square transaction data to Google Analytics for a merchant location."
inputParameters:
- name: location_id
in: body
type: string
description: "The Square location ID."
- name: ga_tracking_id
in: body
type: string
description: "The Google Analytics tracking ID."
- name: date
in: body
type: string
description: "Report date in YYYY-MM-DD format."
steps:
- name: list-payments
type: call
call: "square.list-payments"
with:
location_id: "{{location_id}}"
begin_time: "{{date}}T00:00:00Z"
end_time: "{{date}}T23:59:59Z"
- name: send-to-ga
type: call
call: "google-analytics.send-event"
with:
tracking_id: "{{ga_tracking_id}}"
event_category: "sales"
event_action: "daily_summary"
event_label: "{{location_id}}"
event_value: "{{list-payments.total_count}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: payments
path: "/payments"
operations:
- name: list-payments
method: GET
- type: http
namespace: google-analytics
baseUri: "https://www.google-analytics.com"
authentication:
type: none
resources:
- name: collect
path: "/collect"
operations:
- name: send-event
method: POST
When a chargeback threshold is breached, queries Elasticsearch for recent dispute patterns, opens a Datadog alert, and creates a ServiceNow escalation ticket for risk review.
naftiko: "0.5"
info:
label: "Merchant Chargeback Alert Pipeline"
description: "When a chargeback threshold is breached, queries Elasticsearch for recent dispute patterns, opens a Datadog alert, and creates a ServiceNow escalation ticket for risk review."
tags:
- chargebacks
- risk
- elasticsearch
- datadog
- servicenow
- merchant-services
capability:
exposes:
- type: mcp
namespace: chargeback-alerts
port: 8080
tools:
- name: escalate-chargeback-risk
description: "Analyze chargeback patterns and escalate to risk operations when threshold is breached."
inputParameters:
- name: merchant_id
in: body
type: string
description: "The Square merchant ID."
- name: dispute_count
in: body
type: integer
description: "Number of disputes in the current period."
- name: threshold
in: body
type: integer
description: "The chargeback count threshold that was breached."
steps:
- name: search-disputes
type: call
call: "elasticsearch.search"
with:
index: "square-disputes-*"
query:
bool:
filter:
- term:
merchant_id: "{{merchant_id}}"
- range:
created_at:
gte: "now-30d"
- name: create-alert
type: call
call: "datadog.create-event"
with:
title: "Chargeback threshold breached: merchant {{merchant_id}}"
text: "{{dispute_count}} disputes in 30 days (threshold: {{threshold}}). Top dispute reasons from search: {{search-disputes.hits.total.value}} hits."
alert_type: "warning"
- name: open-escalation
type: call
call: "servicenow.create-incident"
with:
short_description: "Chargeback risk escalation: merchant {{merchant_id}}"
description: "Merchant {{merchant_id}} breached chargeback threshold ({{dispute_count}}/{{threshold}}). Pattern analysis available in Elasticsearch. Datadog event: {{create-alert.event.url}}."
category: "risk_escalation"
assigned_group: "Risk_Operations"
urgency: "2"
consumes:
- type: http
namespace: elasticsearch
baseUri: "https://block-es.internal:9200"
authentication:
type: bearer
token: "$secrets.elasticsearch_token"
resources:
- name: search
path: "/{{index}}/_search"
inputParameters:
- name: index
in: path
operations:
- name: search
method: POST
- type: http
namespace: datadog
baseUri: "https://api.datadoghq.com/api/v1"
authentication:
type: apiKey
name: "DD-API-KEY"
in: header
value: "$secrets.datadog_api_key"
resources:
- name: events
path: "/events"
operations:
- name: create-event
method: POST
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: incidents
path: "/table/incident"
operations:
- name: create-incident
method: POST
Creates discount codes in Square, builds a customer segment in MailChimp, launches an email campaign, and tracks redemptions in Google Analytics.
naftiko: "0.5"
info:
label: "Merchant Coupon Distribution Workflow"
description: "Creates discount codes in Square, builds a customer segment in MailChimp, launches an email campaign, and tracks redemptions in Google Analytics."
tags:
- promotions
- square
- mailchimp
- google-analytics
capability:
exposes:
- type: mcp
namespace: coupon-distribution
port: 8080
tools:
- name: distribute-coupons
description: "Create discount codes and distribute via targeted email campaign."
inputParameters:
- name: discount_name
in: body
type: string
description: "Name of the discount."
- name: percentage_off
in: body
type: integer
description: "Discount percentage."
- name: location_id
in: body
type: string
description: "Square location ID."
steps:
- name: create-discount
type: call
call: "square.create-catalog-discount"
with:
name: "{{discount_name}}"
percentage: "{{percentage_off}}"
- name: get-customers
type: call
call: "square.search-customers"
with:
location_ids: "{{location_id}}"
- name: send-campaign
type: call
call: "mailchimp.create-campaign"
with:
list_id: "active-customers"
subject: "{{discount_name}} — {{percentage_off}}% Off!"
body: "Use code {{create-discount.code}} for {{percentage_off}}% off your next purchase!"
- name: track-launch
type: call
call: "google-analytics.send-event"
with:
event_name: "coupon_campaign_launched"
discount: "{{discount_name}}"
recipients: "{{get-customers.count}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: catalog
path: "/catalog/object"
operations:
- name: create-catalog-discount
method: POST
- name: customers
path: "/customers/search"
operations:
- name: search-customers
method: POST
- type: http
namespace: mailchimp
baseUri: "https://us1.api.mailchimp.com/3.0"
authentication:
type: basic
username: "anystring"
password: "$secrets.mailchimp_api_key"
resources:
- name: campaigns
path: "/campaigns"
operations:
- name: create-campaign
method: POST
- type: http
namespace: google-analytics
baseUri: "https://www.google-analytics.com"
authentication:
type: apiKey
name: "measurement_id"
in: query
value: "$secrets.ga_measurement_id"
resources:
- name: events
path: "/mp/collect"
operations:
- name: send-event
method: POST
Pulls the daily payment summary for a Square location, formats a sales report, and posts it to the merchant's LinkedIn page and HubSpot CRM contact timeline.
naftiko: "0.5"
info:
label: "Merchant Daily Sales Report"
description: "Pulls the daily payment summary for a Square location, formats a sales report, and posts it to the merchant's LinkedIn page and HubSpot CRM contact timeline."
tags:
- reporting
- square
- linkedin
- hubspot
- merchant-services
capability:
exposes:
- type: mcp
namespace: daily-sales
port: 8080
tools:
- name: generate-daily-sales-report
description: "Aggregate daily sales from Square, post to LinkedIn, and update HubSpot."
inputParameters:
- name: location_id
in: body
type: string
description: "The Square location ID."
- name: report_date
in: body
type: string
description: "The date for the report in YYYY-MM-DD format."
- name: hubspot_contact_id
in: body
type: string
description: "The HubSpot contact ID for the merchant."
steps:
- name: list-payments
type: call
call: "square.list-payments"
with:
location_id: "{{location_id}}"
begin_time: "{{report_date}}T00:00:00Z"
end_time: "{{report_date}}T23:59:59Z"
- name: post-to-linkedin
type: call
call: "linkedin.create-post"
with:
text: "Daily sales update for {{report_date}}: {{list-payments.total_count}} transactions processed. Powered by Square."
- name: update-hubspot
type: call
call: "hubspot.create-engagement"
with:
contact_id: "{{hubspot_contact_id}}"
type: "NOTE"
body: "Daily sales report ({{report_date}}): {{list-payments.total_count}} payments, total volume available in Square dashboard for location {{location_id}}."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: payments
path: "/payments"
operations:
- name: list-payments
method: GET
- type: http
namespace: linkedin
baseUri: "https://api.linkedin.com/v2"
authentication:
type: bearer
token: "$secrets.linkedin_token"
resources:
- name: posts
path: "/ugcPosts"
operations:
- name: create-post
method: POST
- type: http
namespace: hubspot
baseUri: "https://api.hubapi.com"
authentication:
type: bearer
token: "$secrets.hubspot_token"
resources:
- name: engagements
path: "/engagements/v1/engagements"
operations:
- name: create-engagement
method: POST
When a payment dispute is filed, retrieves dispute details from Square, collects evidence from S3, submits the response, and updates the merchant via HubSpot.
naftiko: "0.5"
info:
label: "Merchant Dispute Resolution Orchestrator"
description: "When a payment dispute is filed, retrieves dispute details from Square, collects evidence from S3, submits the response, and updates the merchant via HubSpot."
tags:
- disputes
- square
- amazon-s3
- hubspot
capability:
exposes:
- type: mcp
namespace: dispute-resolution
port: 8080
tools:
- name: resolve-dispute
description: "Gather evidence and submit a dispute response for a Square payment dispute."
inputParameters:
- name: dispute_id
in: body
type: string
description: "The Square dispute identifier."
- name: merchant_email
in: body
type: string
description: "Merchant contact email."
steps:
- name: get-dispute
type: call
call: "square.get-dispute"
with:
dispute_id: "{{dispute_id}}"
- name: fetch-evidence
type: call
call: "s3.get-object"
with:
bucket: "dispute-evidence"
key: "{{get-dispute.payment_id}}/evidence.pdf"
- name: submit-response
type: call
call: "square.submit-evidence"
with:
dispute_id: "{{dispute_id}}"
evidence_type: "GENERIC_EVIDENCE"
content: "{{fetch-evidence.body}}"
- name: notify-merchant
type: call
call: "hubspot.send-email"
with:
to: "{{merchant_email}}"
subject: "Dispute {{dispute_id}} — Evidence Submitted"
body: "We have submitted evidence for dispute {{dispute_id}} (${{get-dispute.amount}}). Current status: {{get-dispute.state}}."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: disputes
path: "/disputes/{{dispute_id}}"
inputParameters:
- name: dispute_id
in: path
operations:
- name: get-dispute
method: GET
- name: evidence
path: "/disputes/{{dispute_id}}/evidence"
inputParameters:
- name: dispute_id
in: path
operations:
- name: submit-evidence
method: POST
- type: http
namespace: s3
baseUri: "https://s3.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: objects
path: "/{{bucket}}/{{key}}"
inputParameters:
- name: bucket
in: path
- name: key
in: path
operations:
- name: get-object
method: GET
- type: http
namespace: hubspot
baseUri: "https://api.hubapi.com"
authentication:
type: bearer
token: "$secrets.hubspot_token"
resources:
- name: emails
path: "/marketing/v3/transactional/single-email/send"
operations:
- name: send-email
method: POST
Retrieves merchant segment data from Square, creates a MailChimp campaign targeting those merchants, and logs the campaign in HubSpot.
naftiko: "0.5"
info:
label: "Merchant Email Campaign via MailChimp"
description: "Retrieves merchant segment data from Square, creates a MailChimp campaign targeting those merchants, and logs the campaign in HubSpot."
tags:
- marketing
- mailchimp
- square
- hubspot
- merchant-services
capability:
exposes:
- type: mcp
namespace: merchant-campaigns
port: 8080
tools:
- name: launch-merchant-campaign
description: "Build and send a MailChimp campaign for a Square merchant segment and log in HubSpot."
inputParameters:
- name: segment_id
in: body
type: string
description: "The Square customer segment ID."
- name: campaign_subject
in: body
type: string
description: "Email subject line for the campaign."
- name: mailchimp_list_id
in: body
type: string
description: "The MailChimp audience list ID."
steps:
- name: get-segment
type: call
call: "square.get-customer-segment"
with:
segment_id: "{{segment_id}}"
- name: create-campaign
type: call
call: "mailchimp.create-campaign"
with:
type: "regular"
recipients:
list_id: "{{mailchimp_list_id}}"
settings:
subject_line: "{{campaign_subject}}"
from_name: "Block Merchant Services"
- name: log-in-hubspot
type: call
call: "hubspot.create-engagement"
with:
type: "NOTE"
body: "MailChimp campaign {{create-campaign.id}} launched for segment {{segment_id}} ({{get-segment.segment.name}}). Subject: {{campaign_subject}}."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: customer-segments
path: "/customers/segments/{{segment_id}}"
inputParameters:
- name: segment_id
in: path
operations:
- name: get-customer-segment
method: GET
- type: http
namespace: mailchimp
baseUri: "https://us1.api.mailchimp.com/3.0"
authentication:
type: basic
username: "anystring"
password: "$secrets.mailchimp_api_key"
resources:
- name: campaigns
path: "/campaigns"
operations:
- name: create-campaign
method: POST
- type: http
namespace: hubspot
baseUri: "https://api.hubapi.com"
authentication:
type: bearer
token: "$secrets.hubspot_token"
resources:
- name: engagements
path: "/engagements/v1/engagements"
operations:
- name: create-engagement
method: POST
Monitors Square inventory levels, identifies low-stock items, creates purchase orders in BigCommerce, and alerts the merchant via MailChimp.
naftiko: "0.5"
info:
label: "Merchant Inventory Alert Pipeline"
description: "Monitors Square inventory levels, identifies low-stock items, creates purchase orders in BigCommerce, and alerts the merchant via MailChimp."
tags:
- inventory
- square
- bigcommerce
- mailchimp
capability:
exposes:
- type: mcp
namespace: inventory-alerts
port: 8080
tools:
- name: check-inventory-alerts
description: "Check inventory levels and create purchase orders for low-stock items."
inputParameters:
- name: location_id
in: body
type: string
description: "Square location ID."
- name: threshold
in: body
type: integer
description: "Minimum stock threshold."
- name: merchant_email
in: body
type: string
description: "Merchant email for alerts."
steps:
- name: get-counts
type: call
call: "square.get-inventory-counts"
with:
location_ids: "{{location_id}}"
- name: get-catalog
type: call
call: "square.list-catalog"
with:
types: "ITEM"
- name: create-po
type: call
call: "bigcommerce.create-order"
with:
items: "{{get-counts.low_stock_items}}"
threshold: "{{threshold}}"
- name: alert-merchant
type: call
call: "mailchimp.send-transactional"
with:
to: "{{merchant_email}}"
subject: "Low Inventory Alert — {{get-counts.low_stock_count}} items"
body: "{{get-counts.low_stock_count}} items below threshold of {{threshold}} units. Purchase order created: {{create-po.order_id}}."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: inventory
path: "/inventory/counts/batch-retrieve"
operations:
- name: get-inventory-counts
method: POST
- name: catalog
path: "/catalog/list"
inputParameters:
- name: types
in: query
operations:
- name: list-catalog
method: GET
- type: http
namespace: bigcommerce
baseUri: "https://api.bigcommerce.com/stores/$secrets.bigcommerce_store_hash/v2"
authentication:
type: apiKey
name: "X-Auth-Token"
in: header
value: "$secrets.bigcommerce_token"
resources:
- name: orders
path: "/orders"
operations:
- name: create-order
method: POST
- type: http
namespace: mailchimp
baseUri: "https://mandrillapp.com/api/1.0"
authentication:
type: apiKey
name: "key"
in: body
value: "$secrets.mailchimp_transactional_key"
resources:
- name: messages
path: "/messages/send"
operations:
- name: send-transactional
method: POST
Creates a Square loyalty promotion, syncs eligible customers to MailChimp, launches an email campaign, and tracks results in Google Analytics.
naftiko: "0.5"
info:
label: "Merchant Loyalty Campaign Launcher"
description: "Creates a Square loyalty promotion, syncs eligible customers to MailChimp, launches an email campaign, and tracks results in Google Analytics."
tags:
- loyalty
- square
- mailchimp
- google-analytics
capability:
exposes:
- type: mcp
namespace: loyalty-campaign
port: 8080
tools:
- name: launch-campaign
description: "Create a loyalty promotion and launch a targeted email campaign."
inputParameters:
- name: program_id
in: body
type: string
description: "Square loyalty program ID."
- name: promotion_name
in: body
type: string
description: "Name of the promotion."
- name: points_multiplier
in: body
type: integer
description: "Points multiplier for the promotion."
steps:
- name: create-promotion
type: call
call: "square.create-loyalty-promotion"
with:
program_id: "{{program_id}}"
name: "{{promotion_name}}"
incentive_points_multiplier: "{{points_multiplier}}"
- name: get-members
type: call
call: "square.list-loyalty-accounts"
with:
program_id: "{{program_id}}"
- name: send-campaign
type: call
call: "mailchimp.create-campaign"
with:
list_id: "loyalty-members"
subject: "{{promotion_name}} — Earn {{points_multiplier}}x Points!"
body: "Start earning {{points_multiplier}}x loyalty points today! Promotion runs through {{create-promotion.end_date}}."
- name: track-launch
type: call
call: "google-analytics.send-event"
with:
event_name: "loyalty_campaign_launched"
program_id: "{{program_id}}"
promotion_id: "{{create-promotion.id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: loyalty-promotions
path: "/loyalty/programs/{{program_id}}/promotions"
inputParameters:
- name: program_id
in: path
operations:
- name: create-loyalty-promotion
method: POST
- name: loyalty-accounts
path: "/loyalty/accounts/search"
operations:
- name: list-loyalty-accounts
method: POST
- type: http
namespace: mailchimp
baseUri: "https://us1.api.mailchimp.com/3.0"
authentication:
type: basic
username: "anystring"
password: "$secrets.mailchimp_api_key"
resources:
- name: campaigns
path: "/campaigns"
operations:
- name: create-campaign
method: POST
- type: http
namespace: google-analytics
baseUri: "https://www.google-analytics.com"
authentication:
type: apiKey
name: "measurement_id"
in: query
value: "$secrets.ga_measurement_id"
resources:
- name: events
path: "/mp/collect"
operations:
- name: send-event
method: POST
Aggregates sales data across all Square locations, calculates KPIs, stores the report in S3, and distributes via MailChimp to the merchant's management team.
naftiko: "0.5"
info:
label: "Merchant Multi-Location Reporting"
description: "Aggregates sales data across all Square locations, calculates KPIs, stores the report in S3, and distributes via MailChimp to the merchant's management team."
tags:
- reporting
- square
- amazon-s3
- mailchimp
capability:
exposes:
- type: mcp
namespace: multi-location-report
port: 8080
tools:
- name: generate-multi-location-report
description: "Generate a consolidated multi-location sales report."
inputParameters:
- name: merchant_id
in: body
type: string
description: "Square merchant ID."
- name: period
in: body
type: string
description: "Reporting period (daily, weekly, monthly)."
- name: distribution_list
in: body
type: string
description: "Comma-separated email list."
steps:
- name: list-locations
type: call
call: "square.list-locations"
with:
merchant_id: "{{merchant_id}}"
- name: get-sales
type: call
call: "square.list-payments"
with:
merchant_id: "{{merchant_id}}"
period: "{{period}}"
- name: store-report
type: call
call: "s3.put-object"
with:
bucket: "merchant-reports"
key: "{{merchant_id}}/{{period}}/multi-location.json"
body: "{{get-sales.summary}}"
- name: distribute
type: call
call: "mailchimp.send-transactional"
with:
to: "{{distribution_list}}"
subject: "Multi-Location Report — {{period}}"
body: "Locations: {{list-locations.count}}. Total revenue: ${{get-sales.total_amount}}. Top location: {{get-sales.top_location}}."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: locations
path: "/locations"
operations:
- name: list-locations
method: GET
- name: payments
path: "/payments"
inputParameters:
- name: merchant_id
in: query
- name: period
in: query
operations:
- name: list-payments
method: GET
- type: http
namespace: s3
baseUri: "https://s3.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: objects
path: "/{{bucket}}/{{key}}"
inputParameters:
- name: bucket
in: path
- name: key
in: path
operations:
- name: put-object
method: PUT
- type: http
namespace: mailchimp
baseUri: "https://mandrillapp.com/api/1.0"
authentication:
type: apiKey
name: "key"
in: body
value: "$secrets.mailchimp_transactional_key"
resources:
- name: messages
path: "/messages/send"
operations:
- name: send-transactional
method: POST
When a new merchant signs up, creates the Square location, provisions a Datadog dashboard for transaction monitoring, and opens a ServiceNow onboarding ticket.
naftiko: "0.5"
info:
label: "Merchant Onboarding Orchestrator"
description: "When a new merchant signs up, creates the Square location, provisions a Datadog dashboard for transaction monitoring, and opens a ServiceNow onboarding ticket."
tags:
- onboarding
- square
- datadog
- servicenow
- merchant-services
capability:
exposes:
- type: mcp
namespace: merchant-onboarding
port: 8080
tools:
- name: onboard-merchant
description: "Provision a new merchant with a Square location, monitoring dashboard, and support ticket."
inputParameters:
- name: business_name
in: body
type: string
description: "The merchant's business name."
- name: address_line
in: body
type: string
description: "Street address for the new location."
- name: city
in: body
type: string
description: "City for the new location."
- name: state
in: body
type: string
description: "State or province."
- name: country
in: body
type: string
description: "ISO 3166-1 alpha-2 country code."
steps:
- name: create-location
type: call
call: "square.create-location"
with:
location:
name: "{{business_name}}"
address:
address_line_1: "{{address_line}}"
locality: "{{city}}"
administrative_district_level_1: "{{state}}"
country: "{{country}}"
- name: create-dashboard
type: call
call: "datadog.create-dashboard"
with:
title: "Merchant Monitoring — {{business_name}}"
description: "Transaction and error rate monitoring for location {{create-location.location.id}}."
layout_type: "ordered"
- name: open-onboarding-ticket
type: call
call: "servicenow.create-incident"
with:
short_description: "New merchant onboarding: {{business_name}}"
description: "Location {{create-location.location.id}} provisioned. Dashboard: {{create-dashboard.url}}. Address: {{address_line}}, {{city}}, {{state}}."
category: "merchant_onboarding"
assigned_group: "Merchant_Success"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: locations
path: "/locations"
operations:
- name: create-location
method: POST
- type: http
namespace: datadog
baseUri: "https://api.datadoghq.com/api/v1"
authentication:
type: apiKey
name: "DD-API-KEY"
in: header
value: "$secrets.datadog_api_key"
resources:
- name: dashboards
path: "/dashboard"
operations:
- name: create-dashboard
method: POST
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: incidents
path: "/table/incident"
operations:
- name: create-incident
method: POST
Runs PCI compliance checks on merchant payment endpoints via Cloudflare, scans infrastructure with SonarQube, logs findings in SharePoint, and notifies via ServiceNow.
naftiko: "0.5"
info:
label: "Merchant PCI Compliance Audit"
description: "Runs PCI compliance checks on merchant payment endpoints via Cloudflare, scans infrastructure with SonarQube, logs findings in SharePoint, and notifies via ServiceNow."
tags:
- compliance
- cloudflare
- sonarqube
- sharepoint
- servicenow
capability:
exposes:
- type: mcp
namespace: pci-audit
port: 8080
tools:
- name: audit-pci-compliance
description: "Run PCI compliance audit with security scanning and findings documentation."
inputParameters:
- name: merchant_id
in: body
type: string
description: "Square merchant identifier."
- name: domain
in: body
type: string
description: "Merchant payment domain."
steps:
- name: check-tls
type: call
call: "cloudflare.get-ssl-verification"
with:
zone_id: "$secrets.cloudflare_zone_id"
hostname: "{{domain}}"
- name: scan-code
type: call
call: "sonarqube.get-vulnerabilities"
with:
project_key: "merchant-{{merchant_id}}"
- name: store-report
type: call
call: "sharepoint.create-file"
with:
site_id: "compliance"
folder_path: "PCI/{{merchant_id}}"
file_name: "audit-report.json"
content: "TLS: {{check-tls.status}}. Vulnerabilities: {{scan-code.total}}."
- name: create-ticket
type: call
call: "servicenow.create-incident"
with:
short_description: "PCI audit: merchant {{merchant_id}}"
description: "TLS status: {{check-tls.status}}. Code vulnerabilities: {{scan-code.total}}. Report: {{store-report.url}}."
category: "compliance"
consumes:
- type: http
namespace: cloudflare
baseUri: "https://api.cloudflare.com/client/v4"
authentication:
type: bearer
token: "$secrets.cloudflare_token"
resources:
- name: ssl
path: "/zones/{{zone_id}}/ssl/verification"
inputParameters:
- name: zone_id
in: path
operations:
- name: get-ssl-verification
method: GET
- type: http
namespace: sonarqube
baseUri: "https://sonar.block.xyz/api"
authentication:
type: bearer
token: "$secrets.sonarqube_token"
resources:
- name: issues
path: "/issues/search"
inputParameters:
- name: project_key
in: query
operations:
- name: get-vulnerabilities
method: GET
- type: http
namespace: sharepoint
baseUri: "https://graph.microsoft.com/v1.0/sites"
authentication:
type: bearer
token: "$secrets.msgraph_token"
resources:
- name: files
path: "/{{site_id}}/drive/root:/{{folder_path}}/{{file_name}}:/content"
inputParameters:
- name: site_id
in: path
- name: folder_path
in: path
- name: file_name
in: path
operations:
- name: create-file
method: PUT
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: incidents
path: "/table/incident"
operations:
- name: create-incident
method: POST
Processes a refund through Square Payments API, updates the order status, logs the refund in S3, and notifies the customer via SendGrid.
naftiko: "0.5"
info:
label: "Merchant Refund Workflow"
description: "Processes a refund through Square Payments API, updates the order status, logs the refund in S3, and notifies the customer via SendGrid."
tags:
- refunds
- square
- amazon-s3
- sendgrid
capability:
exposes:
- type: mcp
namespace: refund-workflow
port: 8080
tools:
- name: process-refund
description: "Process a payment refund with order update, audit logging, and customer notification."
inputParameters:
- name: payment_id
in: body
type: string
description: "Square payment ID."
- name: amount_cents
in: body
type: integer
description: "Refund amount in cents."
- name: reason
in: body
type: string
description: "Refund reason."
- name: customer_email
in: body
type: string
description: "Customer email."
steps:
- name: create-refund
type: call
call: "square.create-refund"
with:
payment_id: "{{payment_id}}"
amount_money:
amount: "{{amount_cents}}"
currency: "USD"
reason: "{{reason}}"
- name: get-payment
type: call
call: "square.get-payment"
with:
payment_id: "{{payment_id}}"
- name: log-refund
type: call
call: "s3.put-object"
with:
bucket: "refund-records"
key: "{{payment_id}}/{{create-refund.refund_id}}.json"
body: "{{create-refund.summary}}"
- name: notify-customer
type: call
call: "sendgrid.send-email"
with:
to: "{{customer_email}}"
subject: "Refund Processed — ${{amount_cents}}"
body: "Your refund of ${{amount_cents}} has been processed. Refund ID: {{create-refund.refund_id}}. Please allow 5-10 business days."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: refunds
path: "/refunds"
operations:
- name: create-refund
method: POST
- name: payments
path: "/payments/{{payment_id}}"
inputParameters:
- name: payment_id
in: path
operations:
- name: get-payment
method: GET
- type: http
namespace: s3
baseUri: "https://s3.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: objects
path: "/{{bucket}}/{{key}}"
inputParameters:
- name: bucket
in: path
- name: key
in: path
operations:
- name: put-object
method: PUT
- 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
Aggregates payment data from Square, enriches with Google Analytics session data, generates a report in Google Analytics, and sends the summary via MailChimp.
naftiko: "0.5"
info:
label: "Merchant Revenue Report Pipeline"
description: "Aggregates payment data from Square, enriches with Google Analytics session data, generates a report in Google Analytics, and sends the summary via MailChimp."
tags:
- analytics
- square
- google-analytics
- mailchimp
capability:
exposes:
- type: mcp
namespace: revenue-report
port: 8080
tools:
- name: generate-revenue-report
description: "Generate and distribute a merchant revenue report with web analytics."
inputParameters:
- name: location_id
in: body
type: string
description: "The Square location identifier."
- name: period
in: body
type: string
description: "Reporting period (daily, weekly, monthly)."
- name: merchant_email
in: body
type: string
description: "Merchant email for report delivery."
steps:
- name: get-payments
type: call
call: "square.list-payments"
with:
location_id: "{{location_id}}"
period: "{{period}}"
- name: get-analytics
type: call
call: "google-analytics.get-report"
with:
property_id: "{{location_id}}"
period: "{{period}}"
- name: track-event
type: call
call: "google-analytics.send-event"
with:
event_name: "revenue_report_generated"
location_id: "{{location_id}}"
- name: send-report
type: call
call: "mailchimp.send-transactional"
with:
to: "{{merchant_email}}"
subject: "Revenue Report — {{period}}"
body: "Total revenue: ${{get-payments.total_amount}}. Transactions: {{get-payments.count}}. Sessions: {{get-analytics.sessions}}. Conversion: {{get-analytics.conversion_rate}}%."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: payments
path: "/payments"
inputParameters:
- name: location_id
in: query
- name: period
in: query
operations:
- name: list-payments
method: GET
- type: http
namespace: google-analytics
baseUri: "https://analyticsdata.googleapis.com/v1beta"
authentication:
type: bearer
token: "$secrets.google_analytics_token"
resources:
- name: reports
path: "/properties/{{property_id}}:runReport"
inputParameters:
- name: property_id
in: path
operations:
- name: get-report
method: POST
- name: events
path: "/properties/{{property_id}}/events"
inputParameters:
- name: property_id
in: path
operations:
- name: send-event
method: POST
- type: http
namespace: mailchimp
baseUri: "https://mandrillapp.com/api/1.0"
authentication:
type: apiKey
name: "key"
in: body
value: "$secrets.mailchimp_transactional_key"
resources:
- name: messages
path: "/messages/send"
operations:
- name: send-transactional
method: POST
Reconciles Square payment settlements against bank deposits, identifies discrepancies, logs in S3, and alerts the finance team via Slack.
naftiko: "0.5"
info:
label: "Merchant Settlement Reconciliation Pipeline"
description: "Reconciles Square payment settlements against bank deposits, identifies discrepancies, logs in S3, and alerts the finance team via Slack."
tags:
- finance
- square
- amazon-s3
- slack
capability:
exposes:
- type: mcp
namespace: settlement-recon
port: 8080
tools:
- name: reconcile-settlements
description: "Reconcile Square settlements against bank records with discrepancy tracking."
inputParameters:
- name: location_id
in: body
type: string
description: "Square location ID."
- name: settlement_date
in: body
type: string
description: "Settlement date YYYY-MM-DD."
steps:
- name: get-payouts
type: call
call: "square.list-payouts"
with:
location_id: "{{location_id}}"
begin_time: "{{settlement_date}}"
- name: get-payments
type: call
call: "square.list-payments"
with:
location_id: "{{location_id}}"
begin_time: "{{settlement_date}}"
- name: store-recon
type: call
call: "s3.put-object"
with:
bucket: "settlement-reconciliation"
key: "{{location_id}}/{{settlement_date}}/recon.json"
body: "{{get-payouts.summary}}"
- name: alert-finance
type: call
call: "slack.post-message"
with:
channel: "#finance-ops"
text: "Settlement reconciliation for {{location_id}} on {{settlement_date}}: Total settled: ${{get-payouts.total_amount}}. Payments: ${{get-payments.total_amount}}."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: payouts
path: "/payouts"
inputParameters:
- name: location_id
in: query
- name: begin_time
in: query
operations:
- name: list-payouts
method: GET
- name: payments
path: "/payments"
inputParameters:
- name: location_id
in: query
- name: begin_time
in: query
operations:
- name: list-payments
method: GET
- type: http
namespace: s3
baseUri: "https://s3.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: objects
path: "/{{bucket}}/{{key}}"
inputParameters:
- name: bucket
in: path
- name: key
in: path
operations:
- name: put-object
method: PUT
- type: http
namespace: slack
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 Square merchant updates their business profile, syncs the updated business name, description, and hours to their Instagram, Twitter, and Meta business pages.
naftiko: "0.5"
info:
label: "Merchant Social Media Sync"
description: "When a Square merchant updates their business profile, syncs the updated business name, description, and hours to their Instagram, Twitter, and Meta business pages."
tags:
- social-media
- square
- instagram
- twitter
- meta
- merchant-services
capability:
exposes:
- type: mcp
namespace: social-sync
port: 8080
tools:
- name: sync-merchant-profile
description: "Sync a Square merchant profile update to social media platforms."
inputParameters:
- name: location_id
in: body
type: string
description: "The Square location ID."
- name: instagram_account_id
in: body
type: string
description: "The Instagram business account ID."
- name: twitter_user_id
in: body
type: string
description: "The Twitter/X user ID."
steps:
- name: get-location
type: call
call: "square.get-location"
with:
location_id: "{{location_id}}"
- name: update-instagram
type: call
call: "meta.update-business-profile"
with:
account_id: "{{instagram_account_id}}"
bio: "{{get-location.location.description}}"
name: "{{get-location.location.name}}"
- name: post-twitter-update
type: call
call: "twitter.create-tweet"
with:
text: "We've updated our profile! Visit us at {{get-location.location.name}}, {{get-location.location.address.address_line_1}}, {{get-location.location.address.locality}}."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: locations
path: "/locations/{{location_id}}"
inputParameters:
- name: location_id
in: path
operations:
- name: get-location
method: GET
- type: http
namespace: meta
baseUri: "https://graph.facebook.com/v18.0"
authentication:
type: bearer
token: "$secrets.meta_page_token"
resources:
- name: accounts
path: "/{{account_id}}"
inputParameters:
- name: account_id
in: path
operations:
- name: update-business-profile
method: POST
- type: http
namespace: twitter
baseUri: "https://api.twitter.com/2"
authentication:
type: bearer
token: "$secrets.twitter_bearer_token"
resources:
- name: tweets
path: "/tweets"
operations:
- name: create-tweet
method: POST
Fetches merchant reviews from ZoomInfo, analyzes sentiment, updates the HubSpot contact record with NPS data, and posts a summary to the merchant success Slack channel.
naftiko: "0.5"
info:
label: "Merchant Social Review Monitor"
description: "Fetches merchant reviews from ZoomInfo, analyzes sentiment, updates the HubSpot contact record with NPS data, and posts a summary to the merchant success Slack channel."
tags:
- merchant-success
- zoominfo
- hubspot
- slack
capability:
exposes:
- type: mcp
namespace: review-monitor
port: 8080
tools:
- name: monitor-reviews
description: "Collect and analyze merchant reviews with CRM update and team notification."
inputParameters:
- name: merchant_domain
in: body
type: string
description: "Merchant website domain."
- name: hubspot_contact_id
in: body
type: string
description: "HubSpot contact ID."
steps:
- name: get-company-info
type: call
call: "zoominfo.get-company"
with:
domain: "{{merchant_domain}}"
- name: get-reviews
type: call
call: "zoominfo.get-reviews"
with:
company_id: "{{get-company-info.id}}"
- name: update-crm
type: call
call: "hubspot.update-contact"
with:
contact_id: "{{hubspot_contact_id}}"
properties:
review_count: "{{get-reviews.total_count}}"
avg_rating: "{{get-reviews.average_rating}}"
- name: post-summary
type: call
call: "slack.post-message"
with:
channel: "#merchant-success"
text: "Review update for {{merchant_domain}}: {{get-reviews.total_count}} reviews, avg {{get-reviews.average_rating}}/5. CRM updated."
consumes:
- type: http
namespace: zoominfo
baseUri: "https://api.zoominfo.com"
authentication:
type: bearer
token: "$secrets.zoominfo_token"
resources:
- name: companies
path: "/lookup/company"
inputParameters:
- name: domain
in: query
operations:
- name: get-company
method: GET
- name: reviews
path: "/companies/{{company_id}}/reviews"
inputParameters:
- name: company_id
in: path
operations:
- name: get-reviews
method: GET
- type: http
namespace: hubspot
baseUri: "https://api.hubapi.com"
authentication:
type: bearer
token: "$secrets.hubspot_token"
resources:
- name: contacts
path: "/crm/v3/objects/contacts/{{contact_id}}"
inputParameters:
- name: contact_id
in: path
operations:
- name: update-contact
method: PATCH
- type: http
namespace: slack
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
Cancels a Square subscription, processes the final prorated refund, updates the customer record, and logs the churn event in Elasticsearch.
naftiko: "0.5"
info:
label: "Merchant Subscription Cancellation Flow"
description: "Cancels a Square subscription, processes the final prorated refund, updates the customer record, and logs the churn event in Elasticsearch."
tags:
- subscriptions
- churn
- square
- elasticsearch
- merchant-services
capability:
exposes:
- type: mcp
namespace: subscription-cancel
port: 8080
tools:
- name: cancel-subscription-flow
description: "Cancel a subscription, issue final refund, update customer, and log the churn."
inputParameters:
- name: subscription_id
in: body
type: string
description: "The Square subscription ID."
- name: customer_id
in: body
type: string
description: "The Square customer ID."
- name: reason
in: body
type: string
description: "Reason for cancellation."
steps:
- name: cancel-subscription
type: call
call: "square.cancel-subscription"
with:
subscription_id: "{{subscription_id}}"
- name: update-customer
type: call
call: "square.update-customer"
with:
customer_id: "{{customer_id}}"
note: "Subscription {{subscription_id}} cancelled. Reason: {{reason}}."
- name: log-churn
type: call
call: "elasticsearch.index-document"
with:
index: "subscription-churn"
document:
subscription_id: "{{subscription_id}}"
customer_id: "{{customer_id}}"
reason: "{{reason}}"
cancelled_date: "{{cancel-subscription.subscription.canceled_date}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: subscriptions
path: "/subscriptions/{{subscription_id}}/cancel"
inputParameters:
- name: subscription_id
in: path
operations:
- name: cancel-subscription
method: POST
- name: customers
path: "/customers/{{customer_id}}"
inputParameters:
- name: customer_id
in: path
operations:
- name: update-customer
method: PUT
- type: http
namespace: elasticsearch
baseUri: "https://block-es.internal:9200"
authentication:
type: bearer
token: "$secrets.elasticsearch_token"
resources:
- name: documents
path: "/{{index}}/_doc"
inputParameters:
- name: index
in: path
operations:
- name: index-document
method: POST
When a merchant submits a support request, classifies the issue via Elasticsearch similarity search, routes to the correct ServiceNow queue, and sends a confirmation via Square Messages.
naftiko: "0.5"
info:
label: "Merchant Support Ticket Triage"
description: "When a merchant submits a support request, classifies the issue via Elasticsearch similarity search, routes to the correct ServiceNow queue, and sends a confirmation via Square Messages."
tags:
- support
- servicenow
- elasticsearch
- square
- merchant-services
capability:
exposes:
- type: mcp
namespace: support-triage
port: 8080
tools:
- name: triage-support-request
description: "Classify a merchant support request and route to the appropriate team."
inputParameters:
- name: merchant_id
in: body
type: string
description: "The Square merchant ID."
- name: subject
in: body
type: string
description: "Support request subject line."
- name: description
in: body
type: string
description: "Detailed description of the issue."
steps:
- name: classify-issue
type: call
call: "elasticsearch.search"
with:
index: "support-templates"
query:
more_like_this:
fields:
- "subject"
- "description"
like: "{{subject}} {{description}}"
min_term_freq: 1
- name: create-ticket
type: call
call: "servicenow.create-incident"
with:
short_description: "{{subject}}"
description: "Merchant: {{merchant_id}}. {{description}}. Classified as: {{classify-issue.hits.hits.0._source.category}}."
category: "{{classify-issue.hits.hits.0._source.category}}"
assigned_group: "{{classify-issue.hits.hits.0._source.assigned_group}}"
- name: confirm-to-merchant
type: call
call: "square.send-message"
with:
merchant_id: "{{merchant_id}}"
text: "We've received your support request: {{subject}}. Your ticket number is {{create-ticket.number}}. Our team will respond shortly."
consumes:
- type: http
namespace: elasticsearch
baseUri: "https://block-es.internal:9200"
authentication:
type: bearer
token: "$secrets.elasticsearch_token"
resources:
- name: search
path: "/{{index}}/_search"
inputParameters:
- name: index
in: path
operations:
- name: search
method: POST
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: incidents
path: "/table/incident"
operations:
- name: create-incident
method: POST
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: messages
path: "/merchants/{{merchant_id}}/messages"
inputParameters:
- name: merchant_id
in: path
operations:
- name: send-message
method: POST
Aggregates merchant payment data from Square, generates 1099-K reports, stores in S3, and notifies merchants via SendGrid when reports are ready.
naftiko: "0.5"
info:
label: "Merchant Tax Reporting Pipeline"
description: "Aggregates merchant payment data from Square, generates 1099-K reports, stores in S3, and notifies merchants via SendGrid when reports are ready."
tags:
- tax
- square
- amazon-s3
- sendgrid
capability:
exposes:
- type: mcp
namespace: tax-reporting
port: 8080
tools:
- name: generate-tax-report
description: "Generate and distribute merchant tax reports."
inputParameters:
- name: merchant_id
in: body
type: string
description: "Square merchant identifier."
- name: tax_year
in: body
type: string
description: "Tax year (e.g. 2025)."
- name: merchant_email
in: body
type: string
description: "Merchant email."
steps:
- name: get-payments
type: call
call: "square.list-payments"
with:
merchant_id: "{{merchant_id}}"
year: "{{tax_year}}"
- name: generate-1099k
type: call
call: "square.generate-tax-form"
with:
merchant_id: "{{merchant_id}}"
year: "{{tax_year}}"
total_gross: "{{get-payments.total_gross}}"
- name: store-report
type: call
call: "s3.put-object"
with:
bucket: "tax-reports"
key: "{{tax_year}}/{{merchant_id}}/1099-K.pdf"
body: "{{generate-1099k.document}}"
- name: notify-merchant
type: call
call: "sendgrid.send-email"
with:
to: "{{merchant_email}}"
subject: "Your {{tax_year}} 1099-K is Ready"
body: "Your 1099-K tax form for {{tax_year}} is now available. Total gross payments: ${{get-payments.total_gross}}. Download from your Square Dashboard."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: payments
path: "/payments"
inputParameters:
- name: merchant_id
in: query
- name: year
in: query
operations:
- name: list-payments
method: GET
- name: tax
path: "/tax/forms/generate"
operations:
- name: generate-tax-form
method: POST
- type: http
namespace: s3
baseUri: "https://s3.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: objects
path: "/{{bucket}}/{{key}}"
inputParameters:
- name: bucket
in: path
- name: key
in: path
operations:
- name: put-object
method: PUT
- 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
Checks merchant website performance via Cloudflare analytics, tests checkout flow latency with Datadog synthetic, generates recommendations, and sends via HubSpot.
naftiko: "0.5"
info:
label: "Merchant Website Performance Audit"
description: "Checks merchant website performance via Cloudflare analytics, tests checkout flow latency with Datadog synthetic, generates recommendations, and sends via HubSpot."
tags:
- performance
- cloudflare
- datadog
- hubspot
capability:
exposes:
- type: mcp
namespace: site-audit
port: 8080
tools:
- name: audit-performance
description: "Audit merchant website and checkout performance with recommendations."
inputParameters:
- name: merchant_domain
in: body
type: string
description: "Merchant website domain."
- name: merchant_email
in: body
type: string
description: "Merchant email."
steps:
- name: get-analytics
type: call
call: "cloudflare.get-zone-analytics"
with:
zone_id: "$secrets.cloudflare_zone_id"
since: "-7d"
- name: check-latency
type: call
call: "datadog.get-synthetics"
with:
public_id: "checkout-{{merchant_domain}}"
- name: send-report
type: call
call: "hubspot.send-email"
with:
to: "{{merchant_email}}"
subject: "Website Performance Report"
body: "Page load: {{get-analytics.avg_load_time}}ms. Checkout latency: {{check-latency.avg_duration}}ms. Total requests: {{get-analytics.total_requests}}."
consumes:
- type: http
namespace: cloudflare
baseUri: "https://api.cloudflare.com/client/v4"
authentication:
type: bearer
token: "$secrets.cloudflare_token"
resources:
- name: analytics
path: "/zones/{{zone_id}}/analytics/dashboard"
inputParameters:
- name: zone_id
in: path
- name: since
in: query
operations:
- name: get-zone-analytics
method: GET
- type: http
namespace: datadog
baseUri: "https://api.datadoghq.com/api/v1"
authentication:
type: apiKey
name: "DD-API-KEY"
in: header
value: "$secrets.datadog_api_key"
resources:
- name: synthetics
path: "/synthetics/tests/{{public_id}}/results"
inputParameters:
- name: public_id
in: path
operations:
- name: get-synthetics
method: GET
- type: http
namespace: hubspot
baseUri: "https://api.hubapi.com"
authentication:
type: bearer
token: "$secrets.hubspot_token"
resources:
- name: emails
path: "/marketing/v3/transactional/single-email/send"
operations:
- name: send-email
method: POST
Deploys a canary release via GitLab CI, monitors error rates in Datadog, promotes or rolls back based on metrics, and notifies the team via Slack.
naftiko: "0.5"
info:
label: "Microservice Canary Deployment Pipeline"
description: "Deploys a canary release via GitLab CI, monitors error rates in Datadog, promotes or rolls back based on metrics, and notifies the team via Slack."
tags:
- devops
- gitlab
- datadog
- slack
capability:
exposes:
- type: mcp
namespace: canary-deploy
port: 8080
tools:
- name: deploy-canary
description: "Execute a canary deployment with automated monitoring and rollback."
inputParameters:
- name: project_id
in: body
type: string
description: "GitLab project ID."
- name: ref
in: body
type: string
description: "Git branch or tag to deploy."
- name: service_name
in: body
type: string
description: "Service name for monitoring."
steps:
- name: trigger-pipeline
type: call
call: "gitlab.create-pipeline"
with:
project_id: "{{project_id}}"
ref: "{{ref}}"
variables: "DEPLOY_TYPE=canary"
- name: monitor-canary
type: call
call: "datadog.query-metrics"
with:
query: "sum:http.errors{service:{{service_name}},version:canary}.as_rate()"
period: "10m"
- name: promote-canary
type: call
call: "gitlab.create-pipeline"
with:
project_id: "{{project_id}}"
ref: "{{ref}}"
variables: "DEPLOY_TYPE=promote"
- name: notify-team
type: call
call: "slack.post-message"
with:
channel: "#deployments"
text: "Canary deployment for {{service_name}} ({{ref}}) promoted to production. Error rate: {{monitor-canary.value}}. Pipeline: {{trigger-pipeline.id}}."
consumes:
- type: http
namespace: gitlab
baseUri: "https://gitlab.block.xyz/api/v4"
authentication:
type: bearer
token: "$secrets.gitlab_token"
resources:
- name: pipelines
path: "/projects/{{project_id}}/pipeline"
inputParameters:
- name: project_id
in: path
operations:
- name: create-pipeline
method: POST
- type: http
namespace: datadog
baseUri: "https://api.datadoghq.com/api/v1"
authentication:
type: apiKey
name: "DD-API-KEY"
in: header
value: "$secrets.datadog_api_key"
resources:
- name: metrics
path: "/query"
inputParameters:
- name: query
in: query
- name: period
in: query
operations:
- name: query-metrics
method: GET
- type: http
namespace: slack
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
Accepts a payment in a foreign currency, converts the amount using real-time exchange rates, processes the payment in Square, and logs the conversion in PostgreSQL.
naftiko: "0.5"
info:
label: "Multi-Currency Payment Conversion"
description: "Accepts a payment in a foreign currency, converts the amount using real-time exchange rates, processes the payment in Square, and logs the conversion in PostgreSQL."
tags:
- multi-currency
- payments
- square
- postgresql
- fintech
capability:
exposes:
- type: mcp
namespace: currency-payments
port: 8080
tools:
- name: process-multicurrency-payment
description: "Convert and process a foreign currency payment through Square."
inputParameters:
- name: source_id
in: body
type: string
description: "The Square payment source token."
- name: amount
in: body
type: integer
description: "The amount in the source currency's smallest denomination."
- name: source_currency
in: body
type: string
description: "The source ISO 4217 currency code."
- name: target_currency
in: body
type: string
description: "The target ISO 4217 currency code (typically USD)."
steps:
- name: get-exchange-rate
type: call
call: "exchangerate.get-rate"
with:
base: "{{source_currency}}"
target: "{{target_currency}}"
- name: process-payment
type: call
call: "square.create-payment"
with:
source_id: "{{source_id}}"
amount_money:
amount: "{{amount}}"
currency: "{{source_currency}}"
- name: log-conversion
type: call
call: "postgresql.insert-row"
with:
table: "currency_conversions"
payment_id: "{{process-payment.payment.id}}"
source_amount: "{{amount}}"
source_currency: "{{source_currency}}"
exchange_rate: "{{get-exchange-rate.rate}}"
target_currency: "{{target_currency}}"
consumes:
- type: http
namespace: exchangerate
baseUri: "https://api.exchangerate.host"
authentication:
type: apiKey
name: "access_key"
in: query
value: "$secrets.exchangerate_key"
resources:
- name: rates
path: "/convert"
operations:
- name: get-rate
method: GET
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: payments
path: "/payments"
operations:
- name: create-payment
method: POST
- type: http
namespace: postgresql
baseUri: "https://block-data.internal/api/v1"
authentication:
type: bearer
token: "$secrets.internal_db_token"
resources:
- name: rows
path: "/tables/{{table}}/rows"
inputParameters:
- name: table
in: path
operations:
- name: insert-row
method: POST
Queries Palo Alto Networks Panorama for active firewall rules protecting Block's payment processing network perimeter.
naftiko: "0.5"
info:
label: "Palo Alto Networks Firewall Rule Check"
description: "Queries Palo Alto Networks Panorama for active firewall rules protecting Block's payment processing network perimeter."
tags:
- security
- palo-alto-networks
- infrastructure
- payments
capability:
exposes:
- type: mcp
namespace: pan-firewall
port: 8080
tools:
- name: get-firewall-rules
description: "Retrieve active firewall rules from Palo Alto Panorama."
inputParameters:
- name: device_group
in: body
type: string
description: "The Panorama device group name."
call: "paloalto.get-security-rules"
with:
device_group: "{{device_group}}"
consumes:
- type: http
namespace: paloalto
baseUri: "https://panorama.block.internal/restapi/v10.2"
authentication:
type: apiKey
name: "X-PAN-KEY"
in: header
value: "$secrets.panorama_api_key"
resources:
- name: security-rules
path: "/Policies/SecurityRules"
operations:
- name: get-security-rules
method: GET
Monitors payment gateway health via Datadog, triggers failover to backup gateway via F5 load balancer, opens a ServiceNow incident, and alerts the payments team via Slack.
naftiko: "0.5"
info:
label: "Payment Gateway Failover Pipeline"
description: "Monitors payment gateway health via Datadog, triggers failover to backup gateway via F5 load balancer, opens a ServiceNow incident, and alerts the payments team via Slack."
tags:
- reliability
- datadog
- f5-networks
- servicenow
- slack
capability:
exposes:
- type: mcp
namespace: gateway-failover
port: 8080
tools:
- name: trigger-failover
description: "Execute payment gateway failover with incident tracking and notification."
inputParameters:
- name: gateway_name
in: body
type: string
description: "The payment gateway service name."
steps:
- name: check-health
type: call
call: "datadog.get-monitors"
with:
tags: "service:{{gateway_name}}"
- name: switch-pool
type: call
call: "f5.update-pool"
with:
pool_name: "{{gateway_name}}-pool"
action: "failover"
- name: open-incident
type: call
call: "servicenow.create-incident"
with:
short_description: "Payment gateway failover: {{gateway_name}}"
description: "Gateway {{gateway_name}} failing health checks. Failover initiated to backup pool."
urgency: "1"
impact: "1"
- name: alert-team
type: call
call: "slack.post-message"
with:
channel: "#payments-oncall"
text: "FAILOVER: {{gateway_name}} switched to backup. Incident: {{open-incident.number}}. Monitor status: {{check-health.overall_state}}."
consumes:
- type: http
namespace: datadog
baseUri: "https://api.datadoghq.com/api/v1"
authentication:
type: apiKey
name: "DD-API-KEY"
in: header
value: "$secrets.datadog_api_key"
resources:
- name: monitors
path: "/monitor"
inputParameters:
- name: tags
in: query
operations:
- name: get-monitors
method: GET
- type: http
namespace: f5
baseUri: "https://f5.block.xyz/mgmt/tm/ltm"
authentication:
type: basic
username: "$secrets.f5_user"
password: "$secrets.f5_password"
resources:
- name: pools
path: "/pool/{{pool_name}}"
inputParameters:
- name: pool_name
in: path
operations:
- name: update-pool
method: PATCH
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: incidents
path: "/table/incident"
operations:
- name: create-incident
method: POST
- type: http
namespace: slack
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
Given a Square payment ID, fetches the payment, retrieves the corresponding payout from the Payouts API, and logs the reconciliation record in PostgreSQL.
naftiko: "0.5"
info:
label: "Payment-to-Settlement Reconciliation"
description: "Given a Square payment ID, fetches the payment, retrieves the corresponding payout from the Payouts API, and logs the reconciliation record in PostgreSQL."
tags:
- settlement
- reconciliation
- square
- postgresql
- fintech
capability:
exposes:
- type: mcp
namespace: settlement-recon
port: 8080
tools:
- name: reconcile-payment-payout
description: "Match a Square payment to its payout and log the reconciliation."
inputParameters:
- name: payment_id
in: body
type: string
description: "The Square payment ID to reconcile."
steps:
- name: get-payment
type: call
call: "square.get-payment"
with:
payment_id: "{{payment_id}}"
- name: list-payouts
type: call
call: "square.list-payout-entries"
with:
payout_id: "{{get-payment.payment.payout_id}}"
- name: log-reconciliation
type: call
call: "postgresql.insert-row"
with:
table: "payment_reconciliation"
payment_id: "{{payment_id}}"
payout_id: "{{get-payment.payment.payout_id}}"
amount: "{{get-payment.payment.total_money.amount}}"
settled_at: "{{list-payouts.payout_entries.0.effective_at}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: payments
path: "/payments/{{payment_id}}"
inputParameters:
- name: payment_id
in: path
operations:
- name: get-payment
method: GET
- name: payout-entries
path: "/payouts/{{payout_id}}/payout-entries"
inputParameters:
- name: payout_id
in: path
operations:
- name: list-payout-entries
method: GET
- type: http
namespace: postgresql
baseUri: "https://block-data.internal/api/v1"
authentication:
type: bearer
token: "$secrets.internal_db_token"
resources:
- name: rows
path: "/tables/{{table}}/rows"
inputParameters:
- name: table
in: path
operations:
- name: insert-row
method: POST
After a new React Native SDK build completes in GitLab, runs SonarQube analysis and posts the build artifact details to the Square developer documentation portal.
naftiko: "0.5"
info:
label: "React Native SDK Build Verification"
description: "After a new React Native SDK build completes in GitLab, runs SonarQube analysis and posts the build artifact details to the Square developer documentation portal."
tags:
- developer-platform
- react-native
- gitlab
- sonarqube
- sdk
capability:
exposes:
- type: mcp
namespace: sdk-build
port: 8080
tools:
- name: verify-sdk-build
description: "Run quality analysis on a React Native SDK build and publish verification to the dev portal."
inputParameters:
- name: project_id
in: body
type: string
description: "The GitLab project ID for the SDK."
- name: pipeline_id
in: body
type: string
description: "The GitLab pipeline ID."
- name: sonar_project_key
in: body
type: string
description: "The SonarQube project key."
steps:
- name: get-pipeline
type: call
call: "gitlab.get-pipeline"
with:
project_id: "{{project_id}}"
pipeline_id: "{{pipeline_id}}"
- name: get-quality
type: call
call: "sonarqube.get-quality-gate"
with:
projectKey: "{{sonar_project_key}}"
- name: get-artifacts
type: call
call: "gitlab.list-pipeline-artifacts"
with:
project_id: "{{project_id}}"
pipeline_id: "{{pipeline_id}}"
consumes:
- type: http
namespace: gitlab
baseUri: "https://gitlab.block.internal/api/v4"
authentication:
type: bearer
token: "$secrets.gitlab_token"
resources:
- name: pipelines
path: "/projects/{{project_id}}/pipelines/{{pipeline_id}}"
inputParameters:
- name: project_id
in: path
- name: pipeline_id
in: path
operations:
- name: get-pipeline
method: GET
- name: artifacts
path: "/projects/{{project_id}}/pipelines/{{pipeline_id}}/artifacts"
inputParameters:
- name: project_id
in: path
- name: pipeline_id
in: path
operations:
- name: list-pipeline-artifacts
method: GET
- type: http
namespace: sonarqube
baseUri: "https://sonar.block.internal/api"
authentication:
type: bearer
token: "$secrets.sonarqube_token"
resources:
- name: quality-gates
path: "/qualitygates/project_status"
operations:
- name: get-quality-gate
method: GET
Exports a batch of Square transactions for a date range and archives them as a JSON file in Amazon S3 for long-term storage and compliance.
naftiko: "0.5"
info:
label: "S3 Transaction Archive"
description: "Exports a batch of Square transactions for a date range and archives them as a JSON file in Amazon S3 for long-term storage and compliance."
tags:
- archival
- square
- amazon-s3
- compliance
capability:
exposes:
- type: mcp
namespace: transaction-archive
port: 8080
tools:
- name: archive-transactions
description: "Export Square transactions and store in S3 for archival."
inputParameters:
- name: location_id
in: body
type: string
description: "The Square location ID."
- name: start_date
in: body
type: string
description: "Start date YYYY-MM-DD."
- name: end_date
in: body
type: string
description: "End date YYYY-MM-DD."
steps:
- name: list-payments
type: call
call: "square.list-payments"
with:
location_id: "{{location_id}}"
begin_time: "{{start_date}}T00:00:00Z"
end_time: "{{end_date}}T23:59:59Z"
- name: upload-to-s3
type: call
call: "s3.put-object"
with:
Bucket: "block-transaction-archives"
Key: "{{location_id}}/{{start_date}}_{{end_date}}.json"
Body: "{{list-payments}}"
ContentType: "application/json"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: payments
path: "/payments"
operations:
- name: list-payments
method: GET
- type: http
namespace: s3
baseUri: "https://s3.us-east-1.amazonaws.com"
authentication:
type: awsSigV4
accessKeyId: "$secrets.aws_access_key_id"
secretAccessKey: "$secrets.aws_secret_access_key"
region: "us-east-1"
service: "s3"
resources:
- name: objects
path: "/{{Bucket}}/{{Key}}"
inputParameters:
- name: Bucket
in: path
- name: Key
in: path
operations:
- name: put-object
method: PUT
Validates a new SDK release by running SonarQube quality checks, verifying GitLab CI tests pass, publishing the artifact, and notifying developers via Slack.
naftiko: "0.5"
info:
label: "SDK Release Validation Pipeline"
description: "Validates a new SDK release by running SonarQube quality checks, verifying GitLab CI tests pass, publishing the artifact, and notifying developers via Slack."
tags:
- developer-platform
- sonarqube
- gitlab
- slack
capability:
exposes:
- type: mcp
namespace: sdk-release
port: 8080
tools:
- name: validate-and-release
description: "Validate code quality, run tests, and publish an SDK release."
inputParameters:
- name: project_id
in: body
type: string
description: "GitLab project ID."
- name: version
in: body
type: string
description: "SDK version to release."
steps:
- name: quality-check
type: call
call: "sonarqube.get-quality-gate"
with:
project_key: "{{project_id}}"
- name: run-tests
type: call
call: "gitlab.create-pipeline"
with:
project_id: "{{project_id}}"
ref: "v{{version}}"
variables: "RELEASE=true"
- name: publish-artifact
type: call
call: "gitlab.create-release"
with:
project_id: "{{project_id}}"
tag_name: "v{{version}}"
description: "SDK Release v{{version}}. Quality gate: {{quality-check.status}}."
- name: announce-release
type: call
call: "slack.post-message"
with:
channel: "#developer-platform"
text: "SDK v{{version}} released! Quality: {{quality-check.status}}. Pipeline: {{run-tests.id}}. Download: {{publish-artifact.assets_url}}."
consumes:
- type: http
namespace: sonarqube
baseUri: "https://sonar.block.xyz/api"
authentication:
type: bearer
token: "$secrets.sonarqube_token"
resources:
- name: quality-gates
path: "/qualitygates/project_status"
inputParameters:
- name: project_key
in: query
operations:
- name: get-quality-gate
method: GET
- type: http
namespace: gitlab
baseUri: "https://gitlab.block.xyz/api/v4"
authentication:
type: bearer
token: "$secrets.gitlab_token"
resources:
- name: pipelines
path: "/projects/{{project_id}}/pipeline"
inputParameters:
- name: project_id
in: path
operations:
- name: create-pipeline
method: POST
- name: releases
path: "/projects/{{project_id}}/releases"
inputParameters:
- name: project_id
in: path
operations:
- name: create-release
method: POST
- type: http
namespace: slack
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
Detects a security event via Cloudflare WAF, blocks the source IP via Palo Alto firewall, creates a ServiceNow security incident, and alerts the SOC via Slack.
naftiko: "0.5"
info:
label: "Security Incident Response Pipeline"
description: "Detects a security event via Cloudflare WAF, blocks the source IP via Palo Alto firewall, creates a ServiceNow security incident, and alerts the SOC via Slack."
tags:
- security
- cloudflare
- palo-alto-networks
- servicenow
- slack
capability:
exposes:
- type: mcp
namespace: security-ir
port: 8080
tools:
- name: respond-to-incident
description: "Block a threat source and create tracking records for security incident response."
inputParameters:
- name: source_ip
in: body
type: string
description: "The attacking source IP address."
- name: attack_type
in: body
type: string
description: "Type of attack detected."
steps:
- name: block-at-waf
type: call
call: "cloudflare.create-firewall-rule"
with:
expression: "ip.src eq {{source_ip}}"
action: "block"
description: "Block {{attack_type}} from {{source_ip}}"
- name: block-at-firewall
type: call
call: "paloalto.add-to-blocklist"
with:
ip: "{{source_ip}}"
reason: "{{attack_type}}"
- name: create-incident
type: call
call: "servicenow.create-incident"
with:
short_description: "Security incident: {{attack_type}} from {{source_ip}}"
description: "Attack type: {{attack_type}}. Source: {{source_ip}}. Blocked at WAF and firewall."
category: "security"
urgency: "1"
- name: alert-soc
type: call
call: "slack.post-message"
with:
channel: "#soc-alerts"
text: "Security incident: {{attack_type}} from {{source_ip}}. Blocked at WAF and firewall. Incident: {{create-incident.number}}."
consumes:
- type: http
namespace: cloudflare
baseUri: "https://api.cloudflare.com/client/v4"
authentication:
type: bearer
token: "$secrets.cloudflare_token"
resources:
- name: firewall-rules
path: "/zones/$secrets.cloudflare_zone_id/firewall/rules"
operations:
- name: create-firewall-rule
method: POST
- type: http
namespace: paloalto
baseUri: "https://panorama.block.xyz/restapi/v10.1"
authentication:
type: apiKey
name: "X-PAN-KEY"
in: header
value: "$secrets.paloalto_api_key"
resources:
- name: blocklist
path: "/Objects/Addresses"
operations:
- name: add-to-blocklist
method: POST
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: incidents
path: "/table/incident"
operations:
- name: create-incident
method: POST
- type: http
namespace: slack
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
Uploads a compliance document to the Block SharePoint compliance library and creates a metadata record for audit tracking.
naftiko: "0.5"
info:
label: "SharePoint Compliance Document Upload"
description: "Uploads a compliance document to the Block SharePoint compliance library and creates a metadata record for audit tracking."
tags:
- compliance
- sharepoint
- documents
capability:
exposes:
- type: mcp
namespace: compliance-docs
port: 8080
tools:
- name: upload-compliance-doc
description: "Upload a compliance document to SharePoint."
inputParameters:
- name: document_name
in: body
type: string
description: "The document file name."
- name: folder_path
in: body
type: string
description: "The SharePoint folder path."
- name: content_base64
in: body
type: string
description: "The document content in base64 encoding."
call: "sharepoint.upload-file"
with:
site_id: "block_compliance"
folder_path: "{{folder_path}}"
file_name: "{{document_name}}"
content: "{{content_base64}}"
consumes:
- type: http
namespace: sharepoint
baseUri: "https://graph.microsoft.com/v1.0/sites"
authentication:
type: bearer
token: "$secrets.msgraph_token"
resources:
- name: drive-items
path: "/{{site_id}}/drive/root:/{{folder_path}}/{{file_name}}:/content"
inputParameters:
- name: site_id
in: path
- name: folder_path
in: path
- name: file_name
in: path
operations:
- name: upload-file
method: PUT
Retrieves the SonarQube quality gate status for a Square developer SDK project and posts the result to the Bitbucket pull request.
naftiko: "0.5"
info:
label: "SonarQube Code Quality Gate Check"
description: "Retrieves the SonarQube quality gate status for a Square developer SDK project and posts the result to the Bitbucket pull request."
tags:
- code-quality
- sonarqube
- bitbucket
- developer-platform
capability:
exposes:
- type: mcp
namespace: code-quality
port: 8080
tools:
- name: check-quality-gate
description: "Fetch SonarQube quality gate status and update the Bitbucket PR."
inputParameters:
- name: project_key
in: body
type: string
description: "The SonarQube project key."
- name: pr_id
in: body
type: string
description: "The Bitbucket pull request ID."
- name: repo_slug
in: body
type: string
description: "The Bitbucket repository slug."
steps:
- name: get-quality-gate
type: call
call: "sonarqube.get-quality-gate"
with:
projectKey: "{{project_key}}"
- name: post-pr-comment
type: call
call: "bitbucket.create-pr-comment"
with:
repo_slug: "{{repo_slug}}"
pull_request_id: "{{pr_id}}"
content: "SonarQube Quality Gate: {{get-quality-gate.projectStatus.status}}. Details: {{get-quality-gate.projectStatus.conditions}}"
consumes:
- type: http
namespace: sonarqube
baseUri: "https://sonar.block.internal/api"
authentication:
type: bearer
token: "$secrets.sonarqube_token"
resources:
- name: quality-gates
path: "/qualitygates/project_status"
operations:
- name: get-quality-gate
method: GET
- type: http
namespace: bitbucket
baseUri: "https://api.bitbucket.org/2.0/repositories/block"
authentication:
type: bearer
token: "$secrets.bitbucket_token"
resources:
- name: pr-comments
path: "/{{repo_slug}}/pullrequests/{{pull_request_id}}/comments"
inputParameters:
- name: repo_slug
in: path
- name: pull_request_id
in: path
operations:
- name: create-pr-comment
method: POST
Queries Spring Boot Actuator health endpoints across Block's payment microservices and aggregates the results into Datadog for centralized monitoring.
naftiko: "0.5"
info:
label: "Spring Boot Microservice Health Aggregator"
description: "Queries Spring Boot Actuator health endpoints across Block's payment microservices and aggregates the results into Datadog for centralized monitoring."
tags:
- health-checks
- spring-boot
- datadog
- infrastructure
capability:
exposes:
- type: mcp
namespace: service-health
port: 8080
tools:
- name: check-and-report-health
description: "Query a Spring Boot service health endpoint and report to Datadog."
inputParameters:
- name: service_name
in: body
type: string
description: "The internal service name."
- name: service_url
in: body
type: string
description: "The base URL of the Spring Boot service."
steps:
- name: get-health
type: call
call: "springboot.get-health"
with:
service_url: "{{service_url}}"
- name: report-to-datadog
type: call
call: "datadog.submit-metric"
with:
series:
- metric: "block.service.health"
points:
- - "{{now_epoch}}"
- 1
tags:
- "service:{{service_name}}"
- "status:{{get-health.status}}"
consumes:
- type: http
namespace: springboot
baseUri: "{{service_url}}"
authentication:
type: bearer
token: "$secrets.internal_service_token"
resources:
- name: actuator
path: "/actuator/health"
operations:
- name: get-health
method: GET
- type: http
namespace: datadog
baseUri: "https://api.datadoghq.com/api/v1"
authentication:
type: apiKey
name: "DD-API-KEY"
in: header
value: "$secrets.datadog_api_key"
resources:
- name: metrics
path: "/series"
operations:
- name: submit-metric
method: POST
Polls Spring Boot actuator endpoints across payment microservices, aggregates health data in Datadog, creates alerts for unhealthy services, and posts status to Slack.
naftiko: "0.5"
info:
label: "Spring Boot Service Health Aggregator Pipeline"
description: "Polls Spring Boot actuator endpoints across payment microservices, aggregates health data in Datadog, creates alerts for unhealthy services, and posts status to Slack."
tags:
- observability
- spring-boot
- datadog
- slack
capability:
exposes:
- type: mcp
namespace: health-aggregator
port: 8080
tools:
- name: aggregate-health
description: "Aggregate health status across Spring Boot microservices with alerting."
inputParameters:
- name: service_group
in: body
type: string
description: "Service group name (e.g. payments, identity)."
steps:
- name: get-services
type: call
call: "datadog.search-services"
with:
query: "group:{{service_group}}"
- name: check-health
type: call
call: "datadog.query-metrics"
with:
query: "avg:spring.health{group:{{service_group}}} by {service}"
period: "5m"
- name: create-alert
type: call
call: "datadog.create-monitor"
with:
name: "Health degradation: {{service_group}}"
query: "avg(last_5m):avg:spring.health{group:{{service_group}}} < 1"
type: "metric alert"
- name: post-status
type: call
call: "slack.post-message"
with:
channel: "#platform-health"
text: "Health check for {{service_group}}: {{check-health.healthy_count}}/{{check-health.total_count}} services healthy."
consumes:
- type: http
namespace: datadog
baseUri: "https://api.datadoghq.com/api/v1"
authentication:
type: apiKey
name: "DD-API-KEY"
in: header
value: "$secrets.datadog_api_key"
resources:
- name: services
path: "/service_dependencies"
operations:
- name: search-services
method: GET
- name: metrics
path: "/query"
inputParameters:
- name: query
in: query
- name: period
in: query
operations:
- name: query-metrics
method: GET
- name: monitors
path: "/monitor"
operations:
- name: create-monitor
method: POST
- type: http
namespace: slack
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
Creates a customer appointment in Square Bookings, sends confirmation via SendGrid, adds a calendar event via Google Calendar, and updates the CRM in HubSpot.
naftiko: "0.5"
info:
label: "Square Appointment Booking Flow"
description: "Creates a customer appointment in Square Bookings, sends confirmation via SendGrid, adds a calendar event via Google Calendar, and updates the CRM in HubSpot."
tags:
- appointments
- square
- sendgrid
- hubspot
capability:
exposes:
- type: mcp
namespace: appointment-flow
port: 8080
tools:
- name: book-appointment
description: "Create an appointment with confirmation email, calendar sync, and CRM update."
inputParameters:
- name: customer_id
in: body
type: string
description: "Square customer ID."
- name: service_variation_id
in: body
type: string
description: "Square service variation ID."
- name: start_at
in: body
type: string
description: "Appointment start time ISO 8601."
- name: customer_email
in: body
type: string
description: "Customer email."
steps:
- name: create-booking
type: call
call: "square.create-booking"
with:
customer_id: "{{customer_id}}"
service_variation_id: "{{service_variation_id}}"
start_at: "{{start_at}}"
- name: send-confirmation
type: call
call: "sendgrid.send-email"
with:
to: "{{customer_email}}"
subject: "Appointment Confirmed — {{create-booking.start_at}}"
body: "Your appointment is confirmed for {{create-booking.start_at}}. Booking ID: {{create-booking.id}}."
- name: update-crm
type: call
call: "hubspot.create-engagement"
with:
type: "MEETING"
contact_email: "{{customer_email}}"
title: "Appointment: {{create-booking.service_name}}"
start_time: "{{start_at}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: bookings
path: "/bookings"
operations:
- name: create-booking
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
- type: http
namespace: hubspot
baseUri: "https://api.hubapi.com"
authentication:
type: bearer
token: "$secrets.hubspot_token"
resources:
- name: engagements
path: "/crm/v3/objects/meetings"
operations:
- name: create-engagement
method: POST
Retrieves bank account details linked to a Square merchant account, returning account type, status, and routing information for settlement configuration.
naftiko: "0.5"
info:
label: "Square Bank Account Lookup"
description: "Retrieves bank account details linked to a Square merchant account, returning account type, status, and routing information for settlement configuration."
tags:
- banking
- square
capability:
exposes:
- type: mcp
namespace: square-banking
port: 8080
tools:
- name: get-bank-account
description: "Look up a linked bank account by bank account ID."
inputParameters:
- name: bank_account_id
in: body
type: string
description: "The Square bank account identifier."
call: "square.get-bank-account"
with:
bank_account_id: "{{bank_account_id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: bank-accounts
path: "/bank-accounts/{{bank_account_id}}"
inputParameters:
- name: bank_account_id
in: path
operations:
- name: get-bank-account
method: GET
Retrieves an appointment booking from Square Bookings API by booking ID, returning service details, staff assignment, and appointment time.
naftiko: "0.5"
info:
label: "Square Booking Retrieval"
description: "Retrieves an appointment booking from Square Bookings API by booking ID, returning service details, staff assignment, and appointment time."
tags:
- appointments
- square
capability:
exposes:
- type: mcp
namespace: square-bookings
port: 8080
tools:
- name: get-booking
description: "Look up a Square appointment booking by booking ID."
inputParameters:
- name: booking_id
in: body
type: string
description: "The Square booking identifier."
call: "square.get-booking"
with:
booking_id: "{{booking_id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: bookings
path: "/bookings/{{booking_id}}"
inputParameters:
- name: booking_id
in: path
operations:
- name: get-booking
method: GET
Fetches a catalog item from the Square Catalog API by object ID, returning the item name, variations, pricing, and inventory state.
naftiko: "0.5"
info:
label: "Square Catalog Item Retrieval"
description: "Fetches a catalog item from the Square Catalog API by object ID, returning the item name, variations, pricing, and inventory state."
tags:
- catalog
- square
- merchant-services
capability:
exposes:
- type: mcp
namespace: square-catalog
port: 8080
tools:
- name: get-catalog-item
description: "Retrieve a Square catalog object by its ID."
inputParameters:
- name: object_id
in: body
type: string
description: "The Square catalog object ID."
call: "square.get-catalog-object"
with:
object_id: "{{object_id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: catalog
path: "/catalog/object/{{object_id}}"
inputParameters:
- name: object_id
in: path
operations:
- name: get-catalog-object
method: GET
Syncs product catalog between Square and BigCommerce, updates inventory counts, and notifies the merchant via MailChimp when sync completes.
naftiko: "0.5"
info:
label: "Square Catalog Sync Pipeline"
description: "Syncs product catalog between Square and BigCommerce, updates inventory counts, and notifies the merchant via MailChimp when sync completes."
tags:
- catalog
- square
- bigcommerce
- mailchimp
capability:
exposes:
- type: mcp
namespace: catalog-sync
port: 8080
tools:
- name: sync-catalog
description: "Synchronize product catalog between Square and BigCommerce with merchant notification."
inputParameters:
- name: location_id
in: body
type: string
description: "The Square location identifier."
- name: merchant_email
in: body
type: string
description: "Merchant email for notification."
steps:
- name: get-catalog
type: call
call: "square.list-catalog"
with:
types: "ITEM"
- name: sync-to-bigcommerce
type: call
call: "bigcommerce.batch-update-products"
with:
products: "{{get-catalog.objects}}"
- name: sync-inventory
type: call
call: "square.get-inventory-counts"
with:
location_ids: "{{location_id}}"
- name: notify-merchant
type: call
call: "mailchimp.send-transactional"
with:
to: "{{merchant_email}}"
subject: "Catalog Sync Complete"
body: "Synced {{get-catalog.total_count}} items to BigCommerce. Inventory updated for location {{location_id}}."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: catalog
path: "/catalog/list"
inputParameters:
- name: types
in: query
operations:
- name: list-catalog
method: GET
- name: inventory
path: "/inventory/counts/batch-retrieve"
operations:
- name: get-inventory-counts
method: POST
- type: http
namespace: bigcommerce
baseUri: "https://api.bigcommerce.com/stores/$secrets.bigcommerce_store_hash/v3"
authentication:
type: apiKey
name: "X-Auth-Token"
in: header
value: "$secrets.bigcommerce_token"
resources:
- name: products
path: "/catalog/products"
operations:
- name: batch-update-products
method: PUT
- type: http
namespace: mailchimp
baseUri: "https://mandrillapp.com/api/1.0"
authentication:
type: apiKey
name: "key"
in: body
value: "$secrets.mailchimp_transactional_key"
resources:
- name: messages
path: "/messages/send"
operations:
- name: send-transactional
method: POST
Creates a Square Online Checkout payment link for a given amount, item name, and merchant location.
naftiko: "0.5"
info:
label: "Square Checkout Link Generator"
description: "Creates a Square Online Checkout payment link for a given amount, item name, and merchant location."
tags:
- checkout
- square
- ecommerce
- payments
capability:
exposes:
- type: mcp
namespace: square-checkout
port: 8080
tools:
- name: create-checkout-link
description: "Generate a Square payment link for online checkout."
inputParameters:
- name: location_id
in: body
type: string
description: "The Square location ID."
- name: item_name
in: body
type: string
description: "The item name for the checkout."
- name: amount_cents
in: body
type: integer
description: "The amount in cents."
- name: currency
in: body
type: string
description: "ISO 4217 currency code."
call: "square.create-payment-link"
with:
quick_pay:
name: "{{item_name}}"
price_money:
amount: "{{amount_cents}}"
currency: "{{currency}}"
location_id: "{{location_id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: payment-links
path: "/online-checkout/payment-links"
operations:
- name: create-payment-link
method: POST
Retrieves a customer profile from the Square Customer Directory by customer ID, returning contact details, preferences, and transaction history summary.
naftiko: "0.5"
info:
label: "Square Customer Lookup"
description: "Retrieves a customer profile from the Square Customer Directory by customer ID, returning contact details, preferences, and transaction history summary."
tags:
- customers
- square
capability:
exposes:
- type: mcp
namespace: square-customers
port: 8080
tools:
- name: get-customer
description: "Look up a Square customer by customer ID."
inputParameters:
- name: customer_id
in: body
type: string
description: "The Square customer identifier."
call: "square.get-customer"
with:
customer_id: "{{customer_id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: customers
path: "/customers/{{customer_id}}"
inputParameters:
- name: customer_id
in: path
operations:
- name: get-customer
method: GET
When a payment dispute is opened, fetches the dispute details from Square, retrieves related order evidence, and submits the evidence package back to the Disputes API.
naftiko: "0.5"
info:
label: "Square Dispute Evidence Submission"
description: "When a payment dispute is opened, fetches the dispute details from Square, retrieves related order evidence, and submits the evidence package back to the Disputes API."
tags:
- disputes
- square
- risk
- merchant-services
capability:
exposes:
- type: mcp
namespace: square-disputes
port: 8080
tools:
- name: submit-dispute-evidence
description: "Gather order evidence for a Square dispute and submit it to the Disputes API."
inputParameters:
- name: dispute_id
in: body
type: string
description: "The Square dispute ID."
steps:
- name: get-dispute
type: call
call: "square.get-dispute"
with:
dispute_id: "{{dispute_id}}"
- name: get-order-evidence
type: call
call: "square.get-order"
with:
order_id: "{{get-dispute.dispute.order_id}}"
- name: submit-evidence
type: call
call: "square.create-dispute-evidence-text"
with:
dispute_id: "{{dispute_id}}"
evidence_type: "GENERIC_EVIDENCE"
evidence_text: "Order {{get-order-evidence.order.id}} fulfilled on {{get-order-evidence.order.fulfillments.0.updated_at}}. Total: {{get-order-evidence.order.total_money.amount}} {{get-order-evidence.order.total_money.currency}}."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: disputes
path: "/disputes/{{dispute_id}}"
inputParameters:
- name: dispute_id
in: path
operations:
- name: get-dispute
method: GET
- name: orders
path: "/orders/{{order_id}}"
inputParameters:
- name: order_id
in: path
operations:
- name: get-order
method: GET
- name: dispute-evidence
path: "/disputes/{{dispute_id}}/evidence-text"
inputParameters:
- name: dispute_id
in: path
operations:
- name: create-dispute-evidence-text
method: POST
Retrieves the balance and status of a Square gift card by its GAN (gift card account number).
naftiko: "0.5"
info:
label: "Square Gift Card Balance"
description: "Retrieves the balance and status of a Square gift card by its GAN (gift card account number)."
tags:
- gift-cards
- square
- merchant-services
capability:
exposes:
- type: mcp
namespace: square-gift-cards
port: 8080
tools:
- name: get-gift-card-balance
description: "Look up a Square gift card balance by GAN."
inputParameters:
- name: gan
in: body
type: string
description: "The gift card account number."
call: "square.retrieve-gift-card-from-gan"
with:
gan: "{{gan}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: gift-cards
path: "/gift-cards/from-gan"
operations:
- name: retrieve-gift-card-from-gan
method: POST
Creates a batch of Square gift cards, links them to a loyalty promotion, distributes activation codes via MailChimp, and tracks redemption in Google Analytics.
naftiko: "0.5"
info:
label: "Square Gift Card Campaign Orchestrator"
description: "Creates a batch of Square gift cards, links them to a loyalty promotion, distributes activation codes via MailChimp, and tracks redemption in Google Analytics."
tags:
- gift-cards
- square
- mailchimp
- google-analytics
capability:
exposes:
- type: mcp
namespace: gift-card-campaign
port: 8080
tools:
- name: launch-gift-card-campaign
description: "Create gift cards and launch a distribution campaign."
inputParameters:
- name: amount_cents
in: body
type: integer
description: "Gift card value in cents."
- name: quantity
in: body
type: integer
description: "Number of gift cards to create."
- name: campaign_name
in: body
type: string
description: "Marketing campaign name."
steps:
- name: create-cards
type: call
call: "square.create-gift-card-batch"
with:
amount: "{{amount_cents}}"
quantity: "{{quantity}}"
- name: create-campaign
type: call
call: "mailchimp.create-campaign"
with:
list_id: "gift-card-recipients"
subject: "{{campaign_name}} — Complimentary Gift Card!"
body: "You have received a ${{amount_cents}} gift card! Redeem with code: {{create-cards.activation_codes}}."
- name: track-campaign
type: call
call: "google-analytics.send-event"
with:
event_name: "gift_card_campaign_launched"
campaign: "{{campaign_name}}"
value: "{{quantity}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: gift-cards
path: "/gift-cards"
operations:
- name: create-gift-card-batch
method: POST
- type: http
namespace: mailchimp
baseUri: "https://us1.api.mailchimp.com/3.0"
authentication:
type: basic
username: "anystring"
password: "$secrets.mailchimp_api_key"
resources:
- name: campaigns
path: "/campaigns"
operations:
- name: create-campaign
method: POST
- type: http
namespace: google-analytics
baseUri: "https://www.google-analytics.com"
authentication:
type: apiKey
name: "measurement_id"
in: query
value: "$secrets.ga_measurement_id"
resources:
- name: events
path: "/mp/collect"
operations:
- name: send-event
method: POST
Retrieves the current inventory count for a catalog item variation at a specific Square location.
naftiko: "0.5"
info:
label: "Square Inventory Count"
description: "Retrieves the current inventory count for a catalog item variation at a specific Square location."
tags:
- inventory
- square
- merchant-services
capability:
exposes:
- type: mcp
namespace: square-inventory
port: 8080
tools:
- name: get-inventory-count
description: "Retrieve the inventory count for a catalog item variation at a location."
inputParameters:
- name: catalog_object_id
in: body
type: string
description: "The catalog object ID of the item variation."
- name: location_id
in: body
type: string
description: "The Square location ID."
call: "square.get-inventory-count"
with:
catalog_object_id: "{{catalog_object_id}}"
location_ids:
- "{{location_id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: inventory
path: "/inventory/counts/batch-retrieve"
operations:
- name: get-inventory-count
method: POST
Creates a Square invoice for a customer, attaches line items, and publishes it for email delivery.
naftiko: "0.5"
info:
label: "Square Invoice Creator"
description: "Creates a Square invoice for a customer, attaches line items, and publishes it for email delivery."
tags:
- invoices
- square
- merchant-services
capability:
exposes:
- type: mcp
namespace: square-invoices
port: 8080
tools:
- name: create-and-publish-invoice
description: "Create a Square invoice with line items and publish it immediately for delivery to the customer."
inputParameters:
- name: customer_id
in: body
type: string
description: "The Square customer ID to invoice."
- name: location_id
in: body
type: string
description: "The Square location ID for the invoice."
- name: line_item_name
in: body
type: string
description: "Name of the line item."
- name: amount_cents
in: body
type: integer
description: "The line item amount in cents."
steps:
- name: create-invoice
type: call
call: "square.create-invoice"
with:
invoice:
location_id: "{{location_id}}"
primary_recipient:
customer_id: "{{customer_id}}"
payment_requests:
- request_type: "BALANCE"
due_date: "{{due_date}}"
- name: publish-invoice
type: call
call: "square.publish-invoice"
with:
invoice_id: "{{create-invoice.invoice.id}}"
version: "{{create-invoice.invoice.version}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: invoices
path: "/invoices"
operations:
- name: create-invoice
method: POST
- name: invoice-publish
path: "/invoices/{{invoice_id}}/publish"
inputParameters:
- name: invoice_id
in: path
operations:
- name: publish-invoice
method: POST
Retrieves details for a Square merchant location by location ID, returning address, business hours, capabilities, and currency.
naftiko: "0.5"
info:
label: "Square Location Details"
description: "Retrieves details for a Square merchant location by location ID, returning address, business hours, capabilities, and currency."
tags:
- merchant-services
- square
capability:
exposes:
- type: mcp
namespace: square-locations
port: 8080
tools:
- name: get-location
description: "Look up a Square location by location ID."
inputParameters:
- name: location_id
in: body
type: string
description: "The Square location identifier."
call: "square.get-location"
with:
location_id: "{{location_id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: locations
path: "/locations/{{location_id}}"
inputParameters:
- name: location_id
in: path
operations:
- name: get-location
method: GET
After a payment completes, calculates loyalty points and adds them to the customer's Square Loyalty account.
naftiko: "0.5"
info:
label: "Square Loyalty Points Accumulation"
description: "After a payment completes, calculates loyalty points and adds them to the customer's Square Loyalty account."
tags:
- loyalty
- square
- merchant-services
capability:
exposes:
- type: mcp
namespace: loyalty-earn
port: 8080
tools:
- name: accrue-loyalty-points
description: "Calculate and add loyalty points to a customer account after payment."
inputParameters:
- name: account_id
in: body
type: string
description: "The Square Loyalty account ID."
- name: order_id
in: body
type: string
description: "The Square order ID that earned the points."
- name: location_id
in: body
type: string
description: "The Square location ID."
steps:
- name: calculate-points
type: call
call: "square.calculate-loyalty-points"
with:
order_id: "{{order_id}}"
loyalty_account_id: "{{account_id}}"
- name: accumulate-points
type: call
call: "square.accumulate-loyalty-points"
with:
account_id: "{{account_id}}"
accumulate_points:
order_id: "{{order_id}}"
points: "{{calculate-points.points}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: loyalty-calculate
path: "/loyalty/programs/{{program_id}}/calculate"
operations:
- name: calculate-loyalty-points
method: POST
- name: loyalty-accumulate
path: "/loyalty/accounts/{{account_id}}/accumulate"
inputParameters:
- name: account_id
in: path
operations:
- name: accumulate-loyalty-points
method: POST
Retrieves a customer's Square Loyalty points balance by account ID.
naftiko: "0.5"
info:
label: "Square Loyalty Points Balance"
description: "Retrieves a customer's Square Loyalty points balance by account ID."
tags:
- loyalty
- square
- merchant-services
capability:
exposes:
- type: mcp
namespace: square-loyalty
port: 8080
tools:
- name: get-loyalty-balance
description: "Look up the points balance for a Square Loyalty account."
inputParameters:
- name: account_id
in: body
type: string
description: "The Square Loyalty account ID."
call: "square.get-loyalty-account"
with:
account_id: "{{account_id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: loyalty-accounts
path: "/loyalty/accounts/{{account_id}}"
inputParameters:
- name: account_id
in: path
operations:
- name: get-loyalty-account
method: GET
Provisions a Square Online store for a merchant, syncs the catalog, configures Cloudflare DNS, and sends launch instructions via HubSpot.
naftiko: "0.5"
info:
label: "Square Online Store Provisioning"
description: "Provisions a Square Online store for a merchant, syncs the catalog, configures Cloudflare DNS, and sends launch instructions via HubSpot."
tags:
- ecommerce
- square
- cloudflare
- hubspot
capability:
exposes:
- type: mcp
namespace: online-store
port: 8080
tools:
- name: provision-online-store
description: "Set up a Square Online store with DNS and catalog sync."
inputParameters:
- name: location_id
in: body
type: string
description: "Square location ID."
- name: custom_domain
in: body
type: string
description: "Custom domain name."
- name: merchant_email
in: body
type: string
description: "Merchant email."
steps:
- name: create-site
type: call
call: "square.create-online-site"
with:
location_id: "{{location_id}}"
- name: sync-catalog
type: call
call: "square.sync-catalog-to-online"
with:
site_id: "{{create-site.site_id}}"
location_id: "{{location_id}}"
- name: configure-dns
type: call
call: "cloudflare.create-dns-record"
with:
zone_id: "$secrets.cloudflare_zone_id"
type: "CNAME"
name: "{{custom_domain}}"
content: "{{create-site.cname_target}}"
- name: send-launch-info
type: call
call: "hubspot.send-email"
with:
to: "{{merchant_email}}"
subject: "Your Square Online Store is Live!"
body: "Your online store is live at {{custom_domain}}. {{sync-catalog.item_count}} items synced. Site ID: {{create-site.site_id}}."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: sites
path: "/online/sites"
operations:
- name: create-online-site
method: POST
- name: catalog-sync
path: "/online/sites/{{site_id}}/catalog/sync"
inputParameters:
- name: site_id
in: path
operations:
- name: sync-catalog-to-online
method: POST
- type: http
namespace: cloudflare
baseUri: "https://api.cloudflare.com/client/v4"
authentication:
type: bearer
token: "$secrets.cloudflare_token"
resources:
- name: dns
path: "/zones/{{zone_id}}/dns_records"
inputParameters:
- name: zone_id
in: path
operations:
- name: create-dns-record
method: POST
- type: http
namespace: hubspot
baseUri: "https://api.hubapi.com"
authentication:
type: bearer
token: "$secrets.hubspot_token"
resources:
- name: emails
path: "/marketing/v3/transactional/single-email/send"
operations:
- name: send-email
method: POST
Fetches order details from Square Orders API by order ID, returning line items, totals, fulfillment status, and payment references.
naftiko: "0.5"
info:
label: "Square Order Retrieval"
description: "Fetches order details from Square Orders API by order ID, returning line items, totals, fulfillment status, and payment references."
tags:
- orders
- square
capability:
exposes:
- type: mcp
namespace: square-orders
port: 8080
tools:
- name: get-order
description: "Retrieve a Square order by order ID."
inputParameters:
- name: order_id
in: body
type: string
description: "The Square order identifier."
call: "square.get-order"
with:
order_id: "{{order_id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: orders
path: "/orders/{{order_id}}"
inputParameters:
- name: order_id
in: path
operations:
- name: get-order
method: GET
Creates a payment through the Square Payments API given a source token, amount, and currency. Returns the payment ID, status, and receipt URL for merchant reconciliation.
naftiko: "0.5"
info:
label: "Square Payment Processing"
description: "Creates a payment through the Square Payments API given a source token, amount, and currency. Returns the payment ID, status, and receipt URL for merchant reconciliation."
tags:
- payments
- square
- merchant-services
capability:
exposes:
- type: mcp
namespace: square-payments
port: 8080
tools:
- name: create-payment
description: "Process a payment through Square given a source token, amount in cents, and currency code."
inputParameters:
- name: source_id
in: body
type: string
description: "The payment source token from the Square Web Payments SDK."
- name: amount_cents
in: body
type: integer
description: "The payment amount in the smallest currency denomination."
- name: currency
in: body
type: string
description: "ISO 4217 currency code (e.g. USD)."
call: "square.create-payment"
with:
source_id: "{{source_id}}"
amount_money:
amount: "{{amount_cents}}"
currency: "{{currency}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: payments
path: "/payments"
operations:
- name: create-payment
method: POST
Fetches payout details from the Square Payouts API including destination bank account, amount, and arrival date.
naftiko: "0.5"
info:
label: "Square Payout Details Retrieval"
description: "Fetches payout details from the Square Payouts API including destination bank account, amount, and arrival date."
tags:
- payouts
- square
- settlement
- fintech
capability:
exposes:
- type: mcp
namespace: square-payouts
port: 8080
tools:
- name: get-payout
description: "Retrieve a Square payout by ID."
inputParameters:
- name: payout_id
in: body
type: string
description: "The Square payout ID."
call: "square.get-payout"
with:
payout_id: "{{payout_id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: payouts
path: "/payouts/{{payout_id}}"
inputParameters:
- name: payout_id
in: path
operations:
- name: get-payout
method: GET
Retrieves team member hours from Square, calculates payroll, processes payments via Cash App for Business, and archives records in S3.
naftiko: "0.5"
info:
label: "Square Payroll Processing Pipeline"
description: "Retrieves team member hours from Square, calculates payroll, processes payments via Cash App for Business, and archives records in S3."
tags:
- payroll
- square
- cash-app
- amazon-s3
capability:
exposes:
- type: mcp
namespace: payroll-processing
port: 8080
tools:
- name: process-payroll
description: "Calculate and process payroll for Square team members."
inputParameters:
- name: location_id
in: body
type: string
description: "Square location ID."
- name: pay_period_end
in: body
type: string
description: "Pay period end date YYYY-MM-DD."
steps:
- name: get-timecards
type: call
call: "square.search-shifts"
with:
location_ids: "{{location_id}}"
end_at: "{{pay_period_end}}"
- name: calculate-payroll
type: call
call: "square.calculate-pay"
with:
shifts: "{{get-timecards.shifts}}"
- name: process-payments
type: call
call: "cashapp.batch-pay"
with:
payments: "{{calculate-payroll.payment_list}}"
- name: archive-records
type: call
call: "s3.put-object"
with:
bucket: "payroll-records"
key: "{{location_id}}/{{pay_period_end}}/payroll.json"
body: "{{calculate-payroll.summary}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: shifts
path: "/labor/shifts/search"
operations:
- name: search-shifts
method: POST
- name: payroll
path: "/labor/payroll/calculate"
operations:
- name: calculate-pay
method: POST
- type: http
namespace: cashapp
baseUri: "https://api.cash.app/v1"
authentication:
type: bearer
token: "$secrets.cashapp_api_token"
resources:
- name: payments
path: "/payments/batch"
operations:
- name: batch-pay
method: POST
- type: http
namespace: s3
baseUri: "https://s3.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: objects
path: "/{{bucket}}/{{key}}"
inputParameters:
- name: bucket
in: path
- name: key
in: path
operations:
- name: put-object
method: PUT
Provisions a new Square Terminal device, configures it for the merchant location, registers in ServiceNow asset management, and sends setup instructions via SendGrid.
naftiko: "0.5"
info:
label: "Square POS Deployment Pipeline"
description: "Provisions a new Square Terminal device, configures it for the merchant location, registers in ServiceNow asset management, and sends setup instructions via SendGrid."
tags:
- hardware
- square
- servicenow
- sendgrid
capability:
exposes:
- type: mcp
namespace: pos-deployment
port: 8080
tools:
- name: deploy-terminal
description: "Provision and configure a Square Terminal for a merchant location."
inputParameters:
- name: location_id
in: body
type: string
description: "Square location ID."
- name: device_code
in: body
type: string
description: "Terminal device code."
- name: merchant_email
in: body
type: string
description: "Merchant email."
steps:
- name: create-device-code
type: call
call: "square.create-device-code"
with:
location_id: "{{location_id}}"
product_type: "TERMINAL_API"
- name: register-asset
type: call
call: "servicenow.create-asset"
with:
name: "Square Terminal — {{location_id}}"
asset_tag: "{{device_code}}"
category: "POS Hardware"
- name: send-instructions
type: call
call: "sendgrid.send-email"
with:
to: "{{merchant_email}}"
subject: "Square Terminal Setup — Device Code: {{create-device-code.code}}"
body: "Your Square Terminal is ready. Enter code {{create-device-code.code}} on your terminal to activate. Asset ID: {{register-asset.asset_id}}."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: devices
path: "/devices/codes"
operations:
- name: create-device-code
method: POST
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: assets
path: "/table/alm_hardware"
operations:
- name: create-asset
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
Issues a refund against a completed Square payment, logs the refund in PostgreSQL for audit, and notifies the merchant via ServiceNow.
naftiko: "0.5"
info:
label: "Square Refund Processor"
description: "Issues a refund against a completed Square payment, logs the refund in PostgreSQL for audit, and notifies the merchant via ServiceNow."
tags:
- refunds
- square
- postgresql
- servicenow
- merchant-services
capability:
exposes:
- type: mcp
namespace: square-refunds
port: 8080
tools:
- name: process-refund
description: "Refund a completed payment, persist the refund record, and notify merchant support."
inputParameters:
- name: payment_id
in: body
type: string
description: "The Square payment ID to refund."
- name: amount_cents
in: body
type: integer
description: "The refund amount in cents."
- name: currency
in: body
type: string
description: "ISO 4217 currency code."
- name: reason
in: body
type: string
description: "Reason for the refund."
steps:
- name: issue-refund
type: call
call: "square.create-refund"
with:
payment_id: "{{payment_id}}"
amount_money:
amount: "{{amount_cents}}"
currency: "{{currency}}"
reason: "{{reason}}"
- name: log-refund
type: call
call: "postgresql.insert-refund"
with:
table: "refund_audit_log"
payment_id: "{{payment_id}}"
refund_id: "{{issue-refund.refund.id}}"
amount: "{{amount_cents}}"
reason: "{{reason}}"
- name: notify-support
type: call
call: "servicenow.create-incident"
with:
short_description: "Refund processed: {{issue-refund.refund.id}}"
description: "Refund of {{amount_cents}} {{currency}} issued against payment {{payment_id}}. Reason: {{reason}}."
category: "refund_processing"
assigned_group: "Merchant_Support"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: refunds
path: "/refunds"
operations:
- name: create-refund
method: POST
- type: http
namespace: postgresql
baseUri: "https://block-data.internal/api/v1"
authentication:
type: bearer
token: "$secrets.internal_db_token"
resources:
- name: refund-records
path: "/tables/{{table}}/rows"
inputParameters:
- name: table
in: path
operations:
- name: insert-refund
method: POST
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: incidents
path: "/table/incident"
operations:
- name: create-incident
method: POST
Retrieves subscription details from Square Subscriptions API by subscription ID, returning plan, billing cycle, and next charge date.
naftiko: "0.5"
info:
label: "Square Subscription Lookup"
description: "Retrieves subscription details from Square Subscriptions API by subscription ID, returning plan, billing cycle, and next charge date."
tags:
- subscriptions
- square
capability:
exposes:
- type: mcp
namespace: square-subscriptions
port: 8080
tools:
- name: get-subscription
description: "Look up a Square subscription by subscription ID."
inputParameters:
- name: subscription_id
in: body
type: string
description: "The Square subscription identifier."
call: "square.get-subscription"
with:
subscription_id: "{{subscription_id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: subscriptions
path: "/subscriptions/{{subscription_id}}"
inputParameters:
- name: subscription_id
in: path
operations:
- name: get-subscription
method: GET
Retrieves a team member profile from Square by team member ID, returning name, role, assigned locations, and wage settings.
naftiko: "0.5"
info:
label: "Square Team Member Lookup"
description: "Retrieves a team member profile from Square by team member ID, returning name, role, assigned locations, and wage settings."
tags:
- workforce
- square
capability:
exposes:
- type: mcp
namespace: square-team
port: 8080
tools:
- name: get-team-member
description: "Look up a Square team member by ID."
inputParameters:
- name: team_member_id
in: body
type: string
description: "The Square team member identifier."
call: "square.get-team-member"
with:
team_member_id: "{{team_member_id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: team-members
path: "/team-members/{{team_member_id}}"
inputParameters:
- name: team_member_id
in: path
operations:
- name: get-team-member
method: GET
Creates a terminal checkout action on a Square Terminal device and monitors the result. Returns the checkout status and payment receipt.
naftiko: "0.5"
info:
label: "Square Terminal Checkout"
description: "Creates a terminal checkout action on a Square Terminal device and monitors the result. Returns the checkout status and payment receipt."
tags:
- terminal
- square
- point-of-sale
capability:
exposes:
- type: mcp
namespace: square-terminal
port: 8080
tools:
- name: create-terminal-checkout
description: "Initiate a checkout on a Square Terminal device."
inputParameters:
- name: device_id
in: body
type: string
description: "The Square Terminal device ID."
- name: amount_cents
in: body
type: integer
description: "The checkout amount in cents."
- name: currency
in: body
type: string
description: "ISO 4217 currency code."
steps:
- name: create-checkout
type: call
call: "square.create-terminal-checkout"
with:
checkout:
amount_money:
amount: "{{amount_cents}}"
currency: "{{currency}}"
device_options:
device_id: "{{device_id}}"
- name: get-checkout-status
type: call
call: "square.get-terminal-checkout"
with:
checkout_id: "{{create-checkout.checkout.id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: terminal-checkouts
path: "/terminals/checkouts"
operations:
- name: create-terminal-checkout
method: POST
- name: terminal-checkout
path: "/terminals/checkouts/{{checkout_id}}"
inputParameters:
- name: checkout_id
in: path
operations:
- name: get-terminal-checkout
method: GET
Retrieves vendor details from Square by vendor ID, returning company name, contact information, and account status for supply chain management.
naftiko: "0.5"
info:
label: "Square Vendor Lookup"
description: "Retrieves vendor details from Square by vendor ID, returning company name, contact information, and account status for supply chain management."
tags:
- supply-chain
- square
capability:
exposes:
- type: mcp
namespace: square-vendors
port: 8080
tools:
- name: get-vendor
description: "Look up a Square vendor by vendor ID."
inputParameters:
- name: vendor_id
in: body
type: string
description: "The Square vendor identifier."
call: "square.get-vendor"
with:
vendor_id: "{{vendor_id}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: vendors
path: "/vendors/{{vendor_id}}"
inputParameters:
- name: vendor_id
in: path
operations:
- name: get-vendor
method: GET
Receives a Square webhook event type and ID, retrieves the event payload, and indexes it into Elasticsearch for observability.
naftiko: "0.5"
info:
label: "Square Webhook Event Log"
description: "Receives a Square webhook event type and ID, retrieves the event payload, and indexes it into Elasticsearch for observability."
tags:
- webhooks
- square
- elasticsearch
- observability
capability:
exposes:
- type: mcp
namespace: square-webhooks
port: 8080
tools:
- name: log-webhook-event
description: "Retrieve a Square webhook event and index it in Elasticsearch."
inputParameters:
- name: event_id
in: body
type: string
description: "The Square webhook event ID."
- name: event_type
in: body
type: string
description: "The webhook event type (e.g. payment.completed)."
steps:
- name: get-event
type: call
call: "square.get-webhook-event"
with:
event_id: "{{event_id}}"
- name: index-event
type: call
call: "elasticsearch.index-document"
with:
index: "square-webhook-events"
document:
event_id: "{{event_id}}"
event_type: "{{event_type}}"
payload: "{{get-event.event}}"
indexed_at: "{{now}}"
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: webhook-events
path: "/webhooks/event-types/{{event_id}}"
inputParameters:
- name: event_id
in: path
operations:
- name: get-webhook-event
method: GET
- type: http
namespace: elasticsearch
baseUri: "https://block-es.internal:9200"
authentication:
type: bearer
token: "$secrets.elasticsearch_token"
resources:
- name: documents
path: "/{{index}}/_doc"
inputParameters:
- name: index
in: path
operations:
- name: index-document
method: POST
Calculates artist streaming royalties from TIDAL play data, processes payments via Cash App for Business, stores reports in S3, and sends statements via SendGrid.
naftiko: "0.5"
info:
label: "TIDAL Artist Royalty Pipeline"
description: "Calculates artist streaming royalties from TIDAL play data, processes payments via Cash App for Business, stores reports in S3, and sends statements via SendGrid."
tags:
- music
- tidal
- cash-app
- amazon-s3
- sendgrid
capability:
exposes:
- type: mcp
namespace: artist-royalties
port: 8080
tools:
- name: process-royalties
description: "Calculate and distribute artist royalties with reporting."
inputParameters:
- name: artist_id
in: body
type: string
description: "TIDAL artist identifier."
- name: period
in: body
type: string
description: "Royalty period YYYY-MM."
- name: artist_email
in: body
type: string
description: "Artist email."
steps:
- name: get-streams
type: call
call: "tidal.get-artist-streams"
with:
artist_id: "{{artist_id}}"
period: "{{period}}"
- name: process-payment
type: call
call: "cashapp.send-payment"
with:
recipient_id: "{{artist_id}}"
amount: "{{get-streams.royalty_amount}}"
- name: store-statement
type: call
call: "s3.put-object"
with:
bucket: "royalty-statements"
key: "{{artist_id}}/{{period}}/statement.json"
body: "{{get-streams.statement}}"
- name: send-statement
type: call
call: "sendgrid.send-email"
with:
to: "{{artist_email}}"
subject: "Royalty Statement — {{period}}"
body: "Your TIDAL royalty statement for {{period}} is ready. Total streams: {{get-streams.total_streams}}. Royalties: ${{get-streams.royalty_amount}}."
consumes:
- type: http
namespace: tidal
baseUri: "https://openapi.tidal.com/v2"
authentication:
type: bearer
token: "$secrets.tidal_api_token"
resources:
- name: streams
path: "/artists/{{artist_id}}/streams"
inputParameters:
- name: artist_id
in: path
- name: period
in: query
operations:
- name: get-artist-streams
method: GET
- type: http
namespace: cashapp
baseUri: "https://api.cash.app/v1"
authentication:
type: bearer
token: "$secrets.cashapp_api_token"
resources:
- name: payments
path: "/payments"
operations:
- name: send-payment
method: POST
- type: http
namespace: s3
baseUri: "https://s3.amazonaws.com"
authentication:
type: aws-sigv4
region: "us-east-1"
access_key: "$secrets.aws_access_key"
secret_key: "$secrets.aws_secret_key"
resources:
- name: objects
path: "/{{bucket}}/{{key}}"
inputParameters:
- name: bucket
in: path
- name: key
in: path
operations:
- name: put-object
method: PUT
- 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
Searches the TIDAL music catalog by query string, returning matching tracks with artist, album, and streaming URL information.
naftiko: "0.5"
info:
label: "TIDAL Track Search"
description: "Searches the TIDAL music catalog by query string, returning matching tracks with artist, album, and streaming URL information."
tags:
- music
- tidal
capability:
exposes:
- type: mcp
namespace: tidal
port: 8080
tools:
- name: search-tracks
description: "Search TIDAL music catalog for tracks matching a query."
inputParameters:
- name: query
in: body
type: string
description: "Search query string."
call: "tidal.search"
with:
query: "{{query}}"
type: "tracks"
consumes:
- type: http
namespace: tidal
baseUri: "https://openapi.tidal.com/v2"
authentication:
type: bearer
token: "$secrets.tidal_api_token"
resources:
- name: search
path: "/searchresults/{{query}}"
inputParameters:
- name: query
in: path
- name: type
in: query
operations:
- name: search
method: GET
Runs an Elasticsearch aggregation query over recent transactions to detect velocity anomalies, then enriches suspicious transactions with Mastercard data and alerts the risk team via ServiceNow.
naftiko: "0.5"
info:
label: "Transaction Fraud Pattern Detection"
description: "Runs an Elasticsearch aggregation query over recent transactions to detect velocity anomalies, then enriches suspicious transactions with Mastercard data and alerts the risk team via ServiceNow."
tags:
- fraud-detection
- elasticsearch
- mastercard
- servicenow
- risk
capability:
exposes:
- type: mcp
namespace: fraud-detection
port: 8080
tools:
- name: detect-velocity-anomalies
description: "Detect transaction velocity anomalies and escalate suspicious patterns."
inputParameters:
- name: merchant_id
in: body
type: string
description: "The Square merchant ID to analyze."
- name: time_window
in: body
type: string
description: "The time window for analysis (e.g. 1h, 6h, 24h)."
steps:
- name: aggregate-transactions
type: call
call: "elasticsearch.search"
with:
index: "square-transactions-*"
query:
bool:
filter:
- term:
merchant_id: "{{merchant_id}}"
- range:
created_at:
gte: "now-{{time_window}}"
aggs:
velocity:
date_histogram:
field: "created_at"
fixed_interval: "5m"
- name: check-mastercard
type: call
call: "mastercard.get-merchant-risk"
with:
merchant_id: "{{merchant_id}}"
- name: alert-risk-team
type: call
call: "servicenow.create-incident"
with:
short_description: "Velocity anomaly detected: merchant {{merchant_id}}"
description: "Transaction velocity analysis for past {{time_window}}: {{aggregate-transactions.aggregations.velocity.buckets.length}} intervals analyzed. Mastercard risk score: {{check-mastercard.riskScore}}."
category: "fraud_detection"
assigned_group: "Risk_Operations"
urgency: "2"
consumes:
- type: http
namespace: elasticsearch
baseUri: "https://block-es.internal:9200"
authentication:
type: bearer
token: "$secrets.elasticsearch_token"
resources:
- name: search
path: "/{{index}}/_search"
inputParameters:
- name: index
in: path
operations:
- name: search
method: POST
- type: http
namespace: mastercard
baseUri: "https://api.mastercard.com/fraud/merchant/v3"
authentication:
type: oauth1
consumerKey: "$secrets.mastercard_consumer_key"
signingKey: "$secrets.mastercard_signing_key"
resources:
- name: merchant-risk
path: "/merchant-risk"
operations:
- name: get-merchant-risk
method: POST
- type: http
namespace: servicenow
baseUri: "https://block.service-now.com/api/now"
authentication:
type: basic
username: "$secrets.servicenow_user"
password: "$secrets.servicenow_password"
resources:
- name: incidents
path: "/table/incident"
operations:
- name: create-incident
method: POST
Enriches a Square merchant profile with firmographic data from ZoomInfo including employee count, revenue, and industry classification.
naftiko: "0.5"
info:
label: "ZoomInfo Merchant Enrichment"
description: "Enriches a Square merchant profile with firmographic data from ZoomInfo including employee count, revenue, and industry classification."
tags:
- enrichment
- zoominfo
- square
- merchant-services
capability:
exposes:
- type: mcp
namespace: merchant-enrichment
port: 8080
tools:
- name: enrich-merchant
description: "Enrich a Square merchant with ZoomInfo firmographic data."
inputParameters:
- name: merchant_id
in: body
type: string
description: "The Square merchant ID."
- name: business_name
in: body
type: string
description: "The merchant's business name for ZoomInfo lookup."
steps:
- name: get-merchant
type: call
call: "square.get-merchant"
with:
merchant_id: "{{merchant_id}}"
- name: enrich-company
type: call
call: "zoominfo.search-company"
with:
companyName: "{{business_name}}"
- name: update-merchant-note
type: call
call: "square.update-merchant-note"
with:
merchant_id: "{{merchant_id}}"
note: "ZoomInfo: {{enrich-company.data.0.employeeCount}} employees, {{enrich-company.data.0.revenue}} revenue, Industry: {{enrich-company.data.0.industry}}."
consumes:
- type: http
namespace: square
baseUri: "https://connect.squareup.com/v2"
authentication:
type: bearer
token: "$secrets.square_access_token"
resources:
- name: merchants
path: "/merchants/{{merchant_id}}"
inputParameters:
- name: merchant_id
in: path
operations:
- name: get-merchant
method: GET
- name: update-merchant-note
method: PUT
- type: http
namespace: zoominfo
baseUri: "https://api.zoominfo.com/search"
authentication:
type: bearer
token: "$secrets.zoominfo_token"
resources:
- name: companies
path: "/company"
operations:
- name: search-company
method: POST