Skip to main content
Glama
by wsapi-chat

whatsapp_update_instance_settings

Modify WhatsApp instance configuration including name, description, and event pull mode settings to customize how the WhatsApp session operates within the WSAPI service.

Instructions

Update instance settings.

Input Schema

NameRequiredDescriptionDefault
descriptionNoInstance description
nameNoInstance name
pullModeNoEnable pull mode for events

Input Schema (JSON Schema)

{ "properties": { "description": { "description": "Instance description", "optional": true, "type": "string" }, "name": { "description": "Instance name", "optional": true, "type": "string" }, "pullMode": { "description": "Enable pull mode for events", "optional": true, "type": "boolean" } }, "type": "object" }

Implementation Reference

  • The complete ToolHandler object implementing the 'whatsapp_update_instance_settings' tool, including inline inputSchema, description, and the handler function that performs input validation and calls the WSAPI to update instance settings.
    export const updateInstanceSettings: ToolHandler = { name: 'whatsapp_update_instance_settings', description: 'Update instance settings.', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Instance name', optional: true }, description: { type: 'string', description: 'Instance description', optional: true }, pullMode: { type: 'boolean', description: 'Enable pull mode for events', optional: true }, }, }, handler: async (args: any) => { const input = validateInput(updateInstanceSettingsSchema, args); logger.info('Updating instance settings'); const result = await wsapiClient.put('/instance/settings', input); return { success: true, settings: result, message: 'Instance settings updated successfully' }; }, };
  • Zod schema (updateInstanceSettingsSchema) used within the tool handler for strict input validation before calling the WSAPI.
    export const updateInstanceSettingsSchema = z.object({ name: z.string().optional(), description: z.string().optional(), pullMode: z.boolean().optional(), });
  • src/server.ts:57-65 (registration)
    Registration of instanceTools (which includes whatsapp_update_instance_settings) in the toolCategories array, which is iterated to register all tools into the MCP server's tools Map in setupToolHandlers().
    const toolCategories = [ messagingTools, contactTools, groupTools, chatTools, sessionTools, instanceTools, accountTools, ];
  • Export of instanceTools object grouping instance-related tools, imported and registered in src/server.ts.
    export const instanceTools = { getInstanceSettings, updateInstanceSettings, restartInstance, updateApiKey };
  • Inline inputSchema provided to the MCP SDK for tool listing and validation.
    inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Instance name', optional: true }, description: { type: 'string', description: 'Instance description', optional: true }, pullMode: { type: 'boolean', description: 'Enable pull mode for events', optional: true }, }, },

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/wsapi-chat/wsapi-mcp'

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