# Deals

## get_deals

`TOOL get_deals`

Get list of deals 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 deal title
  Type: string
  
  Search term for deal title

- `relations` (argument, array, optional) - Relations to include (e.g., ["client", "createdByUser"])
  Type: array
  
  Relations to include (e.g., ["client", "createdByUser"])
  
  Items:
    Type: string

- `stage` (argument, string, optional) - Filter by deal stage
  Type: string
  
  Filter by deal stage
  
  enum: ["LEAD","QUALIFIED_LEAD","PROPOSAL_MADE","NEGOTIATION","CLOSED_WON","CLOSED_LOST"]

- `clientId` (argument, string, uuid, optional) - Filter by client ID
  Type: string, uuid
  
  Filter by client 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)$"

- `createdByUserId` (argument, string, uuid, optional) - Filter by creator user ID
  Type: string, uuid
  
  Filter by creator user 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": "get_deals",
    "arguments": {
        "page": 1,
        "limit": 10,
        "search": "string",
        "relations": [
          "string"
        ],
        "stage": "LEAD",
        "clientId": "550e8400-e29b-41d4-a716-446655440000",
        "createdByUserId": "550e8400-e29b-41d4-a716-446655440000"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_deals",
  "arguments": {
    "page": 1,
    "limit": 10,
    "search": "string",
    "relations": [
      "string"
    ],
    "stage": "LEAD",
    "clientId": "550e8400-e29b-41d4-a716-446655440000",
    "createdByUserId": "550e8400-e29b-41d4-a716-446655440000"
  }
});
```

### Python

```python
result = await session.call_tool("get_deals", arguments={
  "page": 1,
  "limit": 10,
  "search": "string",
  "relations": [
    "string"
  ],
  "stage": "LEAD",
  "clientId": "550e8400-e29b-41d4-a716-446655440000",
  "createdByUserId": "550e8400-e29b-41d4-a716-446655440000"
})
```


## get_deal_count

`TOOL get_deal_count`

Get deal count in the authenticated user's organization

Authentication: no security requirement declared for this operation.

Parameters:

- `stage` (argument, string, optional) - Filter by deal stage
  Type: string
  
  Filter by deal stage
  
  enum: ["LEAD","QUALIFIED_LEAD","PROPOSAL_MADE","NEGOTIATION","CLOSED_WON","CLOSED_LOST"]

- `clientId` (argument, string, uuid, optional) - Filter by client ID
  Type: string, uuid
  
  Filter by client 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)$"

- `createdByUserId` (argument, string, uuid, optional) - Filter by creator user ID
  Type: string, uuid
  
  Filter by creator user 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": "get_deal_count",
    "arguments": {
        "stage": "LEAD",
        "clientId": "550e8400-e29b-41d4-a716-446655440000",
        "createdByUserId": "550e8400-e29b-41d4-a716-446655440000"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_deal_count",
  "arguments": {
    "stage": "LEAD",
    "clientId": "550e8400-e29b-41d4-a716-446655440000",
    "createdByUserId": "550e8400-e29b-41d4-a716-446655440000"
  }
});
```

### Python

```python
result = await session.call_tool("get_deal_count", arguments={
  "stage": "LEAD",
  "clientId": "550e8400-e29b-41d4-a716-446655440000",
  "createdByUserId": "550e8400-e29b-41d4-a716-446655440000"
})
```


## get_deal

`TOOL get_deal`

Get a specific deal by ID

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (argument, string, uuid, required) - The deal ID
  Type: string, uuid
  
  The deal 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., ["client", "createdByUser", "properties"])
  Type: array
  
  Relations to include (e.g., ["client", "createdByUser", "properties"])
  
  Items:
    Type: string

## Examples

### JSON-RPC

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

### TypeScript

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

### Python

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


## create_deal

`TOOL create_deal`

Create a new deal in the authenticated user's organization

Authentication: no security requirement declared for this operation.

Request body: application/json (required)

Type: object

- `deal_data` (required)
  Type: object
  
  The data for creating the deal
  
  - `title` (required)
    Type: string
    
    The title (required)
  
  Additional properties: 
    Type: unknown

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_deal",
    "arguments": {
        "deal_data": {
          "title": "string"
        }
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "create_deal",
  "arguments": {
    "deal_data": {
      "title": "string"
    }
  }
});
```

### Python

```python
result = await session.call_tool("create_deal", arguments={
  "deal_data": {
    "title": "string"
  }
})
```


## update_deal

`TOOL update_deal`

Update an existing deal

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (argument, string, uuid, required) - The deal ID
  Type: string, uuid
  
  The deal 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)$"

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

## Examples

### JSON-RPC

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

### TypeScript

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

### Python

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


## update_deal_stage

`TOOL update_deal_stage`

Update the stage of a deal

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (argument, string, uuid, required) - The deal ID
  Type: string, uuid
  
  The deal 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)$"

- `stage` (argument, string, required) - The new stage for the deal
  Type: string
  
  The new stage for the deal
  
  enum: ["LEAD","QUALIFIED_LEAD","PROPOSAL_MADE","NEGOTIATION","CLOSED_WON","CLOSED_LOST"]

## Examples

### JSON-RPC

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

### TypeScript

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

### Python

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


## delete_deal

`TOOL delete_deal`

Delete a deal

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (argument, string, uuid, required) - The deal ID
  Type: string, uuid
  
  The deal 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_deal",
    "arguments": {
        "id": "550e8400-e29b-41d4-a716-446655440000"
      }
  }
}
```

### TypeScript

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

### Python

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


## get_deals_by_client

`TOOL get_deals_by_client`

Get deals for a specific client

Authentication: no security requirement declared for this operation.

Parameters:

- `clientId` (argument, string, uuid, required) - The client ID
  Type: string, uuid
  
  The client 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

- `stage` (argument, string, optional) - Filter by deal stage
  Type: string
  
  Filter by deal stage
  
  enum: ["LEAD","QUALIFIED_LEAD","PROPOSAL_MADE","NEGOTIATION","CLOSED_WON","CLOSED_LOST"]

- `relations` (argument, array, optional) - Relations to include
  Type: array
  
  Relations to include
  
  Items:
    Type: string

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_deals_by_client",
    "arguments": {
        "clientId": "550e8400-e29b-41d4-a716-446655440000",
        "page": 1,
        "limit": 10,
        "stage": "LEAD",
        "relations": [
          "string"
        ]
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_deals_by_client",
  "arguments": {
    "clientId": "550e8400-e29b-41d4-a716-446655440000",
    "page": 1,
    "limit": 10,
    "stage": "LEAD",
    "relations": [
      "string"
    ]
  }
});
```

### Python

```python
result = await session.call_tool("get_deals_by_client", arguments={
  "clientId": "550e8400-e29b-41d4-a716-446655440000",
  "page": 1,
  "limit": 10,
  "stage": "LEAD",
  "relations": [
    "string"
  ]
})
```


## get_my_deals

`TOOL get_my_deals`

Get deals created by 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

- `stage` (argument, string, optional) - Filter by deal stage
  Type: string
  
  Filter by deal stage
  
  enum: ["LEAD","QUALIFIED_LEAD","PROPOSAL_MADE","NEGOTIATION","CLOSED_WON","CLOSED_LOST"]

- `relations` (argument, array, optional) - Relations to include
  Type: array
  
  Relations to include
  
  Items:
    Type: string

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_my_deals",
    "arguments": {
        "page": 1,
        "limit": 10,
        "stage": "LEAD",
        "relations": [
          "string"
        ]
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_my_deals",
  "arguments": {
    "page": 1,
    "limit": 10,
    "stage": "LEAD",
    "relations": [
      "string"
    ]
  }
});
```

### Python

```python
result = await session.call_tool("get_my_deals", arguments={
  "page": 1,
  "limit": 10,
  "stage": "LEAD",
  "relations": [
    "string"
  ]
})
```


## get_deal_statistics

`TOOL get_deal_statistics`

Get deal statistics for the authenticated user's organization

Authentication: no security requirement declared for this operation.

Parameters:

- `clientId` (argument, string, uuid, optional) - Filter by specific client ID
  Type: string, uuid
  
  Filter by specific client 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)$"

- `createdByUserId` (argument, string, uuid, optional) - Filter by creator user ID
  Type: string, uuid
  
  Filter by creator user 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) - Start date for statistics (ISO format)
  Type: string
  
  Start date for statistics (ISO format)

- `endDate` (argument, string, optional) - End date for statistics (ISO format)
  Type: string
  
  End date for statistics (ISO format)

## Examples

### JSON-RPC

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

### TypeScript

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

### Python

```python
result = await session.call_tool("get_deal_statistics", arguments={
  "clientId": "550e8400-e29b-41d4-a716-446655440000",
  "createdByUserId": "550e8400-e29b-41d4-a716-446655440000",
  "startDate": "string",
  "endDate": "string"
})
```


## add_deal_property

`TOOL add_deal_property`

Add a custom property to a deal

Authentication: no security requirement declared for this operation.

Request body: application/json (required)

Type: object

- `dealId` (required)
  Type: string, uuid
  
  The deal 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)$"

- `property` (required)
  Type: object
  
  The property to add
  
  - `name` (required)
    Type: string
    
    Property name
  
  - `value` (required)
    Type: string
    
    Property value

## Examples

### JSON-RPC

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

### TypeScript

```typescript
const result = await client.callTool({
  "name": "add_deal_property",
  "arguments": {
    "dealId": "550e8400-e29b-41d4-a716-446655440000",
    "property": {
      "name": "string",
      "value": "string"
    }
  }
});
```

### Python

```python
result = await session.call_tool("add_deal_property", arguments={
  "dealId": "550e8400-e29b-41d4-a716-446655440000",
  "property": {
    "name": "string",
    "value": "string"
  }
})
```


## update_deal_property

`TOOL update_deal_property`

Update a custom property of a deal

Authentication: no security requirement declared for this operation.

Parameters:

- `dealId` (argument, string, uuid, required) - The deal ID
  Type: string, uuid
  
  The deal 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)$"

- `propertyName` (argument, string, required) - The property name to update
  Type: string
  
  The property name to update

- `value` (argument, string, required) - The new property value
  Type: string
  
  The new property value

## Examples

### JSON-RPC

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

### TypeScript

```typescript
const result = await client.callTool({
  "name": "update_deal_property",
  "arguments": {
    "dealId": "550e8400-e29b-41d4-a716-446655440000",
    "propertyName": "string",
    "value": "string"
  }
});
```

### Python

```python
result = await session.call_tool("update_deal_property", arguments={
  "dealId": "550e8400-e29b-41d4-a716-446655440000",
  "propertyName": "string",
  "value": "string"
})
```


## remove_deal_property

`TOOL remove_deal_property`

Remove a custom property from a deal

Authentication: no security requirement declared for this operation.

Parameters:

- `dealId` (argument, string, uuid, required) - The deal ID
  Type: string, uuid
  
  The deal 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)$"

- `propertyName` (argument, string, required) - The property name to remove
  Type: string
  
  The property name to remove

## Examples

### JSON-RPC

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

### TypeScript

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

### Python

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


## get_deals_pipeline

`TOOL get_deals_pipeline`

Get deals organized by pipeline stages for the authenticated user's organization

Authentication: no security requirement declared for this operation.

Parameters:

- `clientId` (argument, string, uuid, optional) - Filter by client ID
  Type: string, uuid
  
  Filter by client 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)$"

- `createdByUserId` (argument, string, uuid, optional) - Filter by creator user ID
  Type: string, uuid
  
  Filter by creator user 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": "get_deals_pipeline",
    "arguments": {
        "clientId": "550e8400-e29b-41d4-a716-446655440000",
        "createdByUserId": "550e8400-e29b-41d4-a716-446655440000"
      }
  }
}
```

### TypeScript

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

### Python

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


## search_deals

`TOOL search_deals`

Search deals by title or properties

Authentication: no security requirement declared for this operation.

Parameters:

- `query` (argument, string, required) - Search query
  Type: string
  
  Search query

- `limit` (argument, number, optional) - Maximum number of results
  Type: number
  
  Maximum number of results
  
  default: 20

- `stage` (argument, string, optional) - Filter by deal stage
  Type: string
  
  Filter by deal stage
  
  enum: ["LEAD","QUALIFIED_LEAD","PROPOSAL_MADE","NEGOTIATION","CLOSED_WON","CLOSED_LOST"]

- `clientId` (argument, string, uuid, optional) - Filter by client ID
  Type: string, uuid
  
  Filter by client 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": "search_deals",
    "arguments": {
        "query": "string",
        "limit": 20,
        "stage": "LEAD",
        "clientId": "550e8400-e29b-41d4-a716-446655440000"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "search_deals",
  "arguments": {
    "query": "string",
    "limit": 20,
    "stage": "LEAD",
    "clientId": "550e8400-e29b-41d4-a716-446655440000"
  }
});
```

### Python

```python
result = await session.call_tool("search_deals", arguments={
  "query": "string",
  "limit": 20,
  "stage": "LEAD",
  "clientId": "550e8400-e29b-41d4-a716-446655440000"
})
```
