# list_general_ledgers

List the general ledger (GL) codes configured for a workspace, 25 per page, sorted by code unless `sort` is given.
Read-only: GL codes are still edited in the back office.

<!-- INPUT_BLOCK_START -->

## Input

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | `string` | Yes | The ID of the workspace |
| `filters` | `GeneralLedgersFilters` | No | Optional filters by GL code or kind - [GeneralLedgersFilters](#generalledgersfilters) |
| `sort` | `GeneralLedgerSort[]` | No | Sort order, applied in declared order. Defaults to code ascending. - [GeneralLedgerSort](#generalledgersort) |
| `first` | `number` | No | Number of results to return (forward pagination). Maximum 25. Use with "after" for paging. |
| `after` | `string` | No | Cursor for forward pagination. Pass the "endCursor" from previous page's pageInfo. |
| `last` | `number` | No | Number of results to return (backward pagination). Maximum 25. Use with "before" for reverse paging. |
| `before` | `string` | No | Cursor for backward pagination. Pass the "startCursor" from previous page's pageInfo. |

### GeneralLedgersFilters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | `GeneralLedgerCodeFilter` | No | Filter by GL code - [GeneralLedgerCodeFilter](#generalledgercodefilter) |
| `kind` | `GeneralLedgerKindFilter` | No | Filter by GL kind - [GeneralLedgerKindFilter](#generalledgerkindfilter) |

### GeneralLedgerSort

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | `GeneralLedgerSortDirection` | No | Sort by GL code - [GeneralLedgerSortDirection](#generalledgersortdirection) |
| `name` | `GeneralLedgerSortDirection` | No | Sort by GL name - [GeneralLedgerSortDirection](#generalledgersortdirection) |
| `kind` | `GeneralLedgerSortDirection` | No | Sort by GL kind - [GeneralLedgerSortDirection](#generalledgersortdirection) |
| `createdAt` | `GeneralLedgerSortDirection` | No | Sort by creation time - [GeneralLedgerSortDirection](#generalledgersortdirection) |

### GeneralLedgerCodeFilter

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `eq` | `string` | No | Match GL codes equal to this value |
| `in` | `string[]` | No | Match GL codes equal to any of these values |
| `search` | `string` | No | Pattern search on the GL code. Prefix with ^ for starts-with (e.g. "^40"), ! for not-contains, or a plain value for contains. |

### GeneralLedgerKindFilter

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `eq` | `GeneralLedgerKind` | No | Match GL codes of exactly this kind - [GeneralLedgerKind](#generalledgerkind) |
| `in` | `GeneralLedgerKind[]` | No | Match GL codes of any of these kinds - [GeneralLedgerKind](#generalledgerkind) |

### GeneralLedgerSortDirection

| Value | Description |
| --- | --- |
| `ASC` | |
| `DESC` | |

### GeneralLedgerKind

| Value | Description |
| --- | --- |
| `ACCOMMODATION` | |
| `ACCOUNTS_RECEIVABLE_DEBTORS_CONTROL` | |
| `BANK_CASH` | |
| `CANCELLATION_FEE` | |
| `CLEANING_FEE` | |
| `DAMAGE_FEES` | |
| `DEPOSITS` | |
| `DOWN_PAYMENTS` | |
| `LEASE_CANCELLATION_FEE` | |
| `OTHER` | A GL code whose kind maps to no canonical finance class |
| `VAT` | |

<!-- INPUT_BLOCK_END -->

<!-- OUTPUT_BLOCK_START -->

## Output

| Field | Type | Description |
| --- | --- | --- |
| `content` | `ContentItem[]` | Array of content items returned by the tool - [ContentItem](#contentitem) |
| `isError` | `boolean` | Whether the tool execution resulted in an error |

### ContentItem

| Field | Type | Description |
| --- | --- | --- |
| `type` | `'text'` | Content type (currently only 'text' is supported) |
| `text` | `string` | The text content to display |

<!-- OUTPUT_BLOCK_END -->
