Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

update-group

Modify browser group details such as name and remark using the specified group ID. Streamline organization and management of browser profiles through the AdsPower LocalAPI MCP Server.

Instructions

Update the browser group

Input Schema

NameRequiredDescriptionDefault
groupIdYesThe id of the group to update, must be a numeric string (e.g., "123"). You can use the get-group-list tool to get the group list
groupNameYesThe new name of the group
remarkNoThe new remark of the group

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "groupId": { "description": "The id of the group to update, must be a numeric string (e.g., \"123\"). You can use the get-group-list tool to get the group list", "pattern": "^\\d+$", "type": "string" }, "groupName": { "description": "The new name of the group", "type": "string" }, "remark": { "description": "The new remark of the group", "type": [ "string", "null" ] } }, "required": [ "groupId", "groupName" ], "type": "object" }

Implementation Reference

  • The core handler function for the 'update-group' tool. It constructs a request body with group_id, group_name, and optional remark, then sends a POST request to the UPDATE_GROUP API endpoint. Returns success message or throws error.
    async updateGroup({ groupId, groupName, remark }: UpdateGroupParams) { const requestBody: Record<string, any> = { group_id: groupId, group_name: groupName }; if (remark !== undefined) { requestBody.remark = remark; } const response = await axios.post(`${LOCAL_API_BASE}${API_ENDPOINTS.UPDATE_GROUP}`, requestBody); if (response.data.code === 0) { return `Group updated successfully with id: ${groupId}, name: ${groupName}${remark !== undefined ? `, remark: ${remark === null ? '(cleared)' : remark}` : ''}`; } throw new Error(`Failed to update group: ${response.data.msg}`); },
  • Zod input schema for 'update-group' tool, defining required groupId (numeric string), groupName (string), and optional nullable remark (string). Used for validation in tool registration.
    updateGroupSchema: z.object({ groupId: z.string() .regex(/^\d+$/, "Group ID must be a numeric string") .describe('The id of the group to update, must be a numeric string (e.g., "123"). You can use the get-group-list tool to get the group list'), groupName: z.string().describe('The new name of the group'), remark: z.string().nullable().optional().describe('The new remark of the group') }).strict(),
  • Registers the 'update-group' tool with the MCP server, providing name, description, input schema, and the wrapped handler function from groupHandlers.
    server.tool('update-group', 'Update the browser group', schemas.updateGroupSchema.shape, wrapHandler(groupHandlers.updateGroup));

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/AdsPower/local-api-mcp-typescript'

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