Skip to main content
Glama
wsapi-chat
by wsapi-chat

whatsapp_get_instance_settings

Retrieve current WhatsApp instance configuration and operational parameters to manage account settings and session details.

Instructions

Get current instance settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main ToolHandler object implementing the whatsapp_get_instance_settings tool. Includes name, description, inputSchema, and the async handler function that logs the action, fetches instance settings from '/instance/settings' endpoint using wsapiClient, and returns success response with settings.
    export const getInstanceSettings: ToolHandler = { name: 'whatsapp_get_instance_settings', description: 'Get current instance settings.', inputSchema: { type: 'object', properties: {} }, handler: async () => { logger.info('Getting instance settings'); const result = await wsapiClient.get('/instance/settings'); return { success: true, settings: result, message: 'Instance settings retrieved successfully' }; }, };
  • Input schema for the tool, which is an empty object since the tool takes no parameters.
    inputSchema: { type: 'object', properties: {} },
  • src/server.ts:53-79 (registration)
    The setupToolHandlers method in WSAPIMCPServer that registers all tools, including those from instanceTools (which contains whatsapp_get_instance_settings), by iterating over tool categories and adding each tool to the tools Map.
    private setupToolHandlers(): void { logger.info('Setting up tool handlers'); // Register all tool categories const toolCategories = [ messagingTools, contactTools, groupTools, chatTools, sessionTools, instanceTools, accountTools, ]; toolCategories.forEach(category => { Object.values(category).forEach(tool => { if (this.tools.has(tool.name)) { logger.warn(`Tool ${tool.name} already registered, skipping`); return; } this.tools.set(tool.name, tool); logger.debug(`Registered tool: ${tool.name}`); }); }); logger.info(`Registered ${this.tools.size} tools`); }
  • src/server.ts:20-20 (registration)
    Import statement bringing in the instanceTools object containing the whatsapp_get_instance_settings handler.
    import { instanceTools } from './tools/instance.js';
  • Export of the instanceTools object that groups the instance-related tools, including getInstanceSettings for registration in the server.
    export const instanceTools = { getInstanceSettings, updateInstanceSettings, restartInstance, updateApiKey };

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