You work on the person’s database through BasaltDB’s MCP tools. Every action is recorded, and a guard in their Postgres enforces the rules.
- Call
status. Ifreadyis false, follow each problem’snextStepsand show the person itspersonMessage. Call it again after the person says they fixed something. - Call
run_startwith anintent: one sentence a person can review. Keep therunId. - Read with
query. Write withwrite. Pass therunIdto both. Give everywriteits ownintent. One statement per call, with bound parameters. - Read a row before you update or delete it. If it changed since, the write is refused with
STALE_READ: read it again and decide again.
Defaults for what goes through, what is held and what is refused: Limits and defaults.
Follow nextSteps
Section titled “Follow nextSteps”Every error and every result that needs action carries nextSteps. Do them in order.
- Do
AGENTsteps yourself.CALL_TOOLhas itstoolandargumentsfilled in. WithrepeatCall: true, merge them over the call that returned the step. REVISE_CALL: change the call astextsays, then send it again.ASK_PERSON: ask, and wait for the answer.END_TURN: end your turn. The person acts next. Do not wait again.STOP: do not retry. Do not work around it.RUN_COMMANDas anAGENTstep: runcommand. It appears only whenstatussaysoperatedByisAGENT. WhenoperatedByisPERSON, never start, stop, restart or upgrade anything yourself.
Show links and messages
Section titled “Show links and messages”- Show
personMessageverbatim. Keep its line breaks. - Put each link on its own line exactly as given, or as
[label](url)with the label fromlinks. - Never put a link in a code block or inline code.
- Never split, wrap, shorten, encode or rewrite a link.
- Put nothing after a link on its line.
- Show every
PERSONstep’scommandandurlthe same way, unchanged.
When a write is held
Section titled “When a write is held”APPROVAL_REQUIRED means the write has not run.
- Show the person
personMessage. - In the same turn, call
writeonce more with the samesql,params,intentandrunId, plusapprovalId. It waits up to 90 seconds and applies the write when the person approves. - If the wait ends, end your turn and say the write is waiting. When the person says they approved, repeat the call. It applies at once.
- You cannot approve. Lost the link? Call
list_pending.
When a write is refused
Section titled “When a write is refused”Nothing changed. Read code, reason and nextSteps, and do what they say. Never retry a refusal unchanged, never retry in a loop, and never look for another way to get the same result. Never split a write to avoid a hold. Over 50 rows: stop and ask. Split into writes of up to 50 rows only if the person says yes. Every code: Error codes.
Ask the person
Section titled “Ask the person”On ASK_PERSON, and before you undo anything, say in plain words what you want to do, why, and how many rows.
You can prepare an undo of your own work. Only the person’s passkey signs it.
- Find the run with
list_runs. Look withpreview_revert. Rows your team or your app changed since are skipped. - Ask the person. Call
request_revertwith the scope and anintent. Show itspersonMessage. Then call it once with therevertIdto wait for the signature. - If it returns
PENDING, end your turn with the link and expiry. - If it returns
APPLYING, looprevert_planwithpending: trueandlimit: 200, thenapply_revert_batchwith those lines, untilpendingis 0.
Tools: MCP tools.
BasaltDB · Apache-2.0