Skip to main content
Glama
luiso2

Evolution API WhatsApp MCP Server

by luiso2

search_templates

Find predefined WhatsApp message templates for business scenarios like order confirmations, appointment reminders, and promotional messages by entering search terms.

Instructions

Search templates by text

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query

Implementation Reference

  • The handler function for the 'search_templates' tool. It calls templateService.searchTemplates with the query argument and returns the results as a JSON-formatted text response.
    private async handleSearchTemplates(args: any) { const templates = templateService.searchTemplates(args.query); return { content: [ { type: 'text', text: JSON.stringify(templates, null, 2) } ] }; }
  • Input schema definition for the 'search_templates' tool, specifying a required 'query' string parameter.
    inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query' } }, required: ['query']
  • src/index.ts:294-304 (registration)
    Registration of the 'search_templates' tool in the MCP tools array, including name, description, and input schema.
    { name: 'search_templates', description: 'Search templates by text', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query' } }, required: ['query'] } },
  • The core helper method in TemplateService that performs the actual template search by filtering on name, description, tags, and category.
    searchTemplates(query: string): MessageTemplate[] { const lowerQuery = query.toLowerCase(); return Array.from(this.templates.values()).filter(template => { return ( template.name.toLowerCase().includes(lowerQuery) || template.description?.toLowerCase().includes(lowerQuery) || template.tags?.some(tag => tag.toLowerCase().includes(lowerQuery)) || template.category?.toLowerCase().includes(lowerQuery) ); }); }

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/luiso2/mcp-evolution-api'

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