Amberflo MCP by usefulapi
v1.41.1Query and manage Amberflo metering & billing: customers, meters, usage, plans, invoices, prepaid.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
amberflo_list_customers List customers
List all customers registered in your Amberflo account (id, name, email, traits, enabled). Good first call to discover customer ids. API: GET /customers/.
amberflo_get_customer Get a customer
Fetch a single customer by its Amberflo customerId. API: GET /customers/?customerId=<id>.
| Parameter | Type | Description |
|---|---|---|
customer_id * | string | The Amberflo customerId to fetch. |
amberflo_list_meters List meters
List all meter definitions in your account (id, meterApiName, label, meterType, aggregation, etc.). Use meterApiName values here as inputs to usage tools. API: GET /meters.
amberflo_get_usage Query usage for a meter
Query aggregated usage for a single meter over a time range, optionally grouped/filtered. API: POST /usage/.
| Parameter | Type | Description |
|---|---|---|
aggregation * | string | Aggregation function: SUM | COUNT | MIN | MAX. |
meter_api_name * | string | The meterApiName to query (from amberflo_list_meters). |
start_time_in_seconds * | integer | Range start, unix epoch seconds (inclusive). |
time_grouping_interval * | string | Bucket size: HOUR | DAY | WEEK | MONTH. |
end_time_in_seconds | integer | Range end, unix epoch seconds. Defaults to now if omitted. |
filter | object | Dimension filter: map of dimension name -> allowed values. |
group_by | array | Dimension names to group results by, e.g. ["customerId"]. |
take_is_ascending | boolean | Sort order for `take` (default false = descending). |
take_limit | integer | Return only the top N groups. |
amberflo_get_all_usage Get all usage
Get total usage across all meters over a time range, optionally grouped by customer or filtered to one customer. API: GET /usage/all.
| Parameter | Type | Description |
|---|---|---|
start_time_in_seconds * | integer | Range start, unix epoch seconds (inclusive). |
time_grouping_interval * | string | Bucket size: HOUR | DAY | WEEK | MONTH. |
end_time_in_seconds | integer | Range end, unix epoch seconds. Defaults to now if omitted. |
filter_by_customer_id | string | Restrict results to a single customerId. |
group_by_customer_id | boolean | When true, group results by customer (sends groupBy=customerId). |
amberflo_explain_usage Explain usage
Explain/drill into the raw meter events behind a meter's usage over a time range — useful to debug why a number looks off. API: POST /usage/explain.
| Parameter | Type | Description |
|---|---|---|
meter_api_name * | string | The meterApiName to explain (from amberflo_list_meters). |
start_time_in_seconds * | integer | Range start, unix epoch seconds (inclusive). |
aggregation | string | Aggregation function: SUM | COUNT | MIN | MAX. |
end_time_in_seconds | integer | Range end, unix epoch seconds. Defaults to now if omitted. |
filter | object | Dimension filter: map of dimension name -> allowed values. |
group_by | array | Dimension names to group by, e.g. ["customerId"]. |
take_limit | integer | Return only the top N records. |
amberflo_get_customer_plan Get customer plan
Get a customer's LATEST assigned product plan (pricing). API: GET /payments/pricing/amberflo/customer-pricing?CustomerId=<id>.
| Parameter | Type | Description |
|---|---|---|
customer_id * | string | The Amberflo customerId. |
amberflo_list_customer_plan_history List customer plan history
List the full history of product plans assigned to a customer over time. API: GET /payments/pricing/amberflo/customer-pricing/list?CustomerId=<id>.
| Parameter | Type | Description |
|---|---|---|
customer_id * | string | The Amberflo customerId. |
amberflo_list_customer_invoices List customer invoices
List all invoices for a customer (optionally for a specific product), with payment status. API: GET /payments/billing/customer-product-invoice/all.
| Parameter | Type | Description |
|---|---|---|
customer_id * | string | The Amberflo customerId. |
from_cache | boolean | Use cached invoices (faster). Default true. |
product_id | string | Product id. Default "1". |
with_payment_status | boolean | Include payment status. Default true. |
amberflo_get_customer_invoice Get customer invoice
Get a single customer invoice: the CURRENT open invoice (latest=true, default) or a SPECIFIC past invoice by product_plan_id + year + month + day. API: GET /payments/billing/customer-product-invoice.
| Parameter | Type | Description |
|---|---|---|
customer_id * | string | The Amberflo customerId. |
day | integer | Day of month of a specific past invoice. |
from_cache | boolean | Use cached invoice (faster). Default true. |
latest | boolean | Fetch the current open invoice. Default true. Ignored when a specific invoice is addressed. |
month | integer | Month (1-12) of a specific past invoice. |
product_id | string | Product id. Default "1". |
product_plan_id | string | Product plan id of a specific past invoice (with year/month/day). |
with_payment_status | boolean | Include payment status. Default true. |
year | integer | Year of a specific past invoice. |
amberflo_list_prepaid_orders List prepaid orders
List a customer's active prepaid credit orders for a product. API: GET /payments/pricing/amberflo/customer-prepaid/list?CustomerId=<id>&ProductId=<pid>.
| Parameter | Type | Description |
|---|---|---|
customer_id * | string | The Amberflo customerId. |
product_id | string | Product id. Default "1". |
amberflo_create_customer Create customer
WRITE: create/register a new customer in Amberflo (id + name required; optional email, enabled flag, and traits). Optionally auto-create the customer in Stripe. API: POST /customers/.
| Parameter | Type | Description |
|---|---|---|
customer_id * | string | Unique customerId to assign (your identifier for the customer). |
customer_name * | string | Human-readable customer name. |
create_in_stripe | boolean | When true, also auto-create this customer in Stripe (adds ?autoCreateCustomerInStripe=true). |
customer_email | string | Customer email address. |
enabled | boolean | Whether the customer is enabled. |
traits | object | Arbitrary string traits (key/value metadata). |
amberflo_assign_customer_plan Assign customer plan
WRITE: assign/attach a pricing product plan to a customer — this changes what the customer is billed. API: POST /payments/pricing/amberflo/customer-pricing.
| Parameter | Type | Description |
|---|---|---|
customer_id * | string | The Amberflo customerId to assign the plan to. |
product_plan_id * | string | The productPlanId of the plan to assign. |
end_time_in_seconds | integer | When the plan ends, unix epoch seconds. |
product_id | string | Product id the plan belongs to. |
start_time_in_seconds | integer | When the plan takes effect, unix epoch seconds. |
amberflo_ingest_usage Ingest usage event
WRITE: record/ingest a single usage meter event (writes billable usage data) to the Amberflo ingestion host. API: POST /ingest/ on the ingest base URL.
| Parameter | Type | Description |
|---|---|---|
customer_id * | string | The customerId this usage belongs to. |
meter_api_name * | string | The meterApiName this event is for. |
meter_time_in_millis * | integer | Event timestamp, unix epoch milliseconds. |
meter_value * | number | The numeric value of the usage event. |
dimensions | object | Optional dimensions (key/value string metadata) for the event. |
unique_id | string | Optional idempotency/unique id for the event. |