CRM Factory logoCRM Factory

MCP Tools Reference

Complete reference for all MCP tools available to AI agents.

CRM Factory's MCP server exposes 14 tools across three categories: CRM operations, ERP queries, and knowledge search.


CRM Tools

search_crm

Search CRM records by keyword across multiple entity types.

ParameterTypeRequiredDefaultDescription
querystringYesSearch keyword (min 2 chars)
typesstring[]Noall typesFilter to specific types: account, contact, opportunity, case, lead
limitnumberNo10Max results per type (1-50)

Returns: { query, results: [{ id, type, title, subtitle }] }

Performs case-insensitive substring matching across name, email, subject, and other text fields. Results are merged and capped at limit × 3 total.


get_record

Retrieve a single CRM record with all related entities.

ParameterTypeRequiredDescription
typestringYesaccount, contact, opportunity, case, or lead
idstring (UUID)YesRecord ID

Returns vary by type:

  • account: { record, contacts, opportunities, cases, recentActivities }
  • contact: { record, account, opportunities, cases, recentActivities }
  • opportunity: { record, account, contact, products, recentActivities }
  • case: { record, account, contact, comments, recentActivities }
  • lead: { record }

list_records

List CRM records with optional filtering.

ParameterTypeRequiredDefaultDescription
typestringYesaccount, contact, opportunity, case, or lead
stagestringNoFilter opportunities by stage
statusstringNoFilter cases/leads by status
prioritystringNoFilter cases by priority
owner_idstring (UUID)NoFilter by assigned owner
min_amountnumberNoOpportunities with amount greater than or equal to value
max_amountnumberNoOpportunities with amount less than or equal to value
closing_beforestringNoOpportunities closing before this date
limitnumberNo50Max records (1-200)

Returns: { type, records: [...] }


create_record

Create a new CRM record. Supported types: opportunity, case, activity.

ParameterTypeRequiredDescription
typestringYesopportunity, case, or activity
fieldsobjectYesFields for the new record (see below)

Opportunity fields: name (required), stage (default "Discovery"), account_id, contact_id, amount, currency, probability, expected_close_date, pipeline_id

Case fields: subject (required), description, account_id, contact_id, priority (default "medium"), status (default "new"), category

Activity fields: activity_type (required: email/call/meeting/task/note), subject (required), body, due_at, related_to (array of { type, id })

The authenticated user is automatically set as the owner.


update_record

Update fields on an existing CRM record.

ParameterTypeRequiredDescription
typestringYesaccount, contact, opportunity, case, or lead
idstring (UUID)YesRecord ID
fieldsobjectYesFields to update (only provided fields are changed)

Editable fields vary by type. For opportunities: name, stage, amount, probability, expected_close_date, loss_reason, won. For cases: subject, description, status, priority, category.


get_pipeline_summary

Get aggregated pipeline metrics with opportunity count and total value per stage.

ParameterTypeRequiredDescription
pipeline_idstring (UUID)NoFilter to a specific pipeline (default: all pipelines)

Returns: { pipeline_id, stages: [{ stage, opportunityCount, totalAmount }] }


draft_email

Draft a customer-facing email using CRM context. Uses AI to generate a polished email based on the contact's account, open opportunities, and recent activity.

ParameterTypeRequiredDefaultDescription
contact_idstring (UUID)YesTarget contact
purposestringYesWhat the email is about (min 3 chars)
tonestringNo"friendly"formal, friendly, or casual

Returns: { to, subjectSuggestion, draft, context: { contactId, accountId, opportunityIds } }


get_call_history

Get recent call activity for a contact or account.

ParameterTypeRequiredDefaultDescription
contact_idstring (UUID)No*Filter by contact
account_idstring (UUID)No*Filter by account
limitnumberNo20Max results (1-100)

*At least one of contact_id or account_id is required.

Returns: { calls: [{ id, subject, created_at, completed_at, duration, direction, call_sid, ai_summary }] }


search_call_transcripts

Search call transcripts by keyword.

ParameterTypeRequiredDefaultDescription
querystringYesSearch keyword (min 2 chars)
contact_idstring (UUID)NoScope to contact
account_idstring (UUID)NoScope to account
limitnumberNo10Max results (1-25)

Returns: { query, results: [{ id, subject, created_at, transcript }] }


get_call_analysis

Get full AI post-call analysis for a single call.

ParameterTypeRequiredDescription
activity_idstring (UUID)YesCall activity ID

Returns: { id, subject, created_at, completed_at, call_sid, transcript, analysis }

The analysis object contains AI-generated insights including summary, action items, and sentiment.


ERP Tools

These tools require an active ERP integration connection (Infor SX, SAP, NetSuite, or Dynamics).

erp_lookup

Lookup ERP data by type.

ParameterTypeRequiredDescription
typestringYesaccount, product, order, order_history, pricing, or customer_kpis
paramsobjectYesType-specific parameters (see below)
  • account: { account_id?, email?, name?, erp_customer_id? } — Looks up from local synced data
  • product: { sku?, query?, limit? } — Looks up from local synced data
  • order: { order_number } — Live ERP query
  • order_history: { account_id?, customer_id?, limit? } — Live ERP query
  • pricing: { customer_id, sku?, items?: [{ sku, qty? }] } — Live ERP query
  • customer_kpis: { customer_id } — Live ERP query

erp_check_inventory

Check live ERP inventory levels.

ParameterTypeRequiredDefaultDescription
skusstring[]YesSKUs to check (1-50)
warehouse_idstringNo"main"Warehouse identifier

Returns: { skus, inventory: [{ sku, warehouseId, quantityOnHand, quantityAvailable, quantityOnOrder }] }


erp_live_query

Generic live ERP query dispatcher for advanced use cases.

ParameterTypeRequiredDescription
actionstringYesOne of: search_customers, get_customer, get_customer_credit, get_customer_contacts, get_customer_invoices, get_customer_kpis, list_orders, get_order, search_products, get_product, get_inventory, get_pricing, list_warehouses
paramsobjectYesAction-specific parameters

Knowledge Tools

search_knowledge

Semantic vector search across the embedded knowledge base.

ParameterTypeRequiredDefaultDescription
querystringYesNatural language search query (min 2 chars)
source_typesstring[]NoallFilter by source: case, case_comment, activity, email, transcript, product, article, document
parent_typestringNoFilter by parent entity type
parent_idstring (UUID)NoFilter by parent entity ID
limitnumberNo10Max results (1-50)
min_similaritynumberNo0.3Minimum cosine similarity threshold (0-1)

Returns: { query, results: [{ id, sourceType, sourceId, parentType, parentId, content, metadata, similarity }] }

Uses pgvector cosine similarity to find the most semantically relevant knowledge chunks. Higher min_similarity values return fewer but more relevant results.

On this page