advance_slot
Advance a PostgreSQL logical replication slot to a specified LSN, discarding all changes before that point. Requires exact slot name and target LSN; dry-run by default.
Instructions
Advance a replication slot to an EXPLICIT LSN (irreversible).
Moves the slot's confirmed position forward, discarding all changes
before to_lsn. You must pass the exact slot name and target LSN — there
is no advance-to-latest shortcut. Dry-run unless allow_writes=true AND
the server was started with PG_LOGICAL_MCP_ALLOW_WRITES set.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"slot_name": "<slot_name>",
"to_lsn": "<to_lsn>"
},
"name": "advance_slot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_lsn | Yes | ||
| slot_name | Yes | ||
| allow_writes | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||