Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| STREAM_API_KEY | Yes | Your Stream API key | |
| STREAM_TIMEOUT | No | Request timeout (seconds) | 30 |
| STREAM_BASE_URL | No | API base URL | https://stream-app-service.streampay.sa |
| STREAM_MAX_RETRIES | No | Retry count for 429 / 5xx | 2 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| create_payment_link | Create a new payment / checkout link on Stream. items is a list of objects, each containing:
You cannot mix one-time and recurring products in the same link. |
| list_payment_links | List all payment links with optional filters. statuses can include: INACTIVE, ACTIVE, COMPLETED. |
| get_payment_link | Retrieve a single payment link by its ID. |
| deactivate_payment_link | Deactivate (archive) a payment link so it can no longer be used. |
| create_customer | Create a new customer in Stream. Provide at least a name. Optionally include phone_number, email, external_id, iban, alias, comment, preferred_language (EN/AR), and communication_methods (WHATSAPP, EMAIL, SMS). |
| list_customers | List / search customers with pagination. Returns a paginated list of customers. |
| get_customer | Get a single customer record by ID. |
| update_customer | Update fields on an existing customer. Only the fields you provide will be changed; others remain untouched. |
| delete_customer | Soft-delete a customer by ID. The customer record is archived but not permanently removed. |
| create_product | Create a new product or service in Stream. type is |
| list_products | List products with optional filters. type can be |
| get_product | Get a single product by ID. |
| update_product | Update an existing product's name, description, or active status. Only the fields you provide will be changed. |
| archive_product | Archive a product so it can no longer be sold. This is a soft-delete; the product record is retained for history. |
| list_payments | List payments with optional filters. Filter by statuses (PENDING, PROCESSING, SUCCEEDED, FAILED, CANCELED, UNDER_REVIEW, EXPIRED, SETTLED, REFUNDED), invoice_id, search_term, or a date range (from_date / to_date in ISO-8601). |
| get_payment | Get details of a single payment by ID. Returns amount, status, payment method, customer info, and more. |
| mark_payment_as_paid | Manually mark a payment as paid. Record a payment received through manual methods. payment_method must be one of: CASH, BANK_TRANSFER, CARD, or QURRAH. |
| refund_payment | Issue a refund on a completed payment. refund_reason must be one of: REQUESTED_BY_CUSTOMER, DUPLICATE, FRAUDULENT, OTHER. |
| create_coupon | Create a new discount coupon on Stream. Set is_percentage to True for percentage discount, False for fixed amount. For fixed coupons, currency is required (e.g. SAR, USD). |
| list_coupons | List all coupons with optional filters. active filters by active/inactive status. is_percentage filters by discount type. |
| get_coupon | Get a single coupon by ID. |
| deactivate_coupon | Deactivate a coupon so it can no longer be redeemed. |
| create_invoice | Create a ZATCA-compliant invoice in Stream. items is a list of line-item dicts, each with:
scheduled_on is the ISO-8601 date-time for when the invoice is due/sent. Set notify_consumer to True to send the invoice to the customer. |
| list_invoices | List invoices with optional filters. Filter by organization_consumer_id, statuses (DRAFT, CREATED, SENT, ACCEPTED, REJECTED, COMPLETED, CANCELED, EXPIRED), payment_statuses (PENDING, PROCESSING, SUCCEEDED, FAILED, etc.), or a date range. |
| get_invoice | Get a single invoice by ID. |
| send_invoice | (Re)send an invoice to the customer via email / SMS. |
| void_invoice | Void (cancel) an unpaid invoice. Once voided, the invoice can no longer be paid. |
| list_stream_docs | List all available Stream documentation pages. Pages are auto-discovered from the Stream docs sitemap. Returns slug, URL, and resource URI for each page. Use the slug with get_stream_doc to fetch the full content. |
| get_stream_doc | Fetch the content of a Stream documentation page by slug. Slugs are auto-discovered from the sitemap. Call list_stream_docs first to see what's available, or pass a slug directly if you already know it (e.g. 'getting-started', 'testing-cards', 'webhooks', 'authentication', etc.). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| get_openapi_spec | Returns the full Stream OpenAPI JSON spec for agent reference. Fetched from https://docs.streampay.sa/openapi.json and cached for 1 hour. |