# list_accounts

## What it answers

List reachable accounts with identifiers, names and import freshness. Use name when you know the account: it matches a literal case-insensitive substring. Pages default to at most 50 accounts (maximum limit 50), ordered by ascending UUID. Follow pagination.nextOffset as offset with the same name and limit; restart at offset 0 after accounts or access change. Read parakeeto://methodology for shared response conventions and INVALID_ARGUMENT guidance.

Read-only.

## Arguments

| Argument | Type | Required | Default | Allowed values |
| --- | --- | --- | --- | --- |
| `name` | string | no | — | — |
| `limit` | integer | no | `50` | `minimum: 1`; `maximum: 50` |
| `offset` | integer | no | `0` | `minimum: 0`; `maximum: 9007199254740991` |

## 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.accounts`: array of object
    - `data.accounts[].id`: string (uuid)
    - `data.accounts[].name`: string
    - `data.accounts[].freshness`: array of object
      - `data.accounts[].freshness[].source`: string (`"time-entries"`, `"role-task-mappings"`, `"annual-days"`, `"dashboard-inputs"`)
      - `data.accounts[].freshness[].everCompleted`: boolean
      - `data.accounts[].freshness[].completedAt`: string (date-time) or null
  - `data.pagination`: object
    - `data.pagination.limit`: integer (`minimum: 1`; `maximum: 50`)
    - `data.pagination.offset`: integer (`minimum: 0`)
    - `data.pagination.totalRows`: integer (`minimum: 0`)
    - `data.pagination.returnedRows`: integer (`minimum: 0`)
    - `data.pagination.omittedRows`: integer (`minimum: 0`)
    - `data.pagination.nextOffset`: integer or null (`minimum: 0`)
    - `data.pagination.truncated`: boolean
    - `data.pagination.message`: string
  - `data.caveats`: array of object
    - `data.caveats[].code`: string
    - `data.caveats[].message`: 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

Always empty for this tool.

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_accounts",
  "arguments": {}
}
```
