Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

create-group

Automates browser group creation by defining a group name and optional remark, facilitating organized profile management within AdsPower LocalAPI MCP Server.

Instructions

Create a browser group

Input Schema

NameRequiredDescriptionDefault
groupNameYesThe name of the group to create
remarkNoThe remark of the group

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "groupName": { "description": "The name of the group to create", "type": "string" }, "remark": { "description": "The remark of the group", "type": "string" } }, "required": [ "groupName" ], "type": "object" }

Implementation Reference

  • The core handler function that implements the create-group tool by making an API POST request to create a new browser group.
    async createGroup({ groupName, remark }: CreateGroupParams) { const requestBody: Record<string, string> = { group_name: groupName }; if (remark !== undefined) { requestBody.remark = remark; } const response = await axios.post(`${LOCAL_API_BASE}${API_ENDPOINTS.CREATE_GROUP}`, requestBody); if (response.data.code === 0) { return `Group created successfully with name: ${groupName}${remark ? `, remark: ${remark}` : ''}`; } throw new Error(`Failed to create group: ${response.data.msg}`); },
  • Zod schema defining the input parameters for the create-group tool (groupName required, remark optional).
    createGroupSchema: z.object({ groupName: z.string().describe('The name of the group to create'), remark: z.string().optional().describe('The remark of the group') }).strict(),
  • TypeScript interface matching the input schema for type safety in the handler.
    export interface CreateGroupParams { groupName: string; remark?: string;
  • Registers the create-group tool with the MCP server, linking schema and handler.
    server.tool('create-group', 'Create a browser group', schemas.createGroupSchema.shape, wrapHandler(groupHandlers.createGroup));
  • API endpoint constant used by the handler for the create group request.
    CREATE_GROUP: '/api/v1/group/create',

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