Skip to main content
Glama

Clay

Official
by clay-inc

searchInteractions

Search for specific interactions to identify contacts, analyze relationships, and answer 'who' questions. Find best friends, recently added contacts, or professional connections based on job titles, companies, locations, and keywords. Returns detailed contact records for precise queries.

Instructions

Search for interactions and return matching interactions. Use for questions about specific interactions, "who" questions (e.g. "Who did I meet most?"), finding best friends based on relevance score, or finding recently added/created contacts. Returns actual contact records for queries needing specific interactions.

Input Schema

NameRequiredDescriptionDefault
company_nameNoIf the query refers to a company or acronym of companies, list company names as they would on a LinkedIn profile.
exclude_contact_idsNoUsed to exclude previously returned contact IDs when the user asks for more results (e.g. "who else" or "show me more"). You should pass all contact IDs from previous searchContacts responses to ensure new results are shown.
job_titleNoIf the query refers to a job title, position, or industry, list relevant job titles as they would be on a LinkedIn profile. Examples: Developer should return positions such as 'Software Engineer', 'Full Stack Developer', 'Data Scientist', etc. Banker should return positions such as 'Financial Analyst', 'Investment Banker', 'Credit Analyst', etc. Healthcare industry should return positions such as 'Registered Nurse', 'Physician', 'Medical Director', etc. Legal industry should return positions such as 'Attorney', 'Legal Counsel', 'Paralegal', etc.
keywordsNoExtract and list specific keywords related to professional expertise, skills, interests, or hobbies that the user is searching for. For example, if someone asks for 'people who know about machine learning or play tennis', the keywords would be ['machine learning', 'tennis']. Do not include job titles or company names here as those have dedicated fields. Focus on capturing domain expertise, technical skills, personal interests, and hobby-related terms that help identify relevant contacts.
limitNoThe number of contacts to return if the user asks for an amount.
locationNoIf the query refers to a location (city, state, country, region) where people are located or based, list the locations as they would appear on a LinkedIn profile. For example, if someone asks about "people in New York", return "New York City Metropolitan Area" or if they ask about "contacts in California", return "San Francisco Bay Area", "Greater Los Angeles Area", etc.
queryYesThe raw search query from the user. Must preserve exact intent and details to enable accurate searching, including: relationship qualifiers, interaction metrics, relationship strength, names, companies, locations, dates (specific dates, date ranges, or relative dates like "last week" are required if mentioned by user), job titles, skills, and logical conditions (OR/AND).
sort_instructionsNoHow would you like the results sorted? For example: "most recent contacts" will sort by last interaction date, "closest connections" will sort by interaction count, and "alphabetical" will sort by name. If no sort preference is given, this can be left empty.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "company_name": { "default": [], "description": "If the query refers to a company or acronym of companies, list company names as they would on a LinkedIn profile.", "items": { "type": "string" }, "type": "array" }, "exclude_contact_ids": { "description": "Used to exclude previously returned contact IDs when the user asks for more results (e.g. \"who else\" or \"show me more\"). You should pass all contact IDs from previous searchContacts responses to ensure new results are shown.", "items": { "type": "number" }, "type": "array" }, "job_title": { "default": [], "description": "If the query refers to a job title, position, or industry, list relevant job titles as they would be on a LinkedIn profile. Examples: Developer should return positions such as 'Software Engineer', 'Full Stack Developer', 'Data Scientist', etc. Banker should return positions such as 'Financial Analyst', 'Investment Banker', 'Credit Analyst', etc. Healthcare industry should return positions such as 'Registered Nurse', 'Physician', 'Medical Director', etc. Legal industry should return positions such as 'Attorney', 'Legal Counsel', 'Paralegal', etc.", "items": { "type": "string" }, "type": "array" }, "keywords": { "default": [], "description": "Extract and list specific keywords related to professional expertise, skills, interests, or hobbies that the user is searching for. For example, if someone asks for 'people who know about machine learning or play tennis', the keywords would be ['machine learning', 'tennis']. Do not include job titles or company names here as those have dedicated fields. Focus on capturing domain expertise, technical skills, personal interests, and hobby-related terms that help identify relevant contacts.", "items": { "type": "string" }, "type": "array" }, "limit": { "default": 10, "description": "The number of contacts to return if the user asks for an amount.", "type": "number" }, "location": { "default": [], "description": "If the query refers to a location (city, state, country, region) where people are located or based, list the locations as they would appear on a LinkedIn profile. For example, if someone asks about \"people in New York\", return \"New York City Metropolitan Area\" or if they ask about \"contacts in California\", return \"San Francisco Bay Area\", \"Greater Los Angeles Area\", etc.", "items": { "type": "string" }, "type": "array" }, "query": { "description": "The raw search query from the user. Must preserve exact intent and details to enable accurate searching, including: relationship qualifiers, interaction metrics, relationship strength, names, companies, locations, dates (specific dates, date ranges, or relative dates like \"last week\" are required if mentioned by user), job titles, skills, and logical conditions (OR/AND).", "type": "string" }, "sort_instructions": { "description": "How would you like the results sorted? For example: \"most recent contacts\" will sort by last interaction date, \"closest connections\" will sort by interaction count, and \"alphabetical\" will sort by name. If no sort preference is given, this can be left empty.", "type": "string" } }, "required": [ "query" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/clay-inc/clay-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server