Skip to main content
Glama
hackle-io
by hackle-io

remote-config-create

Generate an empty remote configuration to manage feature targeting and values in Hackle. Specify key, data type, and user criteria for precise control over A/B testing parameters.

Instructions

Creates an empty remote config. It is recommended to update an existing RC first if there is an associated RC with the one you want to create since the total number of RC is limited.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes

Implementation Reference

  • src/index.ts:369-396 (registration)
    Registration of the 'remote-config-create' tool using McpServer.tool, including inline schema and handler.
    server.tool( 'remote-config-create', 'Creates an empty remote config. It is recommended to update an existing RC first if there is an associated RC with the one you want to create since the total number of RC is limited.', { body: z.object({ key: z.string().nonempty().describe("Remote config's name."), description: z.string().optional(), dataType: z.enum(['STRING', 'JSON', 'NUMBER', 'BOOLEAN']).describe("Type of Remote Config's value."), userIdentifierCriteria: z .string() .optional() .default('$deviceId') .describe( 'User identifier criteria for targeting. You can use criteria provided by Hackle($deviceId, $userId) or your own criteria created at Hackle dashboard website.', ), }), }, async ({ body }) => { return { content: [ { type: 'text', text: JSON.stringify(await WebClient.post(`/api/v1/remote-configs`, body)), }, ], }; }, );
  • Handler function that performs the POST request to create a remote config via WebClient.post and returns the JSON response as text content.
    async ({ body }) => { return { content: [ { type: 'text', text: JSON.stringify(await WebClient.post(`/api/v1/remote-configs`, body)), }, ], }; },
  • Input schema using Zod, validating the body object with fields: key (required string), description (optional string), dataType (enum), userIdentifierCriteria (optional string default '$deviceId').
    { body: z.object({ key: z.string().nonempty().describe("Remote config's name."), description: z.string().optional(), dataType: z.enum(['STRING', 'JSON', 'NUMBER', 'BOOLEAN']).describe("Type of Remote Config's value."), userIdentifierCriteria: z .string() .optional() .default('$deviceId') .describe( 'User identifier criteria for targeting. You can use criteria provided by Hackle($deviceId, $userId) or your own criteria created at Hackle dashboard website.', ), }), },
  • WebClient.post static method, which handles the HTTP POST request to the Hackle API endpoint, used by the tool handler.
    public static async post<T = unknown>( path: string, body?: unknown, options?: Omit<RequestInit, 'method' | 'body'>, ): Promise<T> { return this.request<T>('POST', path, { ...options, body: JSON.stringify(body), headers: { ...options?.headers, }, }); }

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/hackle-io/hackle-mcp'

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