Skip to main content
Glama
billyfranklim1

mcp-evolution

Update Profile Name

update_profile_name

Updates the display name of the pinned WhatsApp instance's profile.

Instructions

Update the display name of the pinned WhatsApp instance's profile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesNew display name for the WhatsApp profile

Implementation Reference

  • The registerUpdateProfileName function registers and implements the 'update_profile_name' tool. It calls the Evolution API POST endpoint /chat/updateProfileName/{instanceName} with the new name, and returns the result as JSON text.
    export function registerUpdateProfileName(server: McpServer, client: EvolutionClient): void {
      server.registerTool(
        "update_profile_name",
        {
          title: "Update Profile Name",
          description: "Update the display name of the pinned WhatsApp instance's profile.",
          inputSchema: schema,
        },
        async (args) => {
          try {
            const data = await client.post(`/chat/updateProfileName/${client.instanceName}`, {
              name: args.name,
            });
            return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
          } catch (e) {
            if (e instanceof McpError) return { isError: true, content: [{ type: "text" as const, text: e.message }] };
            throw e;
          }
        }
      );
    }
  • Input schema for the tool: requires a 'name' string (min length 1) describing the new display name for the WhatsApp profile.
    const schema = {
      name: z.string().min(1).describe("New display name for the WhatsApp profile"),
    };
  • Registration call that wires update_profile_name into the MCP server alongside other profile tools.
    registerUpdateProfileName(server, client);
    registerUpdateProfileStatus(server, client);
    registerUpdateProfilePicture(server, client);
    registerRemoveProfilePicture(server, client);
    registerFetchPrivacy(server, client);
    registerUpdatePrivacy(server, client);
  • Import statement for registerUpdateProfileName from the update-profile-name module.
    import { registerUpdateProfileName } from "./update-profile-name.js";
    import { registerUpdateProfileStatus } from "./update-profile-status.js";
    import { registerUpdateProfilePicture } from "./update-profile-picture.js";
  • EvolutionClient class used by the handler to make HTTP POST requests to the Evolution API. The instanceName getter provides the instance name used in the URL path.
    import { McpError, ErrorCode } from "@modelcontextprotocol/sdk/types.js";
    import type { Config } from "./config.js";
    
    export class EvolutionClient {
      private readonly baseUrl: string;
      private readonly apiKey: string;
      private readonly instance: string;
    
      constructor(config: Config) {
        // Strip trailing slash to keep URL building consistent
        this.baseUrl = config.EVOLUTION_API_URL.replace(/\/$/, "");
        this.apiKey = config.EVOLUTION_API_KEY;
        this.instance = config.EVOLUTION_INSTANCE;
      }
    
      get instanceName(): string {
        return this.instance;
      }
    
      async get<T = unknown>(path: string): Promise<T> {
        return this.request<T>("GET", path);
      }
    
      async post<T = unknown>(path: string, body: unknown): Promise<T> {
        return this.request<T>("POST", path, body);
      }
    
      async delete<T = unknown>(path: string, body?: unknown): Promise<T> {
        return this.request<T>("DELETE", path, body);
      }
    
      private async request<T>(method: string, path: string, body?: unknown): Promise<T> {
        const url = `${this.baseUrl}${path}`;
        const headers: Record<string, string> = {
          apikey: this.apiKey,
          "Content-Type": "application/json",
        };
    
        const res = await fetch(url, {
          method,
          headers,
          body: body !== undefined ? JSON.stringify(body) : undefined,
        });
    
        const text = await res.text();
    
        if (!res.ok) {
          throw new McpError(
            ErrorCode.InternalError,
            `Evolution API error ${res.status}: ${text}`
          );
        }
    
        try {
          return JSON.parse(text) as T;
        } catch {
          return text as unknown as T;
        }
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry full burden. It mentions 'pinned WhatsApp instance' but does not disclose behavioral traits such as whether the change is immediate, requires specific permissions, or has side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short sentence that is front-loaded and contains no redundant words. Every part of the sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the core intent but lacks context on when to use the tool, any prerequisites, or what the result looks like. With no annotations or output schema, it is minimally adequate but not comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the only parameter 'name' is described in the schema. The description adds no extra meaning beyond the schema, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Update' and clearly identifies the resource as 'the display name of the pinned WhatsApp instance's profile'. This distinguishes the tool from siblings like update_profile_picture or update_profile_status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives (e.g., update_profile_status). Usage is implied by the name but no guidance on exclusions or context is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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

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