# get_account_context

## What it answers

Describe an account’s settings, import freshness, data coverage and report prerequisites. Omit account only when the key reaches exactly one account. No person-level data is returned. computable describes data prerequisites, not every possible date range or filter. tool names the reporting tool available over this connection; null with toolUnavailableReason means the report cannot be requested here regardless of computable. Read parakeeto://methodology for shared response conventions and INVALID_ARGUMENT guidance.

Read-only.

## Arguments

| Argument | Type | Required | Default | Allowed values |
| --- | --- | --- | --- | --- |
| `account` | 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`: object
    - `data.account.id`: string (uuid)
    - `data.account.name`: string
    - `data.account.currency`: string or null
    - `data.account.locale`: string or null
    - `data.account.annualDays`: string or null (pattern `^-?\d+(?:\.\d+)?$`)
  - `data.imports`: array of object
    - `data.imports[].source`: string (`"time-entries"`, `"role-task-mappings"`, `"annual-days"`, `"dashboard-inputs"`)
    - `data.imports[].everCompleted`: boolean
    - `data.imports[].completedAt`: string (date-time) or null
  - `data.hasTimeEntries`: boolean
  - `data.reports`: array of object
    - `data.reports[].computable`: boolean
    - `data.reports[].missing`: array of object
      - `data.reports[].missing[].code`: string
      - `data.reports[].missing[].message`: string
    - `data.reports[].unchecked`: array of object
      - `data.reports[].unchecked[]`: same shape as `data.reports[].missing[]`
    - `data.reports[].id`: string
    - `data.reports[].freshness`: same shape as `data.imports`
    - `data.reports[].gridFreshness`: array of object
      - `data.reports[].gridFreshness[].kind`: string (`"payroll"`, `"expense"`, `"project"`)
      - `data.reports[].gridFreshness[].gridId`: string (uuid)
      - `data.reports[].gridFreshness[].name`: string
      - `data.reports[].gridFreshness[].storage`: string (`"sheet"`, `"database"`)
      - `data.reports[].gridFreshness[].sheetRefreshedAt`: string (date-time) or null
    - `data.reports[].grids`: array of object, optional
      - `data.reports[].grids[].id`: string (uuid)
      - `data.reports[].grids[].billings`: object
        - `data.reports[].grids[].billings.computable`: boolean
        - `data.reports[].grids[].billings.missing`: same shape as `data.reports[].missing`
        - `data.reports[].grids[].billings.unchecked`: same shape as `data.reports[].unchecked`
      - `data.reports[].grids[].agi`: same shape as `data.reports[].grids[].billings`
    - `data.reports[].tool`: string or null
    - `data.reports[].toolUnavailableReason`: string or null
  - `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": "get_account_context",
  "arguments": {}
}
```

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