Operations
Everything anyone can ask of QuotaPulse or do to it is one of these
operations. An agent calls them as MCP tools at /mcp, over HTTP at
POST /api/v1/ops/{name} with the input as the JSON body, or from a shell
with quotapulse call {name} '{json}'. The dashboard's own routes carry out
the same operations under the same names. See agents-and-the-person.md for how
they fit together.
- Scope is what the caller needs:
read,act,ingestoradmin, which carries them all. An agent may hold a scope directly, or by proposal only: then calling a change it covers asks the person instead. - Changes take
reason, written to the log, and — when they only touch QuotaPulse's own data —dry_run, which rehearses them: they run for real, report what they would change, and are undone. - For marks the few that belong to one side: deciding on a proposal is the person's; proposing is an agent's.
- Never proposed marks the few that hand out or bring in agents' keys: a proposal is read by every agent, so they need their scope held directly.
Work: who you are, what is yours, what happened
whoami
Who am I · 我是谁
Who you are to QuotaPulse: your grants — what you may do directly and what only by proposal — whether you answer first for new incidents, how much work is yours, and the person's language. Call it once when you start.
scope read · reads · idempotent
inbox
What is mine · 我的待办
What is yours to handle: open incidents assigned to you, and — for an agent — what became of your proposals; for the person, the changes agents asked them to decide. As the first responder, also the incidents nobody owns yet. Says what to do next.
scope read · reads · idempotent
changes
What happened since · 新发生的事
What happened since you last asked, oldest first: incidents opening, escalating and resolving, who took or handed over what, notes, changes to dates and settings, proposals and decisions. Without after it reads on from where your last call left off. With wait it sleeps until something happens, up to 50 seconds — the way to wait for work without polling.
scope read · reads
| Input | Type | |
|---|---|---|
after |
integer | read on from this entry id; without it, an agent reads on from where its last call to changes left off, and the person from now |
limit |
integer | at most this many entries, 1-200 (default 50) |
types |
list of string | only entries of these types; one ending in a dot is a family: incident., proposal., date. The rest are passed over, and your place moves past them too: to look at some types and leave your place alone, pass after, or use list_activity |
wait |
integer | when nothing has happened yet, wait up to this many seconds for something to, 0-50; 0 answers at once |
list_activity
The log · 动态记录
The log, newest first: everything that happened and who did it — the person, an agent or QuotaPulse itself — with what they said and what they changed. Filter by who, by type, by incident or by what it was about, and page back with before.
scope read · reads · idempotent
| Input | Type | |
|---|---|---|
actor |
string | only what was done by: person, agents, system, or one agent by name or id |
before |
integer | page back: only entries older than this id |
incident |
string | only what happened to one incident, by id |
limit |
integer | at most this many entries, 1-200 (default 50) |
subject_id |
string | only entries about this one thing, by id |
subject_type |
string | only entries about this kind of thing: meter, account, reminder, channel, incident, proposal, agent, provider, settings |
types |
list of string | only entries of these types; one ending in a dot is a family: incident., proposal., date. |
Problems
attention
What needs attention · 需要关注的事
What is open right now and what is coming up. Returns the overall status, every open incident with a plain-language headline and who owns it, the dates inside the look-ahead window, and whether notifications are muted.
scope read · reads · idempotent
| Input | Type | |
|---|---|---|
days |
integer | how many days ahead to look for dates, 1-366; the user's setting when omitted |
list_incidents
Incident history · 事件历史
Past and present incidents, newest first: what happened, when it opened and was resolved, and who owns it. Filter by state or by the thing it is about, and page back through a long history.
scope read · reads · idempotent
| Input | Type | |
|---|---|---|
before |
string | page backwards: only incidents opened before this moment, RFC 3339 — the opened_at of the last one you have |
limit |
integer | how many to return, 1-500 (default 20) |
state |
string | open or resolved; both when omitted |
subject_id |
string | only incidents about this one thing, by id |
subject_type |
string | only incidents about this kind of thing: meter, account, reminder or channel |
get_incident
One incident in full · 事件详情
One incident: its headline and facts, who owns it, its timeline — who took it, what was noted, what was sent and to whom — the meter or date it is about, the proposal on an approval, and the operations you can use on it now.
scope read · reads · idempotent
| Input | Type | |
|---|---|---|
incident (required) |
string | the incident's id, from attention, inbox or list_incidents |
acknowledge
Acknowledge an incident · 确认事件
Acknowledge an open incident: it stays open until its cause is gone, but stops repeating its notification, and a message still held back for the first responder is dropped. Say in reason what was done; acknowledge only what is handled or being handled, never to tidy the list.
scope act · changes · idempotent · rehearsable · logs incident.acknowledged
| Input | Type | |
|---|---|---|
incident (required) |
string | the incident's id, from attention, inbox or list_incidents |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
unacknowledge
Take back an acknowledgement · 撤回确认
Take back an acknowledgement: the incident repeats its notification again.
scope act · changes · idempotent · rehearsable · logs incident.unacknowledged
| Input | Type | |
|---|---|---|
incident (required) |
string | the incident's id, from attention, inbox or list_incidents |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
take_incident
Take an incident · 接手事件
Make an open incident yours, so the person and other agents see who is on it. An integration cannot own one.
scope act · changes · idempotent · rehearsable · logs incident.assigned
| Input | Type | |
|---|---|---|
incident (required) |
string | the incident's id, from attention, inbox or list_incidents |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
assign_incident
Give an incident to someone · 分派事件
Give an open incident to the person, to an agent by name, or to nobody. An agent given one is told on its own channels, with the reason. To hand work to the person because you cannot finish it, use hand_over instead: it tells them.
scope act · changes · idempotent · rehearsable · logs incident.assigned
| Input | Type | |
|---|---|---|
incident (required) |
string | the incident's id |
to (required) |
string | who gets it: person, an agent's name or id, or nobody |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
hand_over
Hand an incident to the person · 转交给用户
Hand an open incident to the person when you cannot or should not finish it alone, with a note saying what you found, what you tried and what they must do. They are told now, through their channels, note first — what was held back for you is dropped.
scope act · changes · rehearsable · for agents · logs incident.handed_over
| Input | Type | |
|---|---|---|
incident (required) |
string | the incident's id |
note (required) |
string | what the person needs to know: what you found, what you tried, what they must do. It is the first thing they read |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
note_incident
Leave a note on an incident · 给事件留言
Add a note to an incident's timeline: what you found, what you did, what you are waiting for. It is how the person and other agents learn what happened without asking.
scope act · changes · rehearsable · logs incident.noted
| Input | Type | |
|---|---|---|
incident (required) |
string | the incident's id |
text (required) |
string | the note: what you found or did, for whoever looks at it next |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
Meters
list_meters
Meters and headroom · 额度与余量
Every balance, quota and spend counter with its current value, forecast and a one-word headroom verdict (ok, low, exhausted, unknown). Use it before a large job to pick an account that can take it.
scope read · reads · idempotent
| Input | Type | |
|---|---|---|
kind |
string | only this kind: balance, quota or counter |
query |
string | only meters whose name, account or provider contains this text |
get_meter
One meter in detail · 额度详情
A meter's forecast, rules, open incidents, recent daily spend and top-ups. Identify it by id, or by name as shown in list_meters.
scope read · reads · idempotent
| Input | Type | |
|---|---|---|
meter (required) |
string | the meter's id, or its name as shown in list_meters |
days |
integer | how many days of daily spend to include, 1-366 (default 14; the whole range when range is given) |
range |
string | how far back to read: 24h, 7d, 30d (the default), 90d or 1y |
mute_meter
Mute a meter · 静音额度
Hold back notifications about a meter until a moment. Its incidents keep opening and resolving.
scope act · changes · idempotent · rehearsable · logs meter.muted
| Input | Type | |
|---|---|---|
meter (required) |
string | the meter's id, or its name as shown in list_meters |
until (required) |
string | hold notifications back until this moment, RFC 3339; it must be in the future |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
unmute_meter
Unmute a meter · 取消静音
Stop holding back a meter's notifications.
scope act · changes · idempotent · rehearsable · logs meter.unmuted
| Input | Type | |
|---|---|---|
meter (required) |
string | the meter's id, or its name as shown in list_meters |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
update_meter
Change a meter · 修改额度
Change a meter's name, whether it is hidden, its sort order, its unit (for a meter reported from outside) or its rules, and answer with the meter as get_meter shows it. A field left out keeps its value; rules, when sent, replace the old ones as a whole. Rehearse with dry_run to see which incidents new rules would open.
scope admin · changes · rehearsable · logs meter.updated
| Input | Type | |
|---|---|---|
meter (required) |
string | the meter's id, or its name as shown in list_meters |
hidden |
boolean | a hidden meter is not judged: nothing opens on it |
name |
string | a name of the meter's own; it is shown under it from then on |
rules |
object | the meter's rules as a whole: a rule left out goes back to the default, and 0 turns one off |
sort |
integer | where it sorts among its account's meters |
unit |
string | a pushed meter's unit; a sampled one takes its unit from its provider |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
delete_meter
Delete a meter · 删除额度
Delete a meter and its history for good. Only a meter reported from outside, or one its provider has stopped reporting, can be deleted; hide the others with update_meter.
scope admin · removes for good · rehearsable · logs meter.deleted
| Input | Type | |
|---|---|---|
meter (required) |
string | the meter's id, or its name as shown in list_meters |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
record_reading
Report a reading · 上报读数
Report the current value of something QuotaPulse cannot read itself: what a local tool has cost so far (kind counter), a balance or a quota. The first reading for a new meter must say its kind.
scope ingest · changes · idempotent · rehearsable
| Input | Type | |
|---|---|---|
meter (required) |
string | a short key for the meter: lowercase letters, digits, dots, dashes, underscores |
value (required) |
number | the current value |
at |
string | when the reading was taken, RFC 3339; now when omitted. It may be in the past, never in the future |
kind |
string | balance, quota or counter; required the first time a meter is reported |
limit |
number | the size of a quota |
name |
string | a display name for a new meter |
resets_at |
string | when a quota resets, RFC 3339 |
unit |
string | a currency code, % or a label |
window_seconds |
integer | how long a quota's window is, in seconds |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
record_readings
Report several readings · 批量上报读数
Report up to 500 readings at once, each in the shape record_reading takes.
scope ingest · changes · idempotent · rehearsable
| Input | Type | |
|---|---|---|
readings (required) |
list of object | the readings, each in the shape record_reading takes; at most 500 |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
Dates
list_dates
Upcoming dates · 近期日期
Renewals, birthdays, anniversaries and expiries, soonest first, with how many days are left and when they remind. Lunar dates are already converted.
scope read · reads · idempotent
| Input | Type | |
|---|---|---|
days |
integer | only dates within this many days, 1-3660 (default 90) |
include_inactive |
boolean | list every date, whatever its state, and ignore days: also the disabled ones and those with nothing ahead |
query |
string | only dates whose title contains this text |
preview_date
Where a rule lands · 预览日期规则
Show where a date's rule would land, without saving anything: the next occurrence, the three after it and, for a lunar rule, the lunar date. Takes the same rule fields as add_date. Use it to check a rule before adding it.
scope read · reads · idempotent
| Input | Type | |
|---|---|---|
freq (required) |
string | once, weekly, monthly or yearly |
calendar |
string | solar (the default) or lunar; lunar works with monthly and yearly |
date |
string | for once: the day, as YYYY-MM-DD. With interval above 1: the day to count from |
day |
integer | for monthly and yearly: the day of the month |
interval |
integer | every N weeks, months or years; needs date to count from |
kind |
string | renewal, birthday, anniversary, holiday, expiry or custom (the default) |
lead_days |
list of integer | the days before the date on which to remind; 0 is the day itself. Only decides whether the answer says soon |
month |
integer | for yearly: the month, 1-12 (a lunar month when calendar is lunar) |
since |
integer | the year it started — a birth year — so the answer can say which one it is |
title |
string | a label for the answer; "(preview)" when omitted |
weekday |
integer | for weekly: 1 is Monday, 7 is Sunday |
add_date
Add a date · 添加日期
Add a reminder for a renewal, birthday, anniversary, holiday, expiry or anything else with a date. Supports weekly, monthly, yearly and one-off dates, and the lunar calendar for monthly and yearly ones. Search list_dates first: a date with the same title and rule is refused as a duplicate.
scope act · changes · rehearsable · logs date.added
| Input | Type | |
|---|---|---|
freq (required) |
string | once, weekly, monthly or yearly |
title (required) |
string | what the date is, e.g. a person's name or a subscription |
amount |
number | what a renewal costs |
calendar |
string | solar (the default) or lunar; lunar works with monthly and yearly |
currency |
string | three-letter code for amount; the base currency when omitted |
date |
string | for once: the day, as YYYY-MM-DD. With interval above 1: the day to count from |
day |
integer | for monthly and yearly: the day of the month |
interval |
integer | every N weeks, months or years; needs date to count from |
kind |
string | renewal, birthday, anniversary, holiday, expiry or custom (the default) |
lead_days |
list of integer | days before the date on which to remind; 0 is the day itself. Default [0] |
month |
integer | for yearly: the month, 1-12 (a lunar month when calendar is lunar) |
notes |
string | |
since |
integer | the year it started — a birth year — so reminders can say which one it is |
weekday |
integer | for weekly: 1 is Monday, 7 is Sunday |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
update_date
Change a date · 修改日期
Change a date's title, kind, rule, reminder days, amount, group, notes or whether it is enabled. Send only what should change; everything else is left as it is.
scope act · changes · rehearsable · logs date.updated
| Input | Type | |
|---|---|---|
date (required) |
string | the date's id, or its title as shown in list_dates |
amount |
number | what a renewal costs; 0 clears it |
currency |
string | three-letter code for amount; the base currency when empty |
enabled |
boolean | false switches the date off without deleting it; true switches it back on |
group |
string | |
kind |
string | renewal, birthday, anniversary, holiday, expiry or custom |
lead_days |
list of integer | the days before the date on which to remind; 0 is the day itself. Replaces the old ones |
notes |
string | |
rule |
object | a new rule, in the shape of a date's schedule field; the rule replaces the old one as a whole |
title |
string | |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
complete_date
Mark a date as done · 标记日期已办
Mark the upcoming occurrence of a date as dealt with — paid, renewed, celebrated. Its reminders stop and it moves on to the next occurrence. Only for an occurrence that has actually been dealt with.
scope act · changes · idempotent · rehearsable · logs date.completed
| Input | Type | |
|---|---|---|
date (required) |
string | the date's id, or its title as shown in list_dates |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
reopen_date
Take back a done mark · 撤回已办
Take back the last "done" mark on a date, so the occurrence it covered is upcoming again.
scope act · changes · idempotent · rehearsable · logs date.reopened
| Input | Type | |
|---|---|---|
date (required) |
string | the date's id, or its title as shown in list_dates |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
snooze_date
Hold back a date's reminders · 暂缓日期提醒
Hold back a date's reminders until after a day. The date still shows as upcoming.
scope act · changes · idempotent · rehearsable · logs date.snoozed
| Input | Type | |
|---|---|---|
date (required) |
string | the date's id, or its title as shown in list_dates |
until (required) |
string | no reminders until after this day, YYYY-MM-DD; today or later |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
unsnooze_date
Wake a date up · 恢复日期提醒
Stop holding back a date's reminders.
scope act · changes · idempotent · rehearsable · logs date.unsnoozed
| Input | Type | |
|---|---|---|
date (required) |
string | the date's id, or its title as shown in list_dates |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
delete_date
Delete a date · 删除日期
Delete a date and its reminders for good. To silence it for a while, snooze it; to switch it off without losing it, disable it with update_date.
scope act · removes for good · rehearsable · logs date.deleted
| Input | Type | |
|---|---|---|
date (required) |
string | the date's id, or its title as shown in list_dates |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
Spend
get_spend
Spend for a month · 月度花费
What the meters burned in a calendar month, converted to the base currency where a rate is known, day by day, with the month-end projection, the renewals that fall in the month and the totals of the months before.
scope read · reads · idempotent
| Input | Type | |
|---|---|---|
month |
string | a calendar month as YYYY-MM; the current month when omitted |
Accounts
list_accounts
Accounts · 账户
The accounts that are read from their platforms: which provider, how often, whether the last read succeeded and why not, and the credential as the dashboard shows it, secrets masked.
scope read · reads · idempotent
| Input | Type | |
|---|---|---|
query |
string | only accounts whose name, provider or group contains this text |
sample_now
Read accounts now · 立即读取
Ask for a fresh reading of one account, or of all of them, instead of waiting for the schedule. The reading arrives within seconds; call list_meters again to see it.
scope act · changes · idempotent · rehearsable
| Input | Type | |
|---|---|---|
account |
string | an account's id or name; every account when omitted |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
test_account
Try a credential · 测试凭据
Try a credential against a platform without saving anything, and report what came back: whether it worked, the status, the latency, the meters it found and the raw response.
scope admin · reads
| Input | Type | |
|---|---|---|
account |
string | test with this account's stored secrets, by id or name — the way the dashboard's edit form does |
credential |
object | the credential's fields by key; a secret left out is taken from the account, when one is given |
definition |
object | try it against a definition that is not saved yet, in the shape list_providers shows |
provider |
string | try the credential against a provider, built-in or saved, by id |
add_account
Add an account · 添加账户
Add an account whose balances and quotas are read from a platform. Its credential is the platform's key: it is stored encrypted and shown masked from then on. Try it first with test_account.
scope admin · changes · rehearsable · logs account.added
| Input | Type | |
|---|---|---|
name (required) |
string | |
provider (required) |
string | a provider's id, from list_providers |
credential |
object | the provider's fields by key, as list_providers describes them |
enabled |
boolean | a disabled account is not read; the default is enabled |
group |
string | |
interval_seconds |
integer | how often to read it, in seconds; 0 (the default) uses the setting |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
update_account
Change an account · 修改账户
Change an account's name, credential, group, how often it is read, or whether it is enabled. A field left out keeps its value; a secret left out keeps its stored value.
scope admin · changes · rehearsable · logs account.updated
| Input | Type | |
|---|---|---|
account (required) |
string | the account's id, or its name as shown in list_accounts |
credential |
object | the fields to change, by key; a secret left out keeps its stored value |
enabled |
boolean | |
group |
string | |
interval_seconds |
integer | how often to read it, in seconds; 0 uses the setting |
name |
string | |
provider |
string | only the account's current provider is accepted: a provider cannot be changed, so add a new account instead |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
delete_account
Delete an account · 删除账户
Delete an account together with its meters and their history. To stop reading it for a while, disable it with update_account.
scope admin · removes for good · rehearsable · logs account.deleted
| Input | Type | |
|---|---|---|
account (required) |
string | the account's id, or its name as shown in list_accounts |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
Notifications
list_deliveries
Notification log · 通知记录
The messages QuotaPulse sent, or tried to send, newest first: which incident, which channel, whether it went, and the error when it did not. This is where to look when someone was not notified.
scope read · reads · idempotent
| Input | Type | |
|---|---|---|
before |
integer | page backwards: only the messages with a smaller id — the id of the last one you have |
channel |
string | only the messages sent to this channel, by id or name |
incident |
string | only the messages about this incident, by id |
limit |
integer | how many to return, 1-500 (default 100) |
status |
string | only the messages with this status: pending, sent, failed or dropped |
list_channel_types
Kinds of notification channel · 通知渠道类型
Every kind of channel that can be created, with the settings each one needs.
scope read · reads · idempotent
list_channels
Notification channels · 通知渠道
The channels notifications go through, with their settings — secrets masked — how their recent deliveries went, and, for a channel that wakes an agent, which one.
scope admin · reads · idempotent
add_channel
Add a notification channel · 添加通知渠道
Add a channel notifications go through. A new channel hears about everything unless told otherwise. Give agent to make it an agent's: how that agent is woken — it hears at once, through quiet hours, and is told when an incident is assigned to it.
scope admin · changes · rehearsable · logs channel.added
| Input | Type | |
|---|---|---|
name (required) |
string | |
type (required) |
string | a channel type's id, from list_channel_types |
agent |
string | make it an agent's channel — how that agent is woken — by the agent's name or id; people read it when omitted |
config |
object | the type's settings by key, as list_channel_types describes them |
enabled |
boolean | |
min_severity |
string | the least severe incident it wants: info, warning or critical; info when omitted |
topics |
list of string | what it hears about: meters, dates, system, digest; everything when omitted |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
update_channel
Change a notification channel · 修改通知渠道
Change a channel's name, settings, what it hears about, the least severity it wants, whether it is enabled, or which agent it wakes. A field left out keeps its value; a secret left out keeps its stored value.
scope admin · changes · rehearsable · logs channel.updated
| Input | Type | |
|---|---|---|
channel (required) |
string | the channel's id, or its name as shown in list_channels |
agent |
string | the agent it wakes, by name or id; empty makes it a channel people read |
config |
object | the settings to change, by key; a secret left out keeps its stored value |
enabled |
boolean | |
min_severity |
string | the least severe incident it wants: info, warning or critical |
name |
string | |
topics |
list of string | what it hears about: meters, dates, system, digest |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
delete_channel
Delete a notification channel · 删除通知渠道
Delete a notification channel for good. To silence it for a while, disable it with update_channel.
scope admin · removes for good · rehearsable · logs channel.deleted
| Input | Type | |
|---|---|---|
channel (required) |
string | the channel's id, or its name as shown in list_channels |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
test_channel
Send a test message · 发送测试消息
Send a test message through a channel now. A refusal by the platform comes back as the answer rather than as a failure.
scope admin · changes · idempotent · logs channel.tested
| Input | Type | |
|---|---|---|
channel (required) |
string | the channel's id, or its name as shown in list_channels |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
send_digest
Send the digest now · 立即发送摘要
Send the digest — the periodic summary — now, in the background, instead of waiting for its schedule.
scope admin · changes · idempotent · logs digest.sent
| Input | Type | |
|---|---|---|
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
retry_delivery
Send a message again · 重发消息
Queue a failed delivery again, from the notification log.
scope admin · changes · idempotent · rehearsable · logs delivery.retried
| Input | Type | |
|---|---|---|
delivery (required) |
integer | the id of a failed delivery, from list_deliveries |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
Agents
list_agents
Agents · 智能体
Every agent and integration: what each is for, what it may do directly and by proposal, whether it answers first, how much open work it owns and when it was last seen. Never their keys. Use it to find an agent to give an incident to.
scope read · reads · idempotent
add_agent
Add an agent · 添加智能体
Add an agent or an integration with a key of its own and its grants: scopes it uses directly, and scopes it may only propose under. The answer carries the key this one time, with an MCP configuration to connect with: hand it on, and never store it anywhere else.
scope admin · changes · rehearsable · never proposed · logs agent.added
| Input | Type | |
|---|---|---|
name (required) |
string | |
description |
string | what it is and what it is for, for the person reading the log |
expires_at |
string | RFC 3339; the key stops working then. It lives until rotated or removed when omitted |
kind |
string | agent (the default) or integration, for a script that only reads or reports |
propose |
list of string | what it may only ask for: each such call becomes a proposal the person decides. An agent only |
scopes |
list of string | what it may do directly: read, act, ingest, admin (admin carries them all) |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
update_agent
Change an agent · 修改智能体
Change an agent's name, kind, description, grants, key expiry, or whether it is enabled. Scopes and propose, when sent, replace the old lists. A disabled agent keeps its history; its key is refused.
scope admin · changes · rehearsable · logs agent.updated
| Input | Type | |
|---|---|---|
agent (required) |
string | the agent's id or name |
description |
string | |
enabled |
boolean | false refuses its key but keeps it and its history |
expires_at |
string | RFC 3339, or empty to let the key live until rotated |
kind |
string | agent or integration |
name |
string | |
propose |
list of string | what it may only propose, as a whole: replaces the old list |
scopes |
list of string | what it may do directly, as a whole: replaces the old list |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
rotate_agent_key
Give an agent a new key · 更换智能体密钥
Give an agent a new key; the old one stops working at once. The answer carries the new key this one time.
scope admin · changes · rehearsable · never proposed · logs agent.key_rotated
| Input | Type | |
|---|---|---|
agent (required) |
string | the agent's id or name |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
remove_agent
Remove an agent · 移除智能体
Remove an agent and its key for good. Its open incidents go back to nobody, it stops answering first, and the channels that woke it are switched off. What it did stays in the log. To stop it for a while, disable it with update_agent.
scope admin · removes for good · rehearsable · logs agent.removed
| Input | Type | |
|---|---|---|
agent (required) |
string | the agent's id or name |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
Proposals
list_proposals
Proposals · 变更请求
Changes agents asked the person to decide: what each would do, rehearsed when it was asked, and how it ended. Pending ones by default.
scope read · reads · idempotent
| Input | Type | |
|---|---|---|
agent |
string | only one agent's, by name or id |
limit |
integer | 1-200, default 50 |
state |
string | pending (the default), decided, or all |
get_proposal
One proposal · 变更请求详情
One proposal: the operation and its input, secrets masked, what it would do, and — once decided — who decided, what they said, and what the change answered or why it failed.
scope read · reads · idempotent
| Input | Type | |
|---|---|---|
proposal (required) |
string | the proposal's id |
propose
Propose a change · 提出变更
Ask the person to approve a change instead of making it: name an operation you may call, directly or by proposal, and its input. It is checked and rehearsed now, so they see exactly what it would do, and it waits for them in the dashboard and in their notifications. A call you may only propose becomes a proposal by itself; use this when you could make the change but think the person should decide.
scope read · changes · for agents
| Input | Type | |
|---|---|---|
operation (required) |
string | the operation to propose, by name |
input |
object | what to call it with: its own input, as you would call it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
withdraw_proposal
Withdraw a proposal · 撤回变更请求
Withdraw one of your own proposals that the person has not decided yet: it is no longer needed, or you found another way.
scope read · changes · rehearsable · for agents
| Input | Type | |
|---|---|---|
proposal (required) |
string | the proposal's id |
note |
string | a word for the agent: why, or what to do instead |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
approve_proposal
Approve a proposal · 批准变更请求
Approve an agent's proposal: the change is made now, as the agent's, approved by you. If it can no longer be made, the proposal ends as failed, with why.
scope admin · changes · for the person
| Input | Type | |
|---|---|---|
proposal (required) |
string | the proposal's id |
note |
string | a word for the agent: why, or what to do instead |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
reject_proposal
Reject a proposal · 驳回变更请求
Reject an agent's proposal, with a note for the agent saying why or what to do instead.
scope admin · changes · rehearsable · for the person
| Input | Type | |
|---|---|---|
proposal (required) |
string | the proposal's id |
note |
string | a word for the agent: why, or what to do instead |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
Settings
get_settings
Settings · 设置
The person's settings: time zone, language, base currency and exchange rates, how often accounts are read, reminder time, quiet hours, the digest, retention, the first responder and more.
scope read · reads · idempotent
update_settings
Change settings · 修改设置
Change the person's settings. Send only what should change: time zone, language, base currency, exchange rates, how often accounts are read, defaults for warnings, reminder time, quiet hours, the digest, retention, how far ahead dates are listed, the dashboard's public address, or the first responder and its hold.
scope admin · changes · idempotent · rehearsable · logs settings.updated
| Input | Type | |
|---|---|---|
anomaly |
boolean | burst detection on by default |
base_currency |
string | a three-letter code; monetary totals are converted to it |
digest |
object | the periodic summary: enabled; weekday, 0 for every day or 1 (Monday) to 7 (Sunday); and time, HH:MM. Replaced as a whole when sent |
fx |
object | exchange rates: one unit of the key is worth this much of the base currency. Replaced as a whole when sent, so send {} to clear them |
hold_minutes |
integer | how many minutes the person's channels wait for the first responder, 1-240 |
language |
string | en or zh: the language notifications are written in |
notify_resolved |
boolean | send a message when something recovers |
public_url |
string | where the dashboard is reachable; notifications link to it |
quiet |
object | holds back everything that is not critical between start and end, local time, across midnight if need be. Replaced as a whole when sent |
reminder_time |
string | the local time of day date reminders go out, HH:MM |
renotify_hours |
integer | how often an unacknowledged critical incident repeats its notification; 0 never |
responder |
string | the agent that answers first for new incidents, by name or id; empty for nobody. It must be an agent with the act scope |
retention_days |
integer | how long readings and closed incidents are kept |
runway_days |
number | the default lead time, in days, for a running-out warning |
sample_seconds |
integer | how often accounts are read, unless one says otherwise |
timezone |
string | an IANA time zone. It decides what today is: day boundaries, the reminder time, quiet hours |
upcoming_days |
integer | how far ahead the overview looks for dates |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
list_providers
Providers · 平台
Every provider an account can be read through: the built-in catalog and the person's own definitions, with the credential fields each one needs.
scope read · reads · idempotent
save_provider
Save a provider definition · 保存平台定义
Save a provider definition of the person's own — how to call a platform and how to read the meters out of its answer. A built-in provider cannot be replaced; save a changed copy under another id.
scope admin · changes · idempotent · rehearsable · logs provider.saved
| Input | Type | |
|---|---|---|
definition (required) |
object | the whole definition, in the shape list_providers shows. Its id is the key it is saved under; a built-in id is refused, so save a changed copy of a built-in one under another id. Fields that are not part of a definition are refused |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
delete_provider
Delete a provider definition · 删除平台定义
Delete a provider definition of the person's own. Built-in providers cannot be deleted, and one that an account still uses is refused.
scope admin · removes for good · rehearsable · logs provider.deleted
| Input | Type | |
|---|---|---|
provider (required) |
string | the definition's id; a built-in provider cannot be deleted |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
System
get_system
System state · 系统状态
The version, whether notifications are muted, how much is stored, and what each background loop last did.
scope admin · reads · idempotent
backup_now
Back the database up now · 立即备份
Write a backup of the database now, instead of waiting for the schedule.
scope admin · changes · logs system.backed_up
| Input | Type | |
|---|---|---|
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |
export_bundle
Export everything as a bundle · 导出配置包
Export the configuration — settings, providers, channels, accounts, meters, dates, agents — as a bundle, the same file the dashboard's export gives. With secrets it carries credentials in the clear and agents' key hashes; with history it carries the readings too.
scope admin · reads · idempotent
| Input | Type | |
|---|---|---|
history |
boolean | include the meter readings and the closed incidents; left out by default, as they are large |
secrets |
boolean | include credentials and channel settings in the clear. The bundle is then as sensitive as the database: pass it on, do not store it |
import_bundle
Import a bundle · 导入配置包
Merge a bundle — an export file's contents — into this instance, all of it or none. Nothing that already exists under the same name is overwritten: it is skipped and reported.
scope admin · changes · rehearsable · never proposed · logs system.imported
| Input | Type | |
|---|---|---|
bundle (required) |
object | the contents of an export file |
with_settings |
boolean | also apply its settings. Usually wanted only on an empty install: an import into a running one should not move its time zone |
dry_run |
boolean | rehearse: run the change for real, report what it would change, and undo it |
reason |
string | why you are doing this, in a sentence: it is written to the log, where the person reads it |