Skip to main content
Glama
byndcloud

Unofficial Dex CRM MCP Server

by byndcloud

dex_search

Search across Dex CRM entities including contacts, groups, tags, reminders, notes, and views using keywords and filters to find specific data.

Instructions

Search across Dex entities by keyword. Set 'entity' to choose what to search: 'contacts' (name, email, company), 'groups', 'tags', 'reminders', 'notes' (timeline entries), or 'views'. For reminders you can also filter by startDate, endDate, and isComplete. For contacts you can filter by archived status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityYes
searchQueryNo
takeNo
cursorNo
archivedNo
enhancedNo
startDateNo
endDateNo
isCompleteNo

Implementation Reference

  • The handler function for dex_search, which executes the search logic using the dex client.
    async (args) => {
      try {
        const endpoint = entityEndpoints[args.entity];
        const query: Record<string, string | number | boolean | undefined> = {};
    
        if (args.searchQuery !== undefined) query.searchQuery = args.searchQuery;
        if (args.take !== undefined) query.take = args.take;
        if (args.cursor !== undefined) query.cursor = args.cursor;
    
        if (args.entity === "contacts") {
          if (args.archived !== undefined) query.archived = args.archived;
          if (args.enhanced !== undefined) query.enhanced = args.enhanced;
        }
    
        if (args.entity === "reminders") {
          if (args.startDate !== undefined) query.startDate = args.startDate;
          if (args.endDate !== undefined) query.endDate = args.endDate;
          if (args.isComplete !== undefined) query.isComplete = args.isComplete;
        }
    
        if (args.entity === "notes") {
          if (args.startDate !== undefined) query.startDate = args.startDate;
          if (args.endDate !== undefined) query.endDate = args.endDate;
        }
    
        const result = await dex.get(
          endpoint,
          Object.keys(query).length ? query : undefined
        );
        return toResult(result);
      } catch (error) {
        return toError(error);
      }
    }
  • The zod schema defining input parameters for the dex_search tool.
    {
      entity: z.enum(["contacts", "groups", "tags", "reminders", "notes", "views"]),
      searchQuery: z.string().optional(),
      take: z.number().optional(),
      cursor: z.string().optional(),
      archived: z.boolean().optional(),
      enhanced: z.boolean().optional(),
      startDate: z.string().optional(),
      endDate: z.string().optional(),
      isComplete: z.boolean().optional(),
    },
  • Registration logic for the dex_search tool on the MCP server.
    export function registerSearchTools(server: McpServer): void {
      server.tool(
        "dex_search",
        "Search across Dex entities by keyword. Set 'entity' to choose what to search: 'contacts' (name, email, company), 'groups', 'tags', 'reminders', 'notes' (timeline entries), or 'views'. For reminders you can also filter by startDate, endDate, and isComplete. For contacts you can filter by archived status.",
        {
          entity: z.enum(["contacts", "groups", "tags", "reminders", "notes", "views"]),
          searchQuery: z.string().optional(),
          take: z.number().optional(),
          cursor: z.string().optional(),
          archived: z.boolean().optional(),
          enhanced: z.boolean().optional(),
          startDate: z.string().optional(),
          endDate: z.string().optional(),
          isComplete: z.boolean().optional(),
        },
        async (args) => {
          try {
            const endpoint = entityEndpoints[args.entity];
            const query: Record<string, string | number | boolean | undefined> = {};
    
            if (args.searchQuery !== undefined) query.searchQuery = args.searchQuery;
            if (args.take !== undefined) query.take = args.take;
            if (args.cursor !== undefined) query.cursor = args.cursor;
    
            if (args.entity === "contacts") {
              if (args.archived !== undefined) query.archived = args.archived;
              if (args.enhanced !== undefined) query.enhanced = args.enhanced;
            }
    
            if (args.entity === "reminders") {
              if (args.startDate !== undefined) query.startDate = args.startDate;
              if (args.endDate !== undefined) query.endDate = args.endDate;
              if (args.isComplete !== undefined) query.isComplete = args.isComplete;
            }
    
            if (args.entity === "notes") {
              if (args.startDate !== undefined) query.startDate = args.startDate;
              if (args.endDate !== undefined) query.endDate = args.endDate;
            }
    
            const result = await dex.get(
              endpoint,
              Object.keys(query).length ? query : undefined
            );
            return toResult(result);
          } catch (error) {
            return toError(error);
          }
        }
      );
    }

Latest Blog Posts

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/byndcloud/unofficial-dex-mcp'

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