Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

update-group

Modify browser group settings in AdsPower by changing the group name and adding optional remarks to organize browser profiles more effectively.

Instructions

Update the browser group

Input Schema

TableJSON 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

Implementation Reference

  • The main handler function for the 'update-group' tool. It constructs a request body with groupId, groupName, and optional remark, sends a POST request to the UPDATE_GROUP API endpoint, and returns a success message or throws an 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 schema defining the input parameters for the 'update-group' tool: groupId (required numeric string), groupName (required string), remark (optional nullable string).
    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 wrapped handler.
    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