Method

employee.get

An employee.

Returns one employee by GUID.

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.get","params":{"employee":"7f0d801fdccd48198abec7b197e55581"}}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "guid": "7f0d801fdccd48198abec7b197e55581",
    "name": "Jane Doe",
    "username": "jdoe",
    "rate": {
      "num": "4250",
      "denom": "100"
    },
    "…": "…"
  }
}

Command line

red-ale exec --book book.gnucash employee.get '{"employee":"7f0d801fdccd48198abec7b197e55581"}'

It prints:

{
  "guid": "7f0d801fdccd48198abec7b197e55581",
  "name": "Jane Doe",
  "username": "jdoe",
  "rate": {
    "num": "4250",
    "denom": "100"
  },
  "…": "…"
}

MCP tool call

Tool call:

{"name":"employee.get","arguments":{"employee":"7f0d801fdccd48198abec7b197e55581"}}

Result:

{
  "structuredContent": {
    "guid": "7f0d801fdccd48198abec7b197e55581",
    "name": "Jane Doe",
    "username": "jdoe",
    "rate": {
      "num": "4250",
      "denom": "100"
    },
    "…": "…"
  }
}

Effect: read.

Params

Names one employee.

  • employee (Guid, required): The employee.

Result

An employee.

  • guid (Guid, required): A GUID: 32 hexadecimal digits.
  • id (string, required)
  • name (string, required): The address name.
  • username (string, required)
  • addr (AddressInfo, required): An address. Empty strings are unset fields.
  • language (string, required)
  • acl (string, required)
  • workday (Amount, required): An exact amount. Read from a decimal string ("12.34"), a rational string ("1234/100") or {num, denom} with string members; written as {num, denom}. Never a JSON number.
  • rate (Amount, required): An exact amount. Read from a decimal string ("12.34"), a rational string ("1234/100") or {num, denom} with string members; written as {num, denom}. Never a JSON number.
  • currency (CommodityId or null)
  • creditCardAccount (Guid or null)
  • active (boolean, required)