> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vultlocal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent-TS Tools

> OpenAI function calling tools available in the Agent

# Agent-TS Tools Reference

The Agent uses OpenAI function calling with 20 tools organized into 5 categories.

## Tool Categories

| Category     | Tools | Purpose                          |
| ------------ | ----- | -------------------------------- |
| Registration | 2     | User registration and status     |
| KYC          | 2     | Document upload and verification |
| Wallet       | 6     | Balance, transfers, statements   |
| Cards        | 6     | Card management operations       |
| Agent        | 4     | Agent/merchant operations        |

***

## Registration Tools

### check\_user\_registration

Check if a phone number is registered as subscriber or agent.

```typescript theme={null}
{
  name: "check_user_registration",
  parameters: {
    phoneE164: string  // E.164 format phone number
  }
}
```

**Returns**: Registration status, user type, KYC level

***

### register\_subscriber

Register a new subscriber account.

```typescript theme={null}
{
  name: "register_subscriber",
  parameters: {
    phoneE164: string,   // Phone number
    firstName: string,   // First name
    lastName: string,    // Last name
    pin: string          // 4-digit PIN
  }
}
```

***

## KYC Tools

### upload\_kyc\_image

Upload and validate a KYC document image.

```typescript theme={null}
{
  name: "upload_kyc_image",
  parameters: {
    phoneE164: string,  // User phone
    side: "front" | "back"  // ID side
  }
}
```

<Note>
  Image data is passed via message context, not as a parameter.
</Note>

***

### upgrade\_kyc

Complete KYC upgrade after both ID sides are validated.

```typescript theme={null}
{
  name: "upgrade_kyc",
  parameters: {
    phoneE164: string,
    confirm: boolean  // User confirmation
  }
}
```

***

## Wallet Tools

### check\_balance

Check wallet balance. **Requires PIN**.

```typescript theme={null}
{
  name: "check_balance",
  parameters: {
    phoneE164: string,  // User phone
    pin: string         // 4-digit PIN (REQUIRED)
  }
}
```

**Returns**: `{ balance: number, currency: string }`

***

### get\_transactions

Get transaction history. **Requires PIN**.

```typescript theme={null}
{
  name: "get_transactions",
  parameters: {
    phoneE164: string,
    pin: string,
    limit?: number  // Default: 10
  }
}
```

***

### initiate\_transfer

P2P transfer to another user's card. **Requires PIN**.

```typescript theme={null}
{
  name: "initiate_transfer",
  parameters: {
    senderPhoneE164: string,     // Sender phone
    recipientCardSerial: string, // Recipient card (e.g., "CARD0005")
    amount: number,              // Amount in SLE
    pin: string                  // Sender's PIN
  }
}
```

***

### get\_account\_limits

Get transaction limits based on KYC level.

```typescript theme={null}
{
  name: "get_account_limits",
  parameters: {
    phoneE164: string
  }
}
```

**Returns**: Single transaction, daily, monthly limits

***

### change\_subscriber\_pin

Change subscriber's PIN. **Requires old PIN**.

```typescript theme={null}
{
  name: "change_subscriber_pin",
  parameters: {
    phoneE164: string,
    oldPin: string,  // Current PIN
    newPin: string   // New PIN
  }
}
```

***

### request\_account\_statement

Generate and send PDF account statement.

```typescript theme={null}
{
  name: "request_account_statement",
  parameters: {
    phoneE164: string,
    startDate: string,  // YYYY-MM-DD
    endDate: string     // YYYY-MM-DD
  }
}
```

***

## Card Tools

### get\_user\_cards

List all cards linked to user.

```typescript theme={null}
{
  name: "get_user_cards",
  parameters: {
    phoneE164: string
  }
}
```

***

### link\_card

Link a new card to account.

```typescript theme={null}
{
  name: "link_card",
  parameters: {
    phoneE164: string,
    cardSerial: string,
    pin: string
  }
}
```

***

### create\_child\_card

Create a child card with spending limits.

```typescript theme={null}
{
  name: "create_child_card",
  parameters: {
    phoneE164: string,
    parentCardSerial: string,
    childCardSerial: string,
    childName: string,
    dailyLimit: number,
    parentPin: string,
    childPin: string
  }
}
```

***

### change\_child\_card\_pin

Change PIN for a child card.

```typescript theme={null}
{
  name: "change_child_card_pin",
  parameters: {
    phoneE164: string,
    cardSerial: string,
    parentPin: string,
    newChildPin: string
  }
}
```

***

### block\_card

Block a card.

```typescript theme={null}
{
  name: "block_card",
  parameters: {
    phoneE164: string,
    cardSerial: string,
    pin: string,
    reason?: string
  }
}
```

***

### unblock\_card

Unblock a blocked card.

```typescript theme={null}
{
  name: "unblock_card",
  parameters: {
    phoneE164: string,
    cardSerial: string,
    pin: string
  }
}
```

***

## Agent Tools

### check\_agent\_balance

Check agent float balance. **Requires PIN**.

```typescript theme={null}
{
  name: "check_agent_balance",
  parameters: {
    phoneE164: string,
    pin: string
  }
}
```

***

### agent\_cash\_in

Perform cash-in for a subscriber. **Requires PIN**.

```typescript theme={null}
{
  name: "agent_cash_in",
  parameters: {
    agentPhoneE164: string,
    subscriberPhoneE164: string,
    amount: number,
    pin: string
  }
}
```

***

### transfer\_to\_sub\_agent

Transfer float to sub-agent. **Requires PIN**.

```typescript theme={null}
{
  name: "transfer_to_sub_agent",
  parameters: {
    fromAgentPhone: string,
    toAgentPhone: string,
    amount: number,
    pin: string
  }
}
```

***

### change\_agent\_pin

Change agent's PIN. **Requires old PIN**.

```typescript theme={null}
{
  name: "change_agent_pin",
  parameters: {
    phoneE164: string,
    oldPin: string,
    newPin: string
  }
}
```

***

## Security Notes

<Warning>
  **PIN Requirements**: Most financial operations require the user's 4-digit PIN. The agent is instructed to always ask for PIN before calling these functions.
</Warning>

<Warning>
  **Phone Validation**: The `phoneE164` parameter must match the texting user's phone number. The agent will not accept requests to operate on different phone numbers.
</Warning>

## Next Steps

<CardGroup cols={2}>
  <Card title="API Endpoints" icon="server" href="/api-reference/agent-ts/endpoints">
    REST endpoint documentation
  </Card>

  <Card title="KYC Validation" icon="shield-check" href="/agent-ts/kyc-validation">
    Document validation details
  </Card>
</CardGroup>
