lot.removeSplit
Take a split out of its lot; a lot left empty is deleted.
Takes a split out of its lot. A lot left empty is deleted (lotDeleted: true); GnuCash drops it from the account in
the same way. The split itself and its transaction are untouched.
Examples
Example: with a copy of the reports/lots-baseline example book open as book.gnucash.
JSON-RPC
Request:
{"jsonrpc":"2.0","id":1,"method":"lot.removeSplit","params":{"split":"d0000000000000000000000000000000"}}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"lotDeleted": true
}
}
Command line
red-ale exec --book book.gnucash lot.removeSplit '{"split":"d0000000000000000000000000000000"}'
It prints:
{
"lotDeleted": true
}
MCP tool call
Tool call:
{"name":"lot.removeSplit","arguments":{"split":"d0000000000000000000000000000000"}}
Result:
{
"structuredContent": {
"lotDeleted": true
}
}
Effect: write, on the Book.
Params
Params of lot.removeSplit.
split(Guid, required): The split.
Result
The result of lot.removeSplit.
lotDeleted(boolean, required): The lot was left empty and deleted.