report.renameConfiguration
Rename a saved report configuration.
Renames a saved configuration. A name another saved configuration has is refused with conflict, as GnuCash's dialog
refuses it.
Examples
Example: with no book.
JSON-RPC
Request:
{"jsonrpc":"2.0","id":1,"method":"report.saveConfiguration","params":{"name":"March balance sheet","report":"Balance Sheet"}}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "…"
}
Request:
{"jsonrpc":"2.0","id":2,"method":"report.renameConfiguration","params":{"configuration":"March balance sheet","name":"Month-end balance sheet"}}
Response:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"name": "Month-end balance sheet",
"kind": "saved",
"…": "…"
}
}
Command line
red-ale exec --script - <<'EOF'
report.saveConfiguration {"name":"March balance sheet","report":"Balance Sheet"}
report.renameConfiguration {"configuration":"March balance sheet","name":"Month-end balance sheet"}
EOF
It prints:
[
"…",
{
"name": "Month-end balance sheet",
"kind": "saved",
"…": "…"
}
]
MCP tool call
Tool call:
{"name":"report.saveConfiguration","arguments":{"name":"March balance sheet","report":"Balance Sheet"}}
Result:
{
"content": [
{
"type": "text",
"text": "\"…\""
}
]
}
Tool call:
{"name":"report.renameConfiguration","arguments":{"configuration":"March balance sheet","name":"Month-end balance sheet"}}
Result:
{
"structuredContent": {
"name": "Month-end balance sheet",
"kind": "saved",
"…": "…"
}
}
Effect: write, on the Configuration only.
Params
Params of report.renameConfiguration.
configuration(ReportRef, required): The saved configuration, by GUID or name.name(string, required): Its new name.
Result
A report template or saved report configuration, as report.list lists it.
guid(Guid, required): The template's GUID (GnuCash's, for a built-in report), or the saved configuration's.name(string, required): The template's name, or the saved configuration's.kind(ReportKind, required):builtin,userorsaved.template(Guid or null): For a saved configuration: the GUID of the template it configures.script(string or null): The script defining the template:standard/balance-sheet.rhai, or./and a user script's path in the report directory.nullfor a saved configuration whose template is not loaded.menuPath(array of string, required): GnuCash's menu path. Empty for a saved configuration, which GnuCash lists in its own dialog.menuName(string or null): The menu entry when it differs from the name.menuTip(string or null): The menu tip.inMenu(boolean, required): Whether the template shows in menus;falsefor a saved configuration.exportTypes(array of string, required): The exports offered besides HTML:["csv"]for the net and category charts (report.exportCsv), and for a saved configuration of one.readOnly(boolean):truefor a built-in saved configuration (v0.6), which cannot be changed, renamed or deleted, only copied withreport.saveConfiguration; absent otherwise.