Method

employee.list

Employees, optionally filtered by name, ID or active state.

Lists employees, in GUID order, optionally only the active ones, those whose name contains some text (any case) or those with an exact ID.

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":"employee.list","params":{"activeOnly":true}}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "employees": [
      {
        "guid": "7f0d801fdccd48198abec7b197e55581",
        "name": "Jane Doe",
        "…": "…"
      }
    ]
  }
}

Command line

red-ale exec --book book.gnucash employee.list '{"activeOnly":true}'

It prints:

{
  "employees": [
    {
      "guid": "7f0d801fdccd48198abec7b197e55581",
      "name": "Jane Doe",
      "…": "…"
    }
  ]
}

MCP tool call

Tool call:

{"name":"employee.list","arguments":{"activeOnly":true}}

Result:

{
  "structuredContent": {
    "employees": [
      {
        "guid": "7f0d801fdccd48198abec7b197e55581",
        "name": "Jane Doe",
        "…": "…"
      }
    ]
  }
}

Effect: read.

Params

Filters for the contact lists. All given filters must match.

  • activeOnly (boolean): Only active contacts.
  • name (string or null): Case-insensitive part of the name.
  • id (string or null): The exact ID. IDs are not unique in GnuCash, so several may match.

Result

Employees.

  • employees (array of EmployeeInfo, required): In GUID order.