search_crm_contexts
Name: search_crm_contexts
Description: Searches for CRM context objects using natural language queries and optional filters. This endpoint returns a list of matching CRM entities (accounts, contacts, opportunities, etc.) with confidence scores and match reasons. The search supports type hints to narrow results to specific object types and system hints to target specific CRM instances. Results include disambiguation indicators to help AI agents determine if additional clarification is needed from users.
Schema
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Natural language search query for finding CRM contexts. Can include partial names, keywords, or descriptive terms related to accounts, contacts, opportunities, or other CRM objects."
},
"typeHint": {
"type": "string",
"description": "Required filter to specify the type of CRM object to search for (e.g., 'account', 'contact', 'opportunity', 'lead'). Helps narrow search results to specific entity types."
},
"systemHint": {
"type": "object",
"properties": {
"systemType": {
"type": "string",
"description": "Optional filter to specify the CRM system type (e.g., 'Salesforce', 'Dynamics', 'HubSpot'). Used to narrow search scope to specific CRM platforms."
},
"systemId": {
"type": "string",
"description": "Optional filter to specify the unique system identifier of the CRM instance. Used for multi-tenant scenarios."
}
},
"description": "Optional system-specific hints to filter search results by CRM platform or instance."
}
},
"required": [
"query",
"typeHint"
]
}
{
"type": "object",
"properties": {
"candidates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"crmContext": {
"type": "object",
"properties": {
"contextId": {
"type": "string",
"description": "The unique identifier of the CRM context object."
},
"name": {
"type": "string",
"description": "The display name of the CRM context (e.g., account name, contact name, opportunity title)."
},
"type": {
"type": "string",
"description": "The type of CRM object (e.g., 'Account', 'Contact', 'Opportunity', 'Lead')."
},
"systemId": {
"type": "string",
"description": "The unique identifier of the CRM system instance."
},
"systemType": {
"type": "string",
"description": "The type of CRM system (e.g., 'Salesforce', 'Dynamics', 'HubSpot')."
}
},
"required": [
"contextId",
"name",
"type"
]
},
"confidence": {
"type": "number",
"format": "float",
"description": "Confidence score (0.0 to 1.0) indicating how well this result matches the search query."
},
"matchReason": {
"type": "string",
"description": "Explanation of why this result was matched (e.g., 'Partial Name match', 'Full Name match', 'Keyword match')."
}
},
"required": [
"crmContext",
"confidence",
"matchReason"
]
},
"description": "List of CRM context candidates matching the search query, ordered by relevance/confidence."
},
"needsDisambiguation": {
"type": "boolean",
"description": "Flag indicating whether the search results require user disambiguation due to multiple similar matches or ambiguous query terms."
}
},
"required": [
"candidates",
"needsDisambiguation"
]
}
Updated about 2 hours ago