square-automation
Automate Square tasks via Rube MCP (Composio): payments, orders, invoices, locations. Always search tools first for current schemas.
Square Automation via Rube MCP
Automate Square payment processing, order management, and invoicing through Composio's Square toolkit via Rube MCP.
Prerequisites
RUBE_MANAGE_CONNECTIONS with toolkit squareRUBE_SEARCH_TOOLS first to get current tool schemasSetup
Get Rube MCP: Add https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
RUBE_SEARCH_TOOLS respondsRUBE_MANAGE_CONNECTIONS with toolkit squareCore Workflows
1. List and Monitor Payments
When to use: User wants to view payment history or check payment status
Tool sequence:
SQUARE_LIST_PAYMENTS - Retrieve payments with optional filters [Required]SQUARE_CANCEL_PAYMENT - Cancel a pending payment if needed [Optional]Key parameters:
begin_time / end_time: RFC 3339 timestamps for date range filteringsort_order: 'ASC' or 'DESC' for chronological orderingcursor: Pagination cursor from previous responselocation_id: Filter payments by specific locationPitfalls:
cursor until absentSQUARE_CANCEL_PAYMENT requires exact payment_id from list results2. Search and Manage Orders
When to use: User wants to find orders by criteria or update order details
Tool sequence:
SQUARE_LIST_LOCATIONS - Get location IDs for filtering [Prerequisite]SQUARE_SEARCH_ORDERS - Search orders with filters [Required]SQUARE_RETRIEVE_ORDER - Get full details of a specific order [Optional]SQUARE_UPDATE_ORDER - Modify order state or details [Optional]Key parameters:
location_ids: Array of location IDs to search within (required for search)query: Search filter object with date ranges, states, fulfillment typesorder_id: Specific order ID for retrieve/update operationscursor: Pagination cursor for search resultsPitfalls:
location_ids is required for SEARCH_ORDERS; get IDs from LIST_LOCATIONS firstversion field to prevent conflictscursor until absent3. Manage Locations
When to use: User wants to view business locations or get location details
Tool sequence:
SQUARE_LIST_LOCATIONS - List all business locations [Required]Key parameters:
id, name, address, status, timezonePitfalls:
status field4. Invoice Management
When to use: User wants to list, view, or cancel invoices
Tool sequence:
SQUARE_LIST_LOCATIONS - Get location ID for filtering [Prerequisite]SQUARE_LIST_INVOICES - List invoices for a location [Required]SQUARE_GET_INVOICE - Get detailed invoice information [Optional]SQUARE_CANCEL_INVOICE - Cancel a scheduled or unpaid invoice [Optional]Key parameters:
location_id: Required for listing invoicesinvoice_id: Required for get/cancel operationscursor: Pagination cursor for list resultslimit: Number of results per pagePitfalls:
location_id is required for LIST_INVOICES; resolve via LIST_LOCATIONS firstversion to prevent race conditionsCommon Patterns
ID Resolution
Location name -> Location ID:
1. Call SQUARE_LIST_LOCATIONS
Find location by name in response
Extract id field (e.g., 'L1234ABCD') Order lookup:
1. Call SQUARE_SEARCH_ORDERS with location_ids and query filters
Extract order_id from results
Use order_id for RETRIEVE_ORDER or UPDATE_ORDER Pagination
cursor fieldcursor parametercursor is absent or emptylimit to control page sizeDate Range Filtering
2024-01-01T00:00:00Zbegin_time and end_time parametersKnown Pitfalls
ID Formats:
Versioning:
version fieldRate Limits:
Response Parsing:
data keyQuick Reference
| Task | Tool Slug | Key Params |
|---|---|---|
| List payments | SQUARE_LIST_PAYMENTS | begin_time, end_time, location_id, cursor |
| Cancel payment | SQUARE_CANCEL_PAYMENT | payment_id |
| Search orders | SQUARE_SEARCH_ORDERS | location_ids, query, cursor |
| Get order | SQUARE_RETRIEVE_ORDER | order_id |
| Update order | SQUARE_UPDATE_ORDER | order_id, version |
| List locations | SQUARE_LIST_LOCATIONS | (none) |
| List invoices | SQUARE_LIST_INVOICES | location_id, cursor |
| Get invoice | SQUARE_GET_INVOICE | invoice_id |
| Cancel invoice | SQUARE_CANCEL_INVOICE | invoice_id, version |