@iriseller/mcp-server
Version:
Model Context Protocol (MCP) server providing access to IRISeller's AI sales intelligence platform with 7 AI agents, multi-CRM integration, advanced sales workflows, email automation, Rosa demo functionality with action scoring, DNC compliance checking, G
745 lines (744 loc) • 28.3 kB
JavaScript
import { EMAIL_TOOLS } from './email-tools.js';
// Tier 1: Core CRM Tools
export const LEAD_QUALIFICATION_TOOL = {
name: 'qualify_lead',
description: 'Analyze and qualify leads using IRISeller\'s BANT framework with AI-powered insights',
inputSchema: {
type: 'object',
properties: {
contact_name: {
type: 'string',
description: 'Full name of the contact person'
},
company_name: {
type: 'string',
description: 'Name of the company or organization'
},
title: {
type: 'string',
description: 'Job title or position of the contact'
},
industry: {
type: 'string',
description: 'Industry sector of the company'
},
email: {
type: 'string',
description: 'Email address of the contact'
},
phone: {
type: 'string',
description: 'Phone number of the contact'
},
additional_context: {
type: 'string',
description: 'Any additional context or notes about the lead'
}
},
required: ['contact_name', 'company_name']
}
};
export const CRM_QUERY_TOOL = {
name: 'query_crm',
description: 'Search and retrieve data from multiple CRM systems (Salesforce, Dynamics, Oracle)',
inputSchema: {
type: 'object',
properties: {
entity_type: {
type: 'string',
enum: ['leads', 'opportunities', 'contacts', 'accounts'],
description: 'Type of CRM entity to query'
},
filters: {
type: 'object',
description: 'Filters to apply to the query (e.g., status, industry, date range, email, name)',
properties: {
status: { type: 'string' },
industry: { type: 'string' },
owner: { type: 'string' },
created_date: { type: 'string' },
amount_min: { type: 'number' },
amount_max: { type: 'number' },
email: { type: 'string', description: 'Filter by contact email address' },
firstName: { type: 'string', description: 'Filter by contact first name' },
lastName: { type: 'string', description: 'Filter by contact last name' },
phone: { type: 'string', description: 'Filter by contact phone number' },
title: { type: 'string', description: 'Filter by contact job title' },
accountId: { type: 'string', description: 'Filter by associated account ID' }
}
},
limit: {
type: 'number',
minimum: 1,
maximum: 100,
default: 10,
description: 'Maximum number of records to return'
},
offset: {
type: 'number',
minimum: 0,
default: 0,
description: 'Number of records to skip for pagination'
},
sort_by: {
type: 'string',
description: 'Field to sort by (e.g., annual_revenue, created_date, amount, name). For leads queries, defaults to annual_revenue for value-based ranking.'
},
sort_order: {
type: 'string',
enum: ['asc', 'desc'],
default: 'desc',
description: 'Sort order'
}
},
required: ['entity_type']
}
};
export const COMPANY_RESEARCH_TOOL = {
name: 'research_company',
description: 'Perform comprehensive company research using AI agents and multiple data sources',
inputSchema: {
type: 'object',
properties: {
company_name: {
type: 'string',
description: 'Name of the company to research'
},
industry: {
type: 'string',
description: 'Industry sector (helps with targeted research)'
},
research_depth: {
type: 'string',
enum: ['basic', 'comprehensive', 'competitive'],
default: 'basic',
description: 'Depth of research to perform'
},
include_competitors: {
type: 'boolean',
default: false,
description: 'Include competitive analysis'
},
include_news: {
type: 'boolean',
default: true,
description: 'Include recent news and developments'
},
include_financials: {
type: 'boolean',
default: false,
description: 'Include financial information if available'
}
},
required: ['company_name']
}
};
// Tier 2: AI Agent Orchestration Tools
export const EXECUTE_AGENT_TOOL = {
name: 'execute_agent',
description: 'Execute individual AI agents for specific sales tasks',
inputSchema: {
type: 'object',
properties: {
agent_name: {
type: 'string',
enum: ['rosa_sdr', 'prospecting', 'personalization', 'sequence', 'social_selling', 'nurturing', 'objection_handling'],
description: 'Name of the agent to execute'
},
input_data: {
type: 'object',
description: 'Input data for the agent (varies by agent type)'
},
options: {
type: 'object',
properties: {
timeout: {
type: 'number',
description: 'Timeout in seconds (default: 60)'
},
priority: {
type: 'string',
enum: ['low', 'medium', 'high'],
description: 'Execution priority'
},
include_research: {
type: 'boolean',
description: 'Include additional research in the execution'
}
}
}
},
required: ['agent_name', 'input_data']
}
};
export const EXECUTE_WORKFLOW_TOOL = {
name: 'execute_workflow',
description: 'Execute multi-agent workflows for complete sales processes',
inputSchema: {
type: 'object',
properties: {
workflow_type: {
type: 'string',
enum: [
'full_sdr_workflow',
'account_based_prospecting',
'lead_qualification_enhancement',
'outreach_sequence_creation',
'social_selling_campaign',
'lead_nurturing_setup'
],
description: 'Type of workflow to execute'
},
input_data: {
type: 'object',
description: 'Input data for the workflow. For lead_qualification_enhancement: {criteria: "BANT", source: "manual_request", bulk_operation: true, contact_name?: string, company_name?: string, title?: string, industry?: string, email?: string, phone?: string, additional_context?: string}. For other workflows: {prospect_data: {}, company_data: {}}',
properties: {
criteria: {
type: 'string',
description: 'Qualification criteria for lead_qualification_enhancement workflow (e.g., "BANT", "MEDDIC")'
},
source: {
type: 'string',
description: 'Source of the qualification request for lead_qualification_enhancement workflow'
},
bulk_operation: {
type: 'boolean',
description: 'Whether this is a bulk operation for lead_qualification_enhancement workflow'
},
contact_name: {
type: 'string',
description: 'Contact name for lead qualification workflows'
},
company_name: {
type: 'string',
description: 'Company name for lead qualification workflows'
},
title: {
type: 'string',
description: 'Contact title for lead qualification workflows'
},
industry: {
type: 'string',
description: 'Industry for lead qualification workflows'
},
email: {
type: 'string',
description: 'Contact email for lead qualification workflows'
},
phone: {
type: 'string',
description: 'Contact phone for lead qualification workflows'
},
additional_context: {
type: 'string',
description: 'Additional context for lead qualification workflows'
},
prospect_data: {
type: 'object',
description: 'Prospect data for other workflow types'
},
company_data: {
type: 'object',
description: 'Company data for other workflow types'
}
}
},
agents_to_include: {
type: 'array',
items: { type: 'string' },
description: 'Specific agents to include in the workflow (optional)'
},
options: {
type: 'object',
properties: {
timeout: {
type: 'number',
description: 'Workflow timeout in seconds'
},
priority: {
type: 'string',
enum: ['low', 'medium', 'high'],
description: 'Workflow priority'
}
}
}
},
required: ['workflow_type', 'input_data']
}
};
export const PERSONALIZE_OUTREACH_TOOL = {
name: 'personalize_outreach',
description: 'Generate personalized outreach messages using AI personalization agent',
inputSchema: {
type: 'object',
properties: {
prospect_data: {
type: 'object',
properties: {
name: { type: 'string' },
company: { type: 'string' },
title: { type: 'string' },
industry: { type: 'string' },
email: { type: 'string' },
linkedin_url: { type: 'string' }
},
required: ['name', 'company'],
description: 'Information about the prospect'
},
message_type: {
type: 'string',
enum: ['email', 'linkedin', 'phone_script', 'sequence'],
description: 'Type of message to create'
},
tone: {
type: 'string',
enum: ['professional', 'casual', 'consultative', 'friendly'],
default: 'professional',
description: 'Tone of the message'
},
objectives: {
type: 'array',
items: { type: 'string' },
description: 'Objectives for the outreach (e.g., "schedule demo", "gather requirements")'
},
context: {
type: 'string',
description: 'Additional context or specific points to include'
}
},
required: ['prospect_data', 'message_type']
}
};
// Tier 3: Advanced Intelligence Tools
export const SALES_FORECAST_TOOL = {
name: 'forecast_sales',
description: 'Generate sales forecasts and pipeline analysis using IRISeller analytics',
inputSchema: {
type: 'object',
properties: {
time_period: {
type: 'string',
default: '90d',
description: 'Forecast time period - supports relative periods (30d, 90d, quarter, quarterly, annual), specific quarters (Q1, Q2, Q3, Q4), or quarters with year (Q1 2024, Q2 2025, etc.)',
pattern: '^(30d|90d|quarter|quarterly|annual|Q[1-4]|Q[1-4] \\d{4}|FY \\d{4}|FY\\d{2})$'
},
include_scenarios: {
type: 'boolean',
default: true,
description: 'Include best/worst case scenarios'
},
filters: {
type: 'object',
description: 'Filters to apply (e.g., sales rep, product, region)',
properties: {
sales_rep: { type: 'string' },
product: { type: 'string' },
region: { type: 'string' },
industry: { type: 'string' }
}
}
}
}
};
export const LIST_AGENTS_TOOL = {
name: 'list_agents',
description: 'Get list of available AI agents and their capabilities',
inputSchema: {
type: 'object',
properties: {
include_status: {
type: 'boolean',
default: true,
description: 'Include agent status and health information'
}
}
}
};
export const LIST_WORKFLOWS_TOOL = {
name: 'list_workflows',
description: 'Get list of available workflows and their descriptions',
inputSchema: {
type: 'object',
properties: {
include_details: {
type: 'boolean',
default: true,
description: 'Include detailed workflow information'
}
}
}
};
export const HEALTH_CHECK_TOOL = {
name: 'health_check',
description: 'Check the health status of IRISeller services and agents',
inputSchema: {
type: 'object',
properties: {
detailed: {
type: 'boolean',
default: false,
description: 'Include detailed health information'
}
}
}
};
export const WEB_SEARCH_TOOL = {
name: 'web_search',
description: 'Search the web for real-time information using Claude\'s native web search capability. Provides comprehensive search results with AI-generated summaries and citations.',
inputSchema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'The search query to execute'
},
max_uses: {
type: 'number',
description: 'Maximum number of web search operations to perform (1-5)',
minimum: 1,
maximum: 5,
default: 3
},
allowed_domains: {
type: 'array',
items: {
type: 'string'
},
description: 'Optional list of domains to restrict search to (e.g., ["nature.com", "arxiv.org"])'
},
blocked_domains: {
type: 'array',
items: {
type: 'string'
},
description: 'Optional list of domains to exclude from search results'
},
user_location: {
type: 'object',
properties: {
type: {
type: 'string',
enum: ['approximate'],
default: 'approximate'
},
city: {
type: 'string',
description: 'City name for location-based search results'
},
region: {
type: 'string',
description: 'State or region name'
},
country: {
type: 'string',
description: 'Country code (e.g., "US", "CA", "GB")'
},
timezone: {
type: 'string',
description: 'IANA timezone identifier (e.g., "America/New_York")'
}
},
description: 'Optional user location for localized search results'
}
},
required: ['query']
}
};
export const STOCK_DATA_TOOL = {
name: 'get_stock_data',
description: 'Fetch real-time stock data using web search from financial sources like Yahoo Finance, Bloomberg, and MarketWatch. Provides current price, change, market cap, and recent price history.',
inputSchema: {
type: 'object',
properties: {
symbol: {
type: 'string',
description: 'Stock ticker symbol (e.g., "MSFT", "AAPL", "TSLA")'
},
company_name: {
type: 'string',
description: 'Company name for symbol resolution (e.g., "Microsoft", "Apple")'
},
include_history: {
type: 'boolean',
description: 'Whether to include price history data',
default: true
},
history_period: {
type: 'string',
enum: ['1d', '5d', '1m', '3m', '6m', '1y'],
description: 'Period for price history data',
default: '3m'
}
},
required: ['symbol']
}
};
export const ROSA_DAILY_BRIEFING_TOOL = {
name: 'rosa_daily_briefing',
description: 'Generate Rosa-style daily briefing with top leads by action score, upcoming meetings from CRM, and priority tasks - uses existing CRM fields creatively',
inputSchema: {
type: 'object',
properties: {
top_leads_count: {
type: 'number',
minimum: 3,
maximum: 10,
default: 5,
description: 'Number of top leads to include in briefing'
},
include_meetings: {
type: 'boolean',
default: true,
description: 'Include upcoming meetings extracted from NextStep fields'
},
include_tasks: {
type: 'boolean',
default: true,
description: 'Include priority tasks extracted from Description/NextStep fields'
},
greeting_style: {
type: 'string',
enum: ['formal', 'casual', 'rosa'],
default: 'rosa',
description: 'Style of greeting and briefing format'
}
}
}
};
export const GOOGLE_MAPS_LOOKUP_TOOL = {
name: 'get_maps_location',
description: 'Generate Google Maps links and location information using existing CRM address data - no external API required',
inputSchema: {
type: 'object',
properties: {
person_name: {
type: 'string',
description: 'Name of the person to lookup address for'
},
company_name: {
type: 'string',
description: 'Company name to lookup address for'
},
address: {
type: 'string',
description: 'Direct address string to generate maps links for (if known)'
},
map_type: {
type: 'string',
enum: ['standard', 'satellite', 'terrain', 'streetview'],
default: 'standard',
description: 'Type of Google Maps view to generate'
},
include_directions: {
type: 'boolean',
default: false,
description: 'Include driving directions link'
},
from_address: {
type: 'string',
description: 'Starting address for directions (if include_directions is true)'
}
}
}
};
export const DNC_COMPLIANCE_CHECK_TOOL = {
name: 'check_dnc_compliance',
description: 'Check Do Not Call (DNC) compliance using the Fax field as Y/N flag - simple and effective DNC checking',
inputSchema: {
type: 'object',
properties: {
person_name: {
type: 'string',
description: 'Name of the person to check DNC status for'
},
company_name: {
type: 'string',
description: 'Company name to check DNC status for'
},
phone_number: {
type: 'string',
description: 'Phone number to check DNC status for'
},
email: {
type: 'string',
description: 'Email address to check DNC status for'
},
contact_method: {
type: 'string',
enum: ['phone', 'email', 'text', 'all'],
default: 'phone',
description: 'Type of contact method to check compliance for'
}
}
}
};
export const MEETING_PREP_TOOL = {
name: 'prepare_meeting',
description: 'Generate comprehensive meeting preparation notes by combining CRM data, web research, and AI analysis for optimal meeting outcomes',
inputSchema: {
type: 'object',
properties: {
person_name: {
type: 'string',
description: 'Full name of the person you are meeting with'
},
company_name: {
type: 'string',
description: 'Company name (optional, helps with CRM lookup and research accuracy)'
},
meeting_context: {
type: 'string',
description: 'Context or purpose of the meeting (e.g., "sales call", "partnership discussion", "demo", "follow-up")',
default: 'business meeting'
},
research_depth: {
type: 'string',
enum: ['basic', 'comprehensive', 'deep'],
description: 'Level of research depth - basic (CRM only), comprehensive (CRM + web), deep (CRM + extensive web + social)',
default: 'comprehensive'
},
include_company_analysis: {
type: 'boolean',
description: 'Include detailed company analysis and recent developments',
default: true
},
focus_areas: {
type: 'array',
items: {
type: 'string'
},
description: 'Specific areas to focus research on (e.g., "competitors", "recent funding", "leadership changes")'
}
},
required: ['person_name']
}
};
export const PRIORITY_TASKS_TOOL = {
name: 'priority_tasks',
description: 'Retrieve and analyze priority tasks from CRM data with intelligent filtering and scoring',
inputSchema: {
type: 'object',
properties: {
task_types: {
type: 'array',
items: {
type: 'string',
enum: ['calls', 'emails', 'meetings', 'follow_ups', 'demos', 'proposals', 'research']
},
description: 'Types of tasks to include in the analysis',
default: ['calls', 'emails', 'meetings', 'follow_ups']
},
priority_level: {
type: 'string',
enum: ['high', 'medium', 'low', 'all'],
description: 'Priority level filter for tasks',
default: 'all'
},
limit: {
type: 'number',
minimum: 1,
maximum: 50,
default: 10,
description: 'Maximum number of priority tasks to return'
},
time_frame: {
type: 'string',
enum: ['today', 'tomorrow', 'this_week', 'next_week', 'this_month', 'all'],
description: 'Time frame filter for tasks',
default: 'all'
},
sort_by: {
type: 'string',
enum: ['priority', 'due_date', 'action_score', 'created_date'],
description: 'Field to sort tasks by',
default: 'action_score'
}
}
}
};
export const GET_AGENT_RESULTS_TOOL = {
name: 'get_agent_results',
description: 'Retrieve results from a completed or running agent execution by execution ID',
inputSchema: {
type: 'object',
properties: {
execution_id: {
type: 'string',
description: 'The execution ID returned from execute_agent'
},
wait_for_completion: {
type: 'boolean',
description: 'Whether to wait for completion if the execution is still running',
default: false
},
timeout_seconds: {
type: 'number',
description: 'Maximum time to wait for completion (only used if wait_for_completion is true)',
default: 30,
minimum: 5,
maximum: 300
}
},
required: ['execution_id']
}
};
export const WAIT_FOR_AGENT_COMPLETION_TOOL = {
name: 'wait_for_agent_completion',
description: 'Wait for an agent execution to complete and return the final results. This is the recommended way to get results from long-running agents.',
inputSchema: {
type: 'object',
properties: {
execution_id: {
type: 'string',
description: 'The execution ID returned from execute_agent'
},
timeout_seconds: {
type: 'number',
description: 'Maximum time to wait for completion',
default: 120,
minimum: 10,
maximum: 600
},
check_interval_seconds: {
type: 'number',
description: 'How often to check for completion (in seconds)',
default: 5,
minimum: 2,
maximum: 30
}
},
required: ['execution_id']
}
};
// Export all tools as an array
export const ALL_TOOLS = [
// Tier 1: Core CRM Tools
LEAD_QUALIFICATION_TOOL,
CRM_QUERY_TOOL,
COMPANY_RESEARCH_TOOL,
// Tier 2: AI Agent Tools
EXECUTE_AGENT_TOOL,
EXECUTE_WORKFLOW_TOOL,
PERSONALIZE_OUTREACH_TOOL,
GET_AGENT_RESULTS_TOOL,
WAIT_FOR_AGENT_COMPLETION_TOOL,
// Tier 3: Advanced Tools
SALES_FORECAST_TOOL,
LIST_AGENTS_TOOL,
LIST_WORKFLOWS_TOOL,
HEALTH_CHECK_TOOL,
WEB_SEARCH_TOOL,
STOCK_DATA_TOOL,
GOOGLE_MAPS_LOOKUP_TOOL,
DNC_COMPLIANCE_CHECK_TOOL,
ROSA_DAILY_BRIEFING_TOOL,
MEETING_PREP_TOOL,
PRIORITY_TASKS_TOOL,
// Tier 4: Email Integration Tools
...EMAIL_TOOLS
];
// Export tools by category for easier organization
export const CORE_TOOLS = [LEAD_QUALIFICATION_TOOL, CRM_QUERY_TOOL, COMPANY_RESEARCH_TOOL];
export const AGENT_TOOLS = [EXECUTE_AGENT_TOOL, EXECUTE_WORKFLOW_TOOL, PERSONALIZE_OUTREACH_TOOL];
export const ANALYTICS_TOOLS = [SALES_FORECAST_TOOL];
export const UTILITY_TOOLS = [LIST_AGENTS_TOOL, LIST_WORKFLOWS_TOOL, HEALTH_CHECK_TOOL];