File size: 17,945 Bytes
8bab08d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
"""
MCP Tool Definitions for AI Agent Tool Calling
This module defines all MCP servers as tools that an LLM can call autonomously.
Following the Model Context Protocol (MCP) specification.
"""
from typing import List, Dict, Any
# MCP Tool Definitions (OpenAI function calling format, compatible with Claude/Anthropic)
MCP_TOOLS: List[Dict[str, Any]] = [
# ============ SEARCH MCP SERVER ============
{
"name": "search_web",
"description": "Search the web for information about companies, news, technologies, or any topic. Use this to gather real-time information about prospects, competitors, or industry trends.",
"input_schema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The search query. Be specific and include company names, topics, or keywords."
},
"max_results": {
"type": "integer",
"description": "Maximum number of results to return (default: 5)",
"default": 5
}
},
"required": ["query"]
}
},
{
"name": "search_news",
"description": "Search for recent news articles about companies, industries, or topics. Use this to find timely information, company announcements, or industry developments.",
"input_schema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The news search query"
},
"max_results": {
"type": "integer",
"description": "Maximum number of news results (default: 5)",
"default": 5
}
},
"required": ["query"]
}
},
# ============ STORE MCP SERVER ============
{
"name": "save_prospect",
"description": "Save or update a prospect (potential customer) in the database. Use this to store information about companies you're targeting for outreach.",
"input_schema": {
"type": "object",
"properties": {
"prospect_id": {
"type": "string",
"description": "Unique identifier for the prospect"
},
"company_id": {
"type": "string",
"description": "Associated company ID"
},
"company_name": {
"type": "string",
"description": "Company name"
},
"company_domain": {
"type": "string",
"description": "Company website domain (e.g., 'shopify.com')"
},
"fit_score": {
"type": "number",
"description": "Fit score (0-100) indicating how well this prospect matches the ideal customer profile"
},
"status": {
"type": "string",
"description": "Status: 'new', 'contacted', 'engaged', 'qualified', 'converted', 'lost'",
"enum": ["new", "contacted", "engaged", "qualified", "converted", "lost"]
},
"metadata": {
"type": "object",
"description": "Additional metadata about the prospect"
}
},
"required": ["prospect_id", "company_id", "company_name", "company_domain"]
}
},
{
"name": "get_prospect",
"description": "Retrieve a prospect's information from the database by ID.",
"input_schema": {
"type": "object",
"properties": {
"prospect_id": {
"type": "string",
"description": "The unique identifier of the prospect to retrieve"
}
},
"required": ["prospect_id"]
}
},
{
"name": "list_prospects",
"description": "List all prospects in the database. Use this to see what prospects you have and their statuses.",
"input_schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Filter by status (optional)",
"enum": ["new", "contacted", "engaged", "qualified", "converted", "lost"]
}
},
"required": []
}
},
{
"name": "save_company",
"description": "Save or update company information in the database.",
"input_schema": {
"type": "object",
"properties": {
"company_id": {
"type": "string",
"description": "Unique identifier for the company"
},
"name": {
"type": "string",
"description": "Company name"
},
"domain": {
"type": "string",
"description": "Company website domain"
},
"industry": {
"type": "string",
"description": "Industry/sector"
},
"description": {
"type": "string",
"description": "Company description"
},
"employee_count": {
"type": "integer",
"description": "Number of employees"
}
},
"required": ["company_id", "name", "domain"]
}
},
{
"name": "get_company",
"description": "Retrieve company information from the database by ID.",
"input_schema": {
"type": "object",
"properties": {
"company_id": {
"type": "string",
"description": "The unique identifier of the company"
}
},
"required": ["company_id"]
}
},
{
"name": "save_fact",
"description": "Save a fact or insight about a company. Use this to store enrichment data like news, funding info, tech stack, pain points, etc.",
"input_schema": {
"type": "object",
"properties": {
"fact_id": {
"type": "string",
"description": "Unique identifier for the fact"
},
"company_id": {
"type": "string",
"description": "Associated company ID"
},
"fact_type": {
"type": "string",
"description": "Type of fact: 'news', 'funding', 'hiring', 'tech_stack', 'pain_point', etc."
},
"content": {
"type": "string",
"description": "The fact content/description"
},
"source_url": {
"type": "string",
"description": "Source URL where this fact was found"
},
"confidence_score": {
"type": "number",
"description": "Confidence score (0-1) for this fact"
}
},
"required": ["fact_id", "company_id", "fact_type", "content"]
}
},
{
"name": "discover_prospects_with_contacts",
"description": "Find prospect companies WITH verified decision-maker contacts. This tool searches for companies, finds their contacts, and ONLY saves prospects that have real verified contacts. It keeps searching until the target number of valid prospects is found. Use this as your PRIMARY tool for prospect discovery.",
"input_schema": {
"type": "object",
"properties": {
"client_company": {
"type": "string",
"description": "Your client company name (who you're finding prospects for)"
},
"client_industry": {
"type": "string",
"description": "Brief description of what the client does and their target market"
},
"target_prospects": {
"type": "integer",
"description": "Number of prospects WITH contacts to find (default: 3)",
"default": 3
},
"target_titles": {
"type": "array",
"items": {"type": "string"},
"description": "Job titles to search for (default: ['CEO', 'Founder', 'VP Sales', 'CTO'])"
}
},
"required": ["client_company", "client_industry"]
}
},
{
"name": "find_verified_contacts",
"description": "Find REAL verified decision-makers at a specific company. Searches LinkedIn, company websites, directories, press releases, and social media. Only returns contacts with verified email addresses found on the web.",
"input_schema": {
"type": "object",
"properties": {
"company_name": {
"type": "string",
"description": "The company name to find contacts for"
},
"company_domain": {
"type": "string",
"description": "The company website domain (e.g., 'acme.com')"
},
"target_titles": {
"type": "array",
"items": {"type": "string"},
"description": "List of job titles to search for (e.g., ['CEO', 'VP Sales', 'CTO'])"
},
"max_contacts": {
"type": "integer",
"description": "Maximum number of contacts to find (default: 3)",
"default": 3
}
},
"required": ["company_name", "company_domain"]
}
},
{
"name": "save_contact",
"description": "Save a contact person that was found by find_verified_contacts. Only use this for contacts returned by find_verified_contacts - NEVER make up contact information.",
"input_schema": {
"type": "object",
"properties": {
"contact_id": {
"type": "string",
"description": "Unique identifier for the contact"
},
"company_id": {
"type": "string",
"description": "Associated company ID"
},
"email": {
"type": "string",
"description": "Contact email address"
},
"first_name": {
"type": "string",
"description": "First name"
},
"last_name": {
"type": "string",
"description": "Last name"
},
"title": {
"type": "string",
"description": "Job title"
},
"seniority": {
"type": "string",
"description": "Seniority level: 'IC', 'Manager', 'Director', 'VP', 'C-Level'"
}
},
"required": ["contact_id", "company_id", "email"]
}
},
{
"name": "list_contacts_by_domain",
"description": "List all contacts for a specific company domain.",
"input_schema": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"description": "Company domain (e.g., 'shopify.com')"
}
},
"required": ["domain"]
}
},
{
"name": "check_suppression",
"description": "Check if an email or domain is on the suppression list (opt-outs, bounces, complaints). Use this before sending emails for compliance.",
"input_schema": {
"type": "object",
"properties": {
"suppression_type": {
"type": "string",
"description": "Type: 'email', 'domain'",
"enum": ["email", "domain"]
},
"value": {
"type": "string",
"description": "The email address or domain to check"
}
},
"required": ["suppression_type", "value"]
}
},
# ============ EMAIL MCP SERVER ============
{
"name": "send_email",
"description": "Send an email to a prospect. Use this to initiate outreach or follow-up with prospects.",
"input_schema": {
"type": "object",
"properties": {
"to": {
"type": "string",
"description": "Recipient email address"
},
"subject": {
"type": "string",
"description": "Email subject line"
},
"body": {
"type": "string",
"description": "Email body content (can be HTML or plain text)"
},
"prospect_id": {
"type": "string",
"description": "Associated prospect ID for thread tracking"
}
},
"required": ["to", "subject", "body", "prospect_id"]
}
},
{
"name": "get_email_thread",
"description": "Retrieve the email conversation thread for a prospect.",
"input_schema": {
"type": "object",
"properties": {
"prospect_id": {
"type": "string",
"description": "Prospect ID to get the email thread for"
}
},
"required": ["prospect_id"]
}
},
# ============ CALENDAR MCP SERVER ============
{
"name": "suggest_meeting_slots",
"description": "Generate available meeting time slots for scheduling a call with a prospect.",
"input_schema": {
"type": "object",
"properties": {
"num_slots": {
"type": "integer",
"description": "Number of time slots to suggest (default: 3)",
"default": 3
}
},
"required": []
}
},
{
"name": "generate_calendar_invite",
"description": "Generate an .ics calendar file for a meeting slot.",
"input_schema": {
"type": "object",
"properties": {
"start_time": {
"type": "string",
"description": "Meeting start time (ISO format)"
},
"end_time": {
"type": "string",
"description": "Meeting end time (ISO format)"
},
"title": {
"type": "string",
"description": "Meeting title"
}
},
"required": ["start_time", "end_time", "title"]
}
},
]
# MCP Resources (data that can be read by the AI)
MCP_RESOURCES = [
{
"uri": "store://prospects",
"name": "Prospects Database",
"description": "List of all prospects (potential customers) with their status and scores",
"mime_type": "application/json"
},
{
"uri": "store://companies",
"name": "Companies Database",
"description": "List of all companies with their information",
"mime_type": "application/json"
},
{
"uri": "store://contacts",
"name": "Contacts Database",
"description": "List of all contacts (decision-makers) at companies",
"mime_type": "application/json"
}
]
# MCP Prompts (pre-defined prompts the AI can use)
MCP_PROMPTS = [
{
"name": "cold_outreach_email",
"description": "Generate a cold outreach email for B2B sales",
"arguments": [
{
"name": "company_name",
"description": "Name of the target company",
"required": True
},
{
"name": "pain_points",
"description": "Known pain points or challenges of the company",
"required": False
},
{
"name": "contact_name",
"description": "Name of the contact person",
"required": False
}
]
},
{
"name": "company_research",
"description": "Research a company to identify if they're a good fit for outreach",
"arguments": [
{
"name": "company_name",
"description": "Name of the company to research",
"required": True
},
{
"name": "company_domain",
"description": "Company website domain",
"required": True
}
]
}
]
def get_tool_by_name(tool_name: str) -> Dict[str, Any]:
"""Get a tool definition by name"""
for tool in MCP_TOOLS:
if tool["name"] == tool_name:
return tool
return None
def list_all_tools() -> List[str]:
"""List all available tool names"""
return [tool["name"] for tool in MCP_TOOLS]
|