Amberflo MCP by usefulapi

v1.41.1
io.usefulapi/amberflo Checked 2 days ago Published 21 hours ago

Query 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>.

ParameterTypeDescription
customer_id *stringThe 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/.

ParameterTypeDescription
aggregation *stringAggregation function: SUM | COUNT | MIN | MAX.
meter_api_name *stringThe meterApiName to query (from amberflo_list_meters).
start_time_in_seconds *integerRange start, unix epoch seconds (inclusive).
time_grouping_interval *stringBucket size: HOUR | DAY | WEEK | MONTH.
end_time_in_secondsintegerRange end, unix epoch seconds. Defaults to now if omitted.
filterobjectDimension filter: map of dimension name -> allowed values.
group_byarrayDimension names to group results by, e.g. ["customerId"].
take_is_ascendingbooleanSort order for `take` (default false = descending).
take_limitintegerReturn 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.

ParameterTypeDescription
start_time_in_seconds *integerRange start, unix epoch seconds (inclusive).
time_grouping_interval *stringBucket size: HOUR | DAY | WEEK | MONTH.
end_time_in_secondsintegerRange end, unix epoch seconds. Defaults to now if omitted.
filter_by_customer_idstringRestrict results to a single customerId.
group_by_customer_idbooleanWhen 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.

ParameterTypeDescription
meter_api_name *stringThe meterApiName to explain (from amberflo_list_meters).
start_time_in_seconds *integerRange start, unix epoch seconds (inclusive).
aggregationstringAggregation function: SUM | COUNT | MIN | MAX.
end_time_in_secondsintegerRange end, unix epoch seconds. Defaults to now if omitted.
filterobjectDimension filter: map of dimension name -> allowed values.
group_byarrayDimension names to group by, e.g. ["customerId"].
take_limitintegerReturn 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>.

ParameterTypeDescription
customer_id *stringThe 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>.

ParameterTypeDescription
customer_id *stringThe 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.

ParameterTypeDescription
customer_id *stringThe Amberflo customerId.
from_cachebooleanUse cached invoices (faster). Default true.
product_idstringProduct id. Default "1".
with_payment_statusbooleanInclude 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.

ParameterTypeDescription
customer_id *stringThe Amberflo customerId.
dayintegerDay of month of a specific past invoice.
from_cachebooleanUse cached invoice (faster). Default true.
latestbooleanFetch the current open invoice. Default true. Ignored when a specific invoice is addressed.
monthintegerMonth (1-12) of a specific past invoice.
product_idstringProduct id. Default "1".
product_plan_idstringProduct plan id of a specific past invoice (with year/month/day).
with_payment_statusbooleanInclude payment status. Default true.
yearintegerYear 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>.

ParameterTypeDescription
customer_id *stringThe Amberflo customerId.
product_idstringProduct 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/.

ParameterTypeDescription
customer_id *stringUnique customerId to assign (your identifier for the customer).
customer_name *stringHuman-readable customer name.
create_in_stripebooleanWhen true, also auto-create this customer in Stripe (adds ?autoCreateCustomerInStripe=true).
customer_emailstringCustomer email address.
enabledbooleanWhether the customer is enabled.
traitsobjectArbitrary 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.

ParameterTypeDescription
customer_id *stringThe Amberflo customerId to assign the plan to.
product_plan_id *stringThe productPlanId of the plan to assign.
end_time_in_secondsintegerWhen the plan ends, unix epoch seconds.
product_idstringProduct id the plan belongs to.
start_time_in_secondsintegerWhen 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.

ParameterTypeDescription
customer_id *stringThe customerId this usage belongs to.
meter_api_name *stringThe meterApiName this event is for.
meter_time_in_millis *integerEvent timestamp, unix epoch milliseconds.
meter_value *numberThe numeric value of the usage event.
dimensionsobjectOptional dimensions (key/value string metadata) for the event.
unique_idstringOptional idempotency/unique id for the event.