Method

taxTable.list

Tax tables; frozen copies made by posting only on request.

Lists the visible tax tables, by name. When a document is posted, GnuCash freezes a copy of each table its lines use, so that later edits to the table do not change posted documents. These copies are invisible and are listed only with includeFrozen; they have a parent and cannot be changed or deleted.

Examples

Example: with a copy of the synthetic/business-editable example book open as book.gnucash.

JSON-RPC

Request:

{"jsonrpc":"2.0","id":1,"method":"taxTable.list","params":{}}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "taxTables": [
      {
        "name": "GST+Levy",
        "invisible": false,
        "…": "…"
      }
    ]
  }
}

Request:

{"jsonrpc":"2.0","id":2,"method":"taxTable.list","params":{"includeFrozen":true}}

Response:

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "taxTables": [
      {
        "name": "GST+Levy",
        "invisible": false,
        "child": "dfe825b3f6ae4a6392c7eaeb0af670cd",
        "…": "…"
      },
      {
        "guid": "dfe825b3f6ae4a6392c7eaeb0af670cd",
        "invisible": true,
        "parent": "489200ce534b46379dd206e300012248",
        "…": "…"
      }
    ]
  }
}

Command line

red-ale exec --book book.gnucash --script - <<'EOF'
taxTable.list {}
taxTable.list {"includeFrozen":true}
EOF

It prints:

[
  {
    "taxTables": [
      {
        "name": "GST+Levy",
        "invisible": false,
        "…": "…"
      }
    ]
  },
  {
    "taxTables": [
      {
        "name": "GST+Levy",
        "invisible": false,
        "child": "dfe825b3f6ae4a6392c7eaeb0af670cd",
        "…": "…"
      },
      {
        "guid": "dfe825b3f6ae4a6392c7eaeb0af670cd",
        "invisible": true,
        "parent": "489200ce534b46379dd206e300012248",
        "…": "…"
      }
    ]
  }
]

MCP tool call

Tool call:

{"name":"taxTable.list","arguments":{}}

Result:

{
  "structuredContent": {
    "taxTables": [
      {
        "name": "GST+Levy",
        "invisible": false,
        "…": "…"
      }
    ]
  }
}

Tool call:

{"name":"taxTable.list","arguments":{"includeFrozen":true}}

Result:

{
  "structuredContent": {
    "taxTables": [
      {
        "name": "GST+Levy",
        "invisible": false,
        "child": "dfe825b3f6ae4a6392c7eaeb0af670cd",
        "…": "…"
      },
      {
        "guid": "dfe825b3f6ae4a6392c7eaeb0af670cd",
        "invisible": true,
        "parent": "489200ce534b46379dd206e300012248",
        "…": "…"
      }
    ]
  }
}

Effect: read.

Params

Params of the lists of tax tables and billing terms.

  • includeFrozen (boolean): Include the invisible frozen copies posting makes.

Result

Tax tables.

  • taxTables (array of TaxTableInfo, required): Sorted by name, then GUID.