# Expenses

## get_expenses

`TOOL get_expenses`

Get list of expenses for the authenticated user's organization

Authentication: no security requirement declared for this operation.

Parameters:

- `page` (argument, number, optional) - Page number for pagination
  Type: number
  
  Page number for pagination
  
  default: 1

- `limit` (argument, number, optional) - Number of items per page
  Type: number
  
  Number of items per page
  
  default: 10

- `search` (argument, string, optional) - Search term for expense notes or purpose
  Type: string
  
  Search term for expense notes or purpose

- `relations` (argument, array, optional) - Relations to include (e.g., ["employee", "category", "project", "tags"])
  Type: array
  
  Relations to include (e.g., ["employee", "category", "project", "tags"])
  
  Items:
    Type: string

- `employeeId` (argument, string, uuid, optional) - Filter by employee ID
  Type: string, uuid
  
  Filter by employee ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `categoryId` (argument, string, uuid, optional) - Filter by expense category ID
  Type: string, uuid
  
  Filter by expense category ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `projectId` (argument, string, uuid, optional) - Filter by project ID
  Type: string, uuid
  
  Filter by project ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `status` (argument, string, optional) - Filter by expense status
  Type: string
  
  Filter by expense status

- `startDate` (argument, string, optional) - Filter expenses from this date (ISO format)
  Type: string
  
  Filter expenses from this date (ISO format)

- `endDate` (argument, string, optional) - Filter expenses until this date (ISO format)
  Type: string
  
  Filter expenses until this date (ISO format)

- `currency` (argument, string, optional) - Filter by currency
  Type: string
  
  Filter by currency
  
  enum: ["USD","EUR","GBP","JPY","CAD","AUD","CHF","CNY"]

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_expenses",
    "arguments": {
        "page": 1,
        "limit": 10,
        "search": "string",
        "relations": [
          "string"
        ],
        "employeeId": "550e8400-e29b-41d4-a716-446655440000",
        "categoryId": "550e8400-e29b-41d4-a716-446655440000",
        "projectId": "550e8400-e29b-41d4-a716-446655440000",
        "status": "string",
        "startDate": "string",
        "endDate": "string",
        "currency": "USD"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_expenses",
  "arguments": {
    "page": 1,
    "limit": 10,
    "search": "string",
    "relations": [
      "string"
    ],
    "employeeId": "550e8400-e29b-41d4-a716-446655440000",
    "categoryId": "550e8400-e29b-41d4-a716-446655440000",
    "projectId": "550e8400-e29b-41d4-a716-446655440000",
    "status": "string",
    "startDate": "string",
    "endDate": "string",
    "currency": "USD"
  }
});
```

### Python

```python
result = await session.call_tool("get_expenses", arguments={
  "page": 1,
  "limit": 10,
  "search": "string",
  "relations": [
    "string"
  ],
  "employeeId": "550e8400-e29b-41d4-a716-446655440000",
  "categoryId": "550e8400-e29b-41d4-a716-446655440000",
  "projectId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "string",
  "startDate": "string",
  "endDate": "string",
  "currency": "USD"
})
```


## get_expense_count

`TOOL get_expense_count`

Get expense count in the authenticated user's organization

Authentication: no security requirement declared for this operation.

Parameters:

- `employeeId` (argument, string, uuid, optional) - Filter by employee ID
  Type: string, uuid
  
  Filter by employee ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `categoryId` (argument, string, uuid, optional) - Filter by expense category ID
  Type: string, uuid
  
  Filter by expense category ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `status` (argument, string, optional) - Filter by expense status
  Type: string
  
  Filter by expense status

- `startDate` (argument, string, optional) - Filter expenses from this date (ISO format)
  Type: string
  
  Filter expenses from this date (ISO format)

- `endDate` (argument, string, optional) - Filter expenses until this date (ISO format)
  Type: string
  
  Filter expenses until this date (ISO format)

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_expense_count",
    "arguments": {
        "employeeId": "550e8400-e29b-41d4-a716-446655440000",
        "categoryId": "550e8400-e29b-41d4-a716-446655440000",
        "status": "string",
        "startDate": "string",
        "endDate": "string"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_expense_count",
  "arguments": {
    "employeeId": "550e8400-e29b-41d4-a716-446655440000",
    "categoryId": "550e8400-e29b-41d4-a716-446655440000",
    "status": "string",
    "startDate": "string",
    "endDate": "string"
  }
});
```

### Python

```python
result = await session.call_tool("get_expense_count", arguments={
  "employeeId": "550e8400-e29b-41d4-a716-446655440000",
  "categoryId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "string",
  "startDate": "string",
  "endDate": "string"
})
```


## get_expense

`TOOL get_expense`

Get a specific expense by ID

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (argument, string, uuid, required) - The expense ID
  Type: string, uuid
  
  The expense ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `relations` (argument, array, optional) - Relations to include (e.g., ["employee", "category", "project", "tags"])
  Type: array
  
  Relations to include (e.g., ["employee", "category", "project", "tags"])
  
  Items:
    Type: string

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_expense",
    "arguments": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "relations": [
          "string"
        ]
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_expense",
  "arguments": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "relations": [
      "string"
    ]
  }
});
```

### Python

```python
result = await session.call_tool("get_expense", arguments={
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "relations": [
    "string"
  ]
})
```


## create_expense

`TOOL create_expense`

Create a new expense in the authenticated user's organization

Authentication: no security requirement declared for this operation.

Request body: application/json (required)

Type: object

- `expense_data` (required)
  Type: object
  
  The data for creating the expense
  
  - `amount` (required)
    Type: number
    
    The amount (required)
  
  - `currency` (required)
    Type: string
    
    The currency (required)
  
  Additional properties: 
    Type: unknown

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_expense",
    "arguments": {
        "expense_data": {
          "amount": 0,
          "currency": "string"
        }
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "create_expense",
  "arguments": {
    "expense_data": {
      "amount": 0,
      "currency": "string"
    }
  }
});
```

### Python

```python
result = await session.call_tool("create_expense", arguments={
  "expense_data": {
    "amount": 0,
    "currency": "string"
  }
})
```


## update_expense

`TOOL update_expense`

Update an existing expense

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (argument, string, uuid, required) - The expense ID
  Type: string, uuid
  
  The expense ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `expense_data` (argument, object, required) - The data for updating the expense
  Type: object
  
  The data for updating the expense
  
  Additional properties: 
    Type: unknown

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_expense",
    "arguments": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "expense_data": {}
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "update_expense",
  "arguments": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "expense_data": {}
  }
});
```

### Python

```python
result = await session.call_tool("update_expense", arguments={
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "expense_data": {}
})
```


## delete_expense

`TOOL delete_expense`

Delete an expense

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (argument, string, uuid, required) - The expense ID
  Type: string, uuid
  
  The expense ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_expense",
    "arguments": {
        "id": "550e8400-e29b-41d4-a716-446655440000"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "delete_expense",
  "arguments": {
    "id": "550e8400-e29b-41d4-a716-446655440000"
  }
});
```

### Python

```python
result = await session.call_tool("delete_expense", arguments={
  "id": "550e8400-e29b-41d4-a716-446655440000"
})
```


## get_expense_categories

`TOOL get_expense_categories`

Get list of expense categories for the authenticated user's organization

Authentication: no security requirement declared for this operation.

Parameters:

- `page` (argument, number, optional) - Page number for pagination
  Type: number
  
  Page number for pagination
  
  default: 1

- `limit` (argument, number, optional) - Number of items per page
  Type: number
  
  Number of items per page
  
  default: 10

- `search` (argument, string, optional) - Search term for category name
  Type: string
  
  Search term for category name

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_expense_categories",
    "arguments": {
        "page": 1,
        "limit": 10,
        "search": "string"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_expense_categories",
  "arguments": {
    "page": 1,
    "limit": 10,
    "search": "string"
  }
});
```

### Python

```python
result = await session.call_tool("get_expense_categories", arguments={
  "page": 1,
  "limit": 10,
  "search": "string"
})
```


## get_expenses_by_employee

`TOOL get_expenses_by_employee`

Get expenses for a specific employee

Authentication: no security requirement declared for this operation.

Parameters:

- `employeeId` (argument, string, uuid, required) - The employee ID
  Type: string, uuid
  
  The employee ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `page` (argument, number, optional) - Page number for pagination
  Type: number
  
  Page number for pagination
  
  default: 1

- `limit` (argument, number, optional) - Number of items per page
  Type: number
  
  Number of items per page
  
  default: 10

- `status` (argument, string, optional) - Filter by expense status
  Type: string
  
  Filter by expense status

- `startDate` (argument, string, optional) - Filter expenses from this date (ISO format)
  Type: string
  
  Filter expenses from this date (ISO format)

- `endDate` (argument, string, optional) - Filter expenses until this date (ISO format)
  Type: string
  
  Filter expenses until this date (ISO format)

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_expenses_by_employee",
    "arguments": {
        "employeeId": "550e8400-e29b-41d4-a716-446655440000",
        "page": 1,
        "limit": 10,
        "status": "string",
        "startDate": "string",
        "endDate": "string"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_expenses_by_employee",
  "arguments": {
    "employeeId": "550e8400-e29b-41d4-a716-446655440000",
    "page": 1,
    "limit": 10,
    "status": "string",
    "startDate": "string",
    "endDate": "string"
  }
});
```

### Python

```python
result = await session.call_tool("get_expenses_by_employee", arguments={
  "employeeId": "550e8400-e29b-41d4-a716-446655440000",
  "page": 1,
  "limit": 10,
  "status": "string",
  "startDate": "string",
  "endDate": "string"
})
```


## get_my_expenses

`TOOL get_my_expenses`

Get expenses for the current authenticated user

Authentication: no security requirement declared for this operation.

Parameters:

- `page` (argument, number, optional) - Page number for pagination
  Type: number
  
  Page number for pagination
  
  default: 1

- `limit` (argument, number, optional) - Number of items per page
  Type: number
  
  Number of items per page
  
  default: 10

- `status` (argument, string, optional) - Filter by expense status
  Type: string
  
  Filter by expense status

- `categoryId` (argument, string, uuid, optional) - Filter by expense category ID
  Type: string, uuid
  
  Filter by expense category ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `startDate` (argument, string, optional) - Filter expenses from this date (ISO format)
  Type: string
  
  Filter expenses from this date (ISO format)

- `endDate` (argument, string, optional) - Filter expenses until this date (ISO format)
  Type: string
  
  Filter expenses until this date (ISO format)

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_my_expenses",
    "arguments": {
        "page": 1,
        "limit": 10,
        "status": "string",
        "categoryId": "550e8400-e29b-41d4-a716-446655440000",
        "startDate": "string",
        "endDate": "string"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_my_expenses",
  "arguments": {
    "page": 1,
    "limit": 10,
    "status": "string",
    "categoryId": "550e8400-e29b-41d4-a716-446655440000",
    "startDate": "string",
    "endDate": "string"
  }
});
```

### Python

```python
result = await session.call_tool("get_my_expenses", arguments={
  "page": 1,
  "limit": 10,
  "status": "string",
  "categoryId": "550e8400-e29b-41d4-a716-446655440000",
  "startDate": "string",
  "endDate": "string"
})
```
