# Polaria MCP

> Polaria MCP Server connects your AI agent directly to a unified customer support platform. It lets you manage user contacts, pull up full chat logs, track ticket statuses, and retrieve instant FAQ answers—all from one conversation flow. Instead of switching between Polaria, your CRM, and your knowledge base, your agent does it all automatically.

## Overview
- **Category:** communication-messaging
- **Price:** Free
- **Tags:** contact-management, conversational-ai, faq-automation, customer-service, natural-language-processing

## Description

This server plugs your AI agent directly into Polaria's entire customer support setup. Instead of making you jump between your chat window, your CRM, and your knowledge base, it lets your agent handle everything automatically. It’s all about keeping the conversation flowing without dropping context.

**Managing People Records**

Your agent handles every angle of the user profile. You can use `list_contacts` to pull up a comprehensive roster of everyone in the system, letting you see who's signed up. If you need details on one specific person, running `get_contact` pulls their full profile and all the background data. Don't have a record for a new customer? No sweat; your agent can use `create_contact` to add that brand-new user right into Polaria’s database.

**Tracking Conversations and History**

When someone chats with you, this server gives your agent total visibility. You'll use `list_conversations` to grab a quick summary of recent threads and check their current status at a glance. If the user needs you to dive deep into what was said, `get_conversation` pulls every single message and status update from that whole chat history so nothing gets missed. When it’s time for your agent to reply, running `add_chat_message` sends a response right into the existing Polaria thread. You're always replying in context.

**Finding Answers and System Details**

Your agent doesn't have to guess what answer to give. It can use `list_faqs` to list every available article in Polaria, giving your agent the data it needs to find a correct answer fast. You can also check out system capabilities by running `list_widgets`, which displays all the customizable widgets that are set up within the Polaria platform.

This setup lets your AI client do three things: **Get and Create Contacts** using `get_contact`, `create_contact`, and `list_contacts`; **Control Chat Flow** with tools like `get_conversation` and `add_chat_message`; and **Access Knowledge** by listing available articles via `list_faqs`. It’s a full-stack connection that keeps your agent working right where you need it to.

## Tools

### create_contact
Adds a brand-new customer record to your Polaria contact database.

### add_chat_message
Sends a message into an existing Polaria conversation thread.

### get_contact
Retrieves the full profile and details for one specific user or contact.

### get_conversation
Pulls all historical messages and status updates from a single chat conversation.

### list_contacts
Generates a list of multiple contacts, letting you see who's in the system.

### list_conversations
Retrieves a summary of recent chat threads and their current status.

### list_faqs
Lists all available FAQ articles in Polaria, helping your agent find the right answer quickly.

### list_widgets
Displays a list of customizable widgets available within the Polaria platform.

## Prompt Examples

**Prompt:** 
```
List all contacts in Polaria.
```

**Response:** 
```
You have 1,240 contacts in Polaria. Would you like me to filter them by a specific segment or recent activity?
```

**Prompt:** 
```
Show recent chat conversations.
```

**Response:** 
```
Here are the 3 most recent chat conversations: 1) Billing issue with John Doe (Open), 2) Refund request from Acme Corp (Pending), 3) Technical support for Sarah (Resolved).
```

**Prompt:** 
```
Add a reply message to conversation 'C123'.
```

**Response:** 
```
I've successfully added your reply to conversation 'C123' and marked the status as 'Waiting on Customer'.
```

## Capabilities

### Read Contact Details
Retrieves specific customer information by running `get_contact`.

### Manage Chat Messages
Adds a message to an ongoing chat thread using the `add_chat_message` tool.

### List All Contacts
Returns a list of all available customer records via `list_contacts`.

### Check Conversation History
Gathers details for an entire chat thread using the `get_conversation` tool, letting you see the full context.

### Search Knowledge Base
Pulls a list of available FAQ articles with `list_faqs`, allowing your agent to find answers immediately.

### Create New Users
Adds new customer records into Polaria using the `create_contact` tool.

## Use Cases

### Client calls with vague issues
A user chats in saying 'my account isn't working.' The agent doesn't know where to start. It first runs `list_conversations` to see the last chat topic, then uses `get_contact` to pull up their account details and history. Finally, it runs `list_faqs` to find a guide on 'Account Access Issues', delivering an immediate solution.

### Handling new leads
A lead fills out a form via chat. The agent uses `get_contact` first to check if the person exists, and if not, it calls `create_contact`. It then sends a personalized welcome message using `add_chat_message`, turning a raw inquiry into an organized record.

### Reviewing complex tickets
An agent needs to understand why John Doe called three weeks ago. They use `get_conversation` on the ticket ID, reviewing all past messages and status changes. This gives them full context before they reply, preventing repeated troubleshooting steps.

### Bulk customer outreach
The CS team needs to follow up with 50 users who had 'Billing Issue' tickets. They call `list_contacts` to filter by the required attributes and then use those details to trigger specific, personalized messages via the agent.

## Benefits

- **Full Context on Demand:** Instead of reading through multiple tabs, your agent runs `get_conversation` to pull up the entire chat history instantly. This keeps you focused on solving the problem, not finding the data.
- **Centralized Data:** Use `list_contacts` and `get_contact` to manage all customer records inside the agent workflow. You never have to leave the conversation view to check a user's status or details.
- **Instant Knowledge Lookup:** The ability to call `list_faqs` means your agent pulls verified help articles directly into the chat, resolving inquiries without needing a human handover to the knowledge base team.
- **Automated Status Updates:** Your workflow can automatically update ticket statuses and log messages using tools like `add_chat_message`, making sure nothing falls through the cracks after an interaction.
- **On-the-Fly User Creation:** Need to talk to a new client? Use `create_contact` within your agent's logic. It captures all necessary details immediately, ensuring no lead is missed.

## How It Works

The bottom line is: your AI agent talks to Polaria's API through Vinkius, letting it perform real actions like updating status or fetching contact details.

1. Log in to your Polaria dashboard and create a new application under Settings > Marketplace. This gives you the necessary Secret Key.
2. Connect your AI client using Vinkius, passing it the Polaria credentials. Your agent now has access to all defined tools.
3. Your AI client calls the tool (e.g., `get_contact`). The server executes the action against Polaria and sends back a structured JSON payload with the data.

## Frequently Asked Questions

**How do I check a user's history with Polaria MCP Server?**
You use `get_conversation`. This tool pulls all messages, statuses, and context from a specific chat thread. It gives your agent the full background needed to respond accurately.

**Can I add new contacts using the Polaria MCP Server?**
Yep, you use `create_contact`. This tool takes necessary data fields and adds a brand-new record directly into your main customer database within Polaria.

**What is the difference between `list_contacts` and `get_contact`?**
`list_contacts` gives you a roster—it shows multiple contacts. Use it when you need to review several users. `get_contact` drills down, giving you all the specific data for one single user.

**Does Polaria MCP Server handle ticket status updates?**
Yes, by managing conversations and contacts, your agent can update statuses internally. You manage this capability via structured actions after gathering data with `list_conversations`.

**Are there rate limits when using the `list_conversations` tool?**
Yes, Polaria enforces API call rates to maintain stability. We recommend batching your requests and implementing exponential backoff if you hit a limit. Typically, the system allows 100 calls per minute for standard usage.

**What should I do if `add_chat_message` fails?**
Check the error code returned by the tool first; this tells you exactly what went wrong. Common issues include an invalid conversation ID or insufficient permissions on your connected account. Double-check all required parameters.

**How can I filter results when using `list_faqs`?**
You must pass specific filters to the `list_faqs` function, such as a keyword or category ID. The tool returns structured data that allows you to narrow down results by content type or date last updated.

**What parameters are required when I call `get_contact`?**
The `get_contact` tool absolutely requires a unique contact ID (CID) and optionally an API key for authentication. Providing the CID ensures the agent retrieves one specific record instead of listing all users.

**Where do I find my Secret Key?**
Log in to Polaria, go to Settings > Marketplace > Create my own app, create a new application, and show the 'Secret Key' in the authorized applications section.

**What is the Base URL for the API?**
The Polaria REST API v2 base URL is: https://polaria.ai/rest/v2/

**Can I modify existing conversations?**
Yes, you can add replies and change the status of existing conversations directly using the Polaria MCP.