report.options
A report's options with their defaults and values, and the JSON Schema of its options param.
Describes a report's options: each one's section, name, type, help text, default and current value, in GnuCash's order,
and the JSON Schema of the options param of report.run. Look here for the names and types before
setting an option. A saved configuration shows its saved values.
Defaults that depend on the book, such as the account list, are worked out from the open book, or from an empty one if none is open; with no book, accounts can only be given by GUID.
Examples
Example: with no book.
JSON-RPC
Request:
{"jsonrpc":"2.0","id":1,"method":"report.options","params":{"report":"Net Worth Linechart"}}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"report": {
"name": "Net Worth Linechart",
"kind": "builtin",
"exportTypes": [
"csv"
],
"…": "…"
},
"options": [
{
"section": "Accounts",
"name": "Accounts",
"type": "accountList",
"…": "…"
},
"…"
],
"…": "…"
}
}
Command line
red-ale exec report.options '{"report":"Net Worth Linechart"}'
It prints:
{
"report": {
"name": "Net Worth Linechart",
"kind": "builtin",
"exportTypes": [
"csv"
],
"…": "…"
},
"options": [
{
"section": "Accounts",
"name": "Accounts",
"type": "accountList",
"…": "…"
},
"…"
],
"…": "…"
}
MCP tool call
Tool call:
{"name":"report.options","arguments":{"report":"Net Worth Linechart"}}
Result:
{
"structuredContent": {
"report": {
"name": "Net Worth Linechart",
"kind": "builtin",
"exportTypes": [
"csv"
],
"…": "…"
},
"options": [
{
"section": "Accounts",
"name": "Accounts",
"type": "accountList",
"…": "…"
},
"…"
],
"…": "…"
}
}
Effect: read.
Params
Params of report.options.
report(ReportRef, required): The report.
Result
The result of report.options.
report(ReportInfo, required): The report.options(array of OptionInfo, required): Every option in GnuCash's order (sections by name, options by key), with its default and configured value.paramsSchema(any, required): The JSON Schema (2020-12) of this report'soptionsparam.