# list_payroll_entries

## What it answers

List every stored Model Calculator payroll input row, including Included=false rows. Requires the current connection owner to be an administrator or have People grid view on this account. No compensation is returned. Choose payrollGridId when multiple grids are listed in PAYROLL_GRID_REQUIRED. Blank dates and missing or invalid values are null; caveated rows are not validated scenario input. endDate is the editable termination input, not a derived active-until date. freelancer is false under the current payroll convention. References are opaque and bind exactly one row to the current stored snapshot; edits or refreshes may require relisting. Stored freshness does not prove the live Sheet is unchanged. Read parakeeto://methodology for shared response conventions and INVALID_ARGUMENT guidance.

Read-only.

## Arguments

| Argument | Type | Required | Default | Allowed values |
| --- | --- | --- | --- | --- |
| `account` | string (uuid) | no | — | — |
| `payrollGridId` | string (uuid) | no | — | — |

## Returned fields

The result is an envelope: `ok: true` with `data`, or `ok: false` with `error`. Error codes: `MODEL_CALCULATOR_ACCESS_REQUIRED`, `PAYROLL_GRID_MISSING`, `PAYROLL_GRID_REQUIRED`, `PROJECT_GRID_REQUIRED`, `EXPENSE_GRID_REQUIRED`, `PAYROLL_ENTRY_REFERENCE_STALE`, `ACCOUNT_NOT_FOUND`, `ACCOUNT_CONFIGURATION_MISSING`, `NO_IMPORTED_TIME`, `NOTHING_IMPORTED`, `ACCOUNT_REQUIRED`, `NO_REACHABLE_ACCOUNTS`, `FEATURE_NOT_ENTITLED`, `PERMISSION_DENIED`, `CALCULATION_FAILED`, `INTERNAL_ERROR`, `INVALID_ARGUMENT`.

- `data`: object
  - `data.account`: string (uuid)
  - `data.payrollGrid`: object
    - `data.payrollGrid.id`: string (uuid)
    - `data.payrollGrid.name`: string
  - `data.entries`: array of object
    - `data.entries[].reference`: string
    - `data.entries[].employee`: string or null
    - `data.entries[].position`: string or null
    - `data.entries[].roleCategory`: string or null
    - `data.entries[].included`: boolean
    - `data.entries[].freelancer`: boolean
    - `data.entries[].startDate`: string or null (pattern `^\d{4}-\d{2}-\d{2}$`)
    - `data.entries[].endDate`: string or null (pattern `^\d{4}-\d{2}-\d{2}$`)
    - `data.entries[].weeklyHours`: string or null (pattern `^-?\d+(?:\.\d+)?$`)
    - `data.entries[].workdays`: string or null (pattern `^-?\d+(?:\.\d+)?$`)
    - `data.entries[].deliveryHoursTarget`: string or null (pattern `^-?\d+(?:\.\d+)?$`)
  - `data.gridFreshness`: array of object
    - `data.gridFreshness[].kind`: string (`"payroll"`, `"expense"`, `"project"`)
    - `data.gridFreshness[].gridId`: string (uuid)
    - `data.gridFreshness[].name`: string
    - `data.gridFreshness[].storage`: string (`"sheet"`, `"database"`)
    - `data.gridFreshness[].sheetRefreshedAt`: string (date-time) or null
  - `data.caveats`: array of object
    - `data.caveats[].code`: string (`"payroll-entry-invalid"`)
    - `data.caveats[].message`: string
    - `data.caveats[].reference`: string

On failure:

- `error`: object
  - `error.code`: string (`"MODEL_CALCULATOR_ACCESS_REQUIRED"`, `"PAYROLL_GRID_MISSING"`, `"PAYROLL_GRID_REQUIRED"`, `"PROJECT_GRID_REQUIRED"`, `"EXPENSE_GRID_REQUIRED"`, `"PAYROLL_ENTRY_REFERENCE_STALE"`, `"ACCOUNT_NOT_FOUND"`, `"ACCOUNT_CONFIGURATION_MISSING"`, `"NO_IMPORTED_TIME"`, `"NOTHING_IMPORTED"`, `"ACCOUNT_REQUIRED"`, `"NO_REACHABLE_ACCOUNTS"`, `"FEATURE_NOT_ENTITLED"`, `"PERMISSION_DENIED"`, `"CALCULATION_FAILED"`, `"INTERNAL_ERROR"`, `"INVALID_ARGUMENT"`)
  - `error.argument`: string, optional (`minLength: 1`)
  - `error.message`: string
  - `error.accounts`: array of object, optional
    - `error.accounts[].id`: string (uuid)
    - `error.accounts[].name`: string
  - `error.payrollGrids`: array of object, optional
    - `error.payrollGrids[]`: same shape as `error.accounts[]`
  - `error.projectGrids`: array of object, optional
    - `error.projectGrids[]`: same shape as `error.accounts[]`
  - `error.expenseGrids`: array of object, optional
    - `error.expenseGrids[]`: same shape as `error.accounts[]`
  - `error.context`: object, optional
    - `error.context.account`: object
      - Further fields: see the response.
    - `error.context.imports`: array of object
      - Further fields: see the response.
    - `error.context.hasTimeEntries`: boolean
    - `error.context.reports`: array of object
      - Further fields: see the response.

## Definitions

This tool returns no definitions.

## Caveats

- `payroll-entry-invalid`. Also carries `reference`.

Read every caveat before interpreting a figure. See [methodology](</methodology.md>) on how to communicate caveats and data-quality conditions.

## Example call

```json
{
  "name": "list_payroll_entries",
  "arguments": {}
}
```

Add `account` with an identifier from `list_accounts`; omit it only when the connection reaches exactly one account.
