mcpengine/servers/intercom/TOOLS_SUMMARY.md

156 lines
6.4 KiB
Markdown

# Intercom MCP Server - Tools Summary
**Total Tools: 71**
All tool files have been successfully created under `src/tools/` with proper Zod validation schemas and MCP tool definitions.
## Tool Files (12)
### 1. contacts.ts (10 tools)
- `intercom_list_contacts` - List all contacts with cursor pagination
- `intercom_get_contact` - Retrieve a specific contact by ID
- `intercom_create_contact` - Create a new contact (user or lead)
- `intercom_update_contact` - Update an existing contact
- `intercom_delete_contact` - Permanently delete a contact
- `intercom_search_contacts` - Search contacts using filters
- `intercom_scroll_contacts` - Scroll through all contacts (large datasets)
- `intercom_merge_contacts` - Merge one contact into another
- `intercom_archive_contact` - Archive a contact
- `intercom_unarchive_contact` - Unarchive a contact
### 2. conversations.ts (11 tools)
- `intercom_list_conversations` - List all conversations
- `intercom_get_conversation` - Retrieve a specific conversation with parts
- `intercom_create_conversation` - Create a new conversation
- `intercom_search_conversations` - Search conversations using filters
- `intercom_reply_conversation` - Reply with comment or note
- `intercom_assign_conversation` - Assign to admin or team
- `intercom_close_conversation` - Close a conversation
- `intercom_open_conversation` - Reopen a conversation
- `intercom_snooze_conversation` - Snooze until specific time
- `intercom_tag_conversation` - Add a tag to conversation
- `intercom_untag_conversation` - Remove a tag from conversation
### 3. companies.ts (7 tools)
- `intercom_list_companies` - List all companies
- `intercom_get_company` - Retrieve a specific company
- `intercom_create_company` - Create a new company
- `intercom_update_company` - Update an existing company
- `intercom_scroll_companies` - Scroll through all companies
- `intercom_attach_contact_to_company` - Link contact to company
- `intercom_detach_contact_from_company` - Unlink contact from company
### 4. articles.ts (5 tools)
- `intercom_list_articles` - List all help center articles
- `intercom_get_article` - Retrieve a specific article
- `intercom_create_article` - Create a new article
- `intercom_update_article` - Update an existing article
- `intercom_delete_article` - Permanently delete an article
### 5. help-center.ts (10 tools)
- `intercom_list_help_centers` - List all help centers
- `intercom_get_help_center` - Retrieve a specific help center
- `intercom_list_collections` - List all collections
- `intercom_get_collection` - Retrieve a specific collection
- `intercom_create_collection` - Create a new collection
- `intercom_update_collection` - Update an existing collection
- `intercom_delete_collection` - Delete a collection
- `intercom_list_sections` - List sections in a collection
- `intercom_get_section` - Retrieve a specific section
- `intercom_create_section` - Create a new section
### 6. tickets.ts (7 tools)
- `intercom_list_tickets` - List all tickets
- `intercom_get_ticket` - Retrieve a specific ticket
- `intercom_create_ticket` - Create a new ticket
- `intercom_update_ticket` - Update an existing ticket
- `intercom_search_tickets` - Search tickets using filters
- `intercom_list_ticket_types` - List available ticket types
- `intercom_get_ticket_type` - Retrieve ticket type with attributes
### 7. tags.ts (8 tools)
- `intercom_list_tags` - List all tags
- `intercom_get_tag` - Retrieve a specific tag
- `intercom_create_tag` - Create a new tag
- `intercom_delete_tag` - Delete a tag
- `intercom_tag_contact` - Apply tag to contact
- `intercom_untag_contact` - Remove tag from contact
- `intercom_tag_company` - Apply tag to company
- `intercom_untag_company` - Remove tag from company
### 8. segments.ts (2 tools)
- `intercom_list_segments` - List all segments
- `intercom_get_segment` - Retrieve a specific segment
### 9. events.ts (2 tools)
- `intercom_submit_event` - Submit a data event for a user
- `intercom_list_event_summaries` - List event summaries for user/company
### 10. messages.ts (4 tools)
- `intercom_send_message` - Send in-app, email, or push message
- `intercom_send_inapp_message` - Send in-app message (shortcut)
- `intercom_send_email_message` - Send email message (shortcut)
- `intercom_send_push_message` - Send push notification (shortcut)
### 11. teams.ts (2 tools)
- `intercom_list_teams` - List all teams
- `intercom_get_team` - Retrieve a specific team
### 12. admins.ts (3 tools)
- `intercom_list_admins` - List all admins
- `intercom_get_admin` - Retrieve a specific admin
- `intercom_set_admin_away` - Set admin away mode status
## Technical Details
### Architecture
- Each tool file exports `getTools(client: IntercomClient)` function
- Returns array of objects with `definition` (MCP Tool) and `handler` (async function)
- All inputs validated using Zod schemas
- Consistent naming: `intercom_verb_noun`
### Index File
`src/tools/index.ts` provides:
- `getAllTools(client)` - Returns all 71 tools with handlers
- `getToolDefinitions(client)` - Returns only MCP tool definitions
- `getToolHandler(client, toolName)` - Returns specific tool handler
### Intercom API Features Covered
- ✅ Contacts (list, get, create, update, delete, search, scroll, merge, archive)
- ✅ Conversations (list, get, create, search, reply, assign, close, open, tag)
- ✅ Companies (list, get, create, update, scroll, attach/detach contacts)
- ✅ Articles (list, get, create, update, delete)
- ✅ Help Center (collections, sections)
- ✅ Tickets (list, get, create, update, search, types)
- ✅ Tags (list, get, create, delete, tag/untag contacts and companies)
- ✅ Segments (list, get)
- ✅ Events (submit, list summaries)
- ✅ Messages (in-app, email, push)
- ✅ Teams (list, get)
- ✅ Admins (list, get, away mode)
### TypeScript Compilation
✅ All files pass `npx tsc --noEmit` with no errors
## Usage Example
```typescript
import { getAllTools } from './tools/index.js';
import { IntercomClient } from './clients/intercom.js';
const client = new IntercomClient({ accessToken: 'your-token' });
const tools = getAllTools(client);
// Register tools with MCP server
tools.forEach(({ definition, handler }) => {
server.registerTool(definition, handler);
});
```
## Next Steps
To integrate these tools into the main server:
1. Update `src/server.ts` to use `getAllTools()` from `./tools/index.js`
2. Replace the manual tool registration with the modular approach
3. Test each tool category with real Intercom API calls