---
title: "Connect Charlie to ChatGPT: Manage Leave, Salaries, and Offices"
slug: connect-charlie-to-chatgpt-manage-leave-salaries-and-offices
date: 2026-06-08
author: Uday Gajavalli
categories: ["AI & Agents"]
excerpt: "Learn how to connect Charlie HR to ChatGPT using Truto's MCP server. A complete guide to exposing leave, salaries, and employee directories to AI agents."
tldr: "Connect Charlie to ChatGPT via Truto's MCP server. This guide covers how to architect the integration, handle Charlie's specific API quirks, configure MCP tools, and execute real-world HR workflows directly from ChatGPT."
canonical: https://truto.one/blog/connect-charlie-to-chatgpt-manage-leave-salaries-and-offices/
---

# Connect Charlie to ChatGPT: Manage Leave, Salaries, and Offices


Integrating your human resources information system directly into chat interfaces changes how your operations teams handle daily requests. By leveraging Truto's SuperAI [Model Context Protocol (MCP) Server](https://truto.one/what-is-mcp-model-context-protocol-the-2026-guide-for-saas-pms/), you can safely expose Charlie's employee directories, leave balances, and salary data directly to ChatGPT. 

This is part of a series on bringing HR data into AI environments. If your team uses Claude, check out our guide on [connecting Charlie to Claude](https://truto.one/connect-charlie-to-claude-sync-employee-profiles-and-bank-info/), or if you are building autonomous workflows, see our guide on [connecting Charlie to AI Agents](https://truto.one/connect-charlie-to-ai-agents-automate-hr-notes-and-team-data/).

This guide breaks down how to [architect the connection](https://truto.one/how-to-architect-a-multi-tenant-mcp-server-for-enterprise-b2b-saas/) between Charlie and ChatGPT, manage the specific nuances of the Charlie API, and enforce [strict security boundaries](https://truto.one/zero-data-retention-mcp-servers-building-soc-2-gdpr-compliant-ai-agents/) using Truto's dynamic MCP tool generation.

## The Engineering Reality: Charlie API Quirks

Building integrations with HR platforms involves navigating complex, time-bound data structures. Charlie is no exception. Before passing these endpoints to an LLM, you must understand the domain-specific quirks your agent will encounter:

1. **Leave Allowances are Period-Bound:** An employee's leave balance is not a single static integer. The Charlie API scopes allowances strictly by `period_start` and `period_end`. Your LLM will need to parse these dates to understand current versus future leave balances. 
2. **Salary Records are Historical Ledgers:** You don't simply read a flat "current salary" field. Charlie tracks compensation via a ledger of salaries tied to an `effective_date`. When pulling compensation, the LLM must evaluate the `effective_date` to determine the active pay rate, `pay_period`, and `pay_frequency`.
3. **Note Type Dependencies:** Writing an HR note requires passing a valid `team_member_note_type`. You cannot create notes arbitrarily; the agent must first query the allowed note types and their associated permission structures to ensure the note is visible to the correct management tier.

### Factual Note on Rate Limits

When querying these complex HR structures, rate limits are inevitable. Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream Charlie API returns an HTTP 429, Truto passes that error directly to the caller. 

To simplify handling, Truto normalizes the upstream rate limit information into standardized headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`) per the IETF spec. The caller (or the agent loop) is strictly responsible for implementing its own retry and backoff logic.

## Creating the Charlie MCP Server

Truto creates MCP tools dynamically from the integration's documented API schemas. Each server is scoped to a single authenticated Charlie account. You can provision this server via the Truto UI or programmatically via the API.

### 1. Via the Truto UI

1. Log into Truto and navigate to the integrated account page for your Charlie connection.
2. Click the **MCP Servers** tab.
3. Click **Create MCP Server**.
4. Configure your parameters (name, method filters, tags, expiration).
5. Copy the generated secure MCP server URL.

### 2. Via the API

For teams managing infrastructure as code or provisioning servers dynamically for individual users, use the REST API. The API validates the integration, generates a secure hashed token stored in an internal key-value layer, and returns the endpoint.

**Endpoint:** `POST /integrated-account/:id/mcp`

```json
{
  "name": "ChatGPT-Charlie-HR-Ops",
  "config": {
    "methods": ["read", "write"]
  },
  "expires_at": null
}
```

The response will contain the authenticated URL needed for ChatGPT:

```json
{
  "id": "charlie-mcp-8f92",
  "name": "ChatGPT-Charlie-HR-Ops",
  "config": { "methods": ["read", "write"] },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f67890"
}
```

## Connecting the MCP Server to ChatGPT

Once you have your Truto MCP URL, you can route it into ChatGPT. 

### The UI Connector Flow

For standard ChatGPT users running Pro, Plus, Enterprise, or Education tiers:

1. In ChatGPT, navigate to **Settings -> Apps -> Advanced settings**.
2. Enable **Developer mode**.
3. Under the MCP servers/Custom connectors section, click to add a new server.
4. Set the **Name** to "Charlie HR".
5. Paste the Truto MCP URL into the **Server URL** field.
6. Save and exit. ChatGPT will immediately initialize the JSON-RPC handshake and fetch the available tools.

### The Manual Config File Approach

For enterprise environments automating deployment across workstations, you can configure ChatGPT using a standard MCP config file (typically formatted as JSON, mirroring standard desktop client specifications):

```json
{
  "mcpServers": {
    "charlie-hr": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-http",
        "https://api.truto.one/mcp/a1b2c3d4e5f67890"
      ]
    }
  }
}
```
*Note: Replace the URL with your securely generated Truto endpoint.*

## Tool Inventory: Managing Charlie via ChatGPT

Truto maps Charlie's API endpoints into flat, schema-validated tools. Here are the core "Hero Tools" your operations team will use most frequently.

### Hero Tools

#### 1. list_all_charlie_team_members
Searches and retrieves the employee directory. Returns IDs, employment status, job titles, and manager mappings.
*Usage Note:* Always use this first to resolve an employee's string name into their Charlie `id`, as all downstream operations require the UUID.
> "Who is the manager for Jane Doe, and what is her current employment status?"

#### 2. list_all_charlie_team_member_leave_allowance
Retrieves the current leave allowance for a specific team member. Requires the member `id`. Returns total allowance, days used, and remaining days scoped by period.
*Usage Note:* The agent must check the `period_start` and `period_end` in the response to ensure it references the current operational year.
> "How many vacation days does John Smith have left this year?"

#### 3. get_single_charlie_leave_request_by_id
Retrieves granular details about a specific leave request. Returns the approver, status, request type, and the exact date range.
*Usage Note:* Crucial for investigating why a specific block of time was approved or rejected.
> "Pull up the details for leave request req_8923. Who approved it and for what dates?"

#### 4. list_all_charlie_team_member_salaries
Retrieves compensation history for a team member. Returns pay rate, frequency, currency, and the effective date of the current salary.
*Usage Note:* Because Charlie returns an array of historical records, prompt the LLM to sort by `effective_date` to find the active compensation.
> "What is Alice's current salary, and when was her last pay increase?"

#### 5. list_all_charlie_offices
Lists all office locations belonging to the authenticated company. Returns IDs, address details, timezones, and identifies the head office.
*Usage Note:* Useful for cross-referencing employee locations or managing regional holiday calendars.
> "List all of our registered office locations and their respective timezones."

#### 6. create_a_charlie_team_member_note
Creates a new internal HR note attached to an employee's profile. Requires the member `id`, note type, and the content.
*Usage Note:* This is a write operation. Ensure your MCP token permissions allow write access if you intend to enable automated note-taking.
> "Add a performance review note to David's profile stating he exceeded his Q3 targets."

For the complete tool inventory and full schema details, visit the [Charlie integration page](https://truto.one/integrations/detail/charlie).

## Workflows in Action

When these tools are passed to ChatGPT, the LLM autonomously orchestrates multi-step API sequences to satisfy human requests. Here are concrete examples of how this executes in reality.

### Scenario 1: Leave Approval & Balance Check

A manager wants to check an employee's balances before discussing an upcoming vacation request.

> "Check Sarah Connor's current leave balance, then look up her pending leave request to see if she has enough days to cover it."

**Execution Sequence:**
1.  **`list_all_charlie_team_members`**: The agent searches for "Sarah Connor" to retrieve her `id`.
2.  **`list_all_charlie_team_member_leave_allowance`**: Using the ID, the agent fetches her allowance and parses the `remaining_allowance_in_days` for the current period.
3.  **`list_all_charlie_team_member_leave_requests`**: The agent queries her requests, filters for `status: "pending"`, and calculates the length of the requested time off.

**Outcome:** ChatGPT outputs a summary stating Sarah has 14 days remaining, and her pending request is for 5 days, confirming she has sufficient balance.

### Scenario 2: Compensation Review Prep

HR operations needs a summary of a team's current salary landscape before compensation cycles.

> "Find all team members in the Engineering team and list their current salaries and when they were last updated."

**Execution Sequence:**
1.  **`list_all_charlie_teams`**: The agent identifies the `id` for the "Engineering" team.
2.  **`get_single_charlie_team_by_id`**: The agent fetches the list of user IDs within that team.
3.  **`list_all_charlie_team_member_salaries`** (Iterative): The agent loops through the user IDs, fetching the salary ledger for each. It parses the arrays to isolate the record with the most recent `effective_date`.

**Outcome:** ChatGPT compiles a structured markdown table mapping each engineer to their current compensation and the timestamp of their last raise, ignoring legacy salary data.

## Security and Access Control

Exposing human resources data to chat interfaces requires strict boundary enforcement. Truto MCP servers process these limitations at the token level, ensuring the LLM physically cannot access endpoints outside its scope.

*   **Method Filtering:** By defining `methods: ["read"]` during server creation, you strip out all `create`, `update`, and `delete` tools. The LLM cannot accidentally modify employee records.
*   **Tag Filtering:** You can restrict tools using `config.tags`. If you only want the agent handling time off, applying a `["leave"]` tag ensures salary and bank account tools are entirely omitted from the LLM's context window.
*   **Dual-Layer Authentication:** Enable `require_api_token_auth` to force the client to send a valid Truto session token alongside the URL. Possession of the URL alone becomes insufficient.
*   **Time-to-Live (TTL):** Use `expires_at` to provision temporary access. A server created with an expiry date is automatically purged by Truto's internal scheduling systems, removing both the database records and internal key-value cache entries exactly when requested.

:::cta{buttonText="Talk to us" buttonUrl="https://cal.com/truto/partner-with-truto"} 
Ready to bring enterprise HR data securely into your AI workflows? Partner with Truto to automate your integration roadmap.
:::
