Skip to main content
Glama
hackle-io

hackle-mcp

Official
by hackle-io

remote-config-update

Modify and update remote configurations to manage conditional values and default settings based on specific targeting rules for efficient A/B testing and feature flag management.

Instructions

Updates remote config's content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
remoteConfigIdYesRemote config's id.

Implementation Reference

  • The handler function that performs the HTTP PUT request to the /api/v1/remote-configs/{remoteConfigId}/parameters endpoint using WebClient to update the remote config content.
    async ({ remoteConfigId, body }) => {
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(await WebClient.put(`/api/v1/remote-configs/${remoteConfigId}/parameters`, body)),
          },
        ],
      };
    },
  • Zod schema defining the input parameters for the tool: remoteConfigId (number) and body object with dataType, remoteConfigDefaultValue, and conditionalValues array for targeting rules.
    {
      remoteConfigId: z.number().positive().describe("Remote config's id."),
      body: z.object({
        dataType: z
          .enum(['STRING', 'JSON', 'NUMBER', 'BOOLEAN'])
          .describe(
            "Type of Remote Config's value. You must provide remote config's value type to match with this field.",
          ),
        remoteConfigDefaultValue: z.union([z.string(), z.number(), z.boolean()]),
        conditionalValues: z
          .array(
            z.object({
              ruleName: z.string(),
              remoteConfigValue: z.union([z.string(), z.number(), z.boolean()]),
              target: z
                .object({
                  conditions: z
                    .array(
                      z.object({
                        key: z.object({
                          type: z
                            .enum(['HACKLE_PROPERTY', 'USER_PROPERTY', 'SEGMENT', 'AB_TEST', 'FEATURE_FLAG', 'COHORT'])
                            .describe("Condition's type."),
                          name: z
                            .string()
                            .describe(
                              "Property's name if type is HACKLE_PROPERTY or USER_PROPERTY. Experiment key if type is AB_TEST. Feature flag key if type is FEATURE_FLAG. You can put any non-empty string if type is COHORT or SEGMENT.",
                            ),
                        }),
                        match: z.object({
                          operator: z.enum([
                            'IS_ONE_OF',
                            'IS_NOT_ONE_OF',
                            'IS_STARTS_WITH',
                            'IS_NOT_STARTS_WITH',
                            'IS_ENDS_WITH',
                            'IS_NOT_ENDS_WITH',
                            'IS_CONTAINS',
                            'IS_NOT_CONTAINS',
                            'EQ',
                            'NOT_EQ',
                            'GT',
                            'GTE',
                            'LT',
                            'LTE',
                            'IS_TRUE',
                            'IS_FALSE',
                            'VERSION_EQ',
                            'VERSION_NOT_EQ',
                            'VERSION_GT',
                            'VERSION_GTE',
                            'VERSION_LT',
                            'VERSION_LTE',
                          ]),
                          valueType: z.enum(['NUMBER', 'STRING', 'BOOLEAN', 'VERSION']),
                          values: z
                            .array(z.union([z.string(), z.number(), z.boolean()]))
                            .describe(
                              "Values of targeting condition's key. Followings are some special cases: The values will be treated as names if you are using SEGMENT. Only strings 'A' and 'B' are allowed if type is AB_TEST. Only boolean values are accepted if type is FEATURE_FLAG. You should put cohort's id if type is COHORT.",
                            ),
                        }),
                      }),
                    )
                    .describe(
                      "Users who The user he satisfies all conditions in this array will see this rule's remote config value.",
                    ),
                })
                .describe('Targeting rule.'),
            }),
          )
          .describe('The earlier a condition is placed in the array, the earlier it is applied.'),
      }),
    },
  • src/index.ts:399-485 (registration)
    Registers the 'remote-config-update' tool on the MCP server using server.tool(), providing name, description, input schema, and inline handler function.
    server.tool(
      'remote-config-update',
      "Updates remote config's content.",
      {
        remoteConfigId: z.number().positive().describe("Remote config's id."),
        body: z.object({
          dataType: z
            .enum(['STRING', 'JSON', 'NUMBER', 'BOOLEAN'])
            .describe(
              "Type of Remote Config's value. You must provide remote config's value type to match with this field.",
            ),
          remoteConfigDefaultValue: z.union([z.string(), z.number(), z.boolean()]),
          conditionalValues: z
            .array(
              z.object({
                ruleName: z.string(),
                remoteConfigValue: z.union([z.string(), z.number(), z.boolean()]),
                target: z
                  .object({
                    conditions: z
                      .array(
                        z.object({
                          key: z.object({
                            type: z
                              .enum(['HACKLE_PROPERTY', 'USER_PROPERTY', 'SEGMENT', 'AB_TEST', 'FEATURE_FLAG', 'COHORT'])
                              .describe("Condition's type."),
                            name: z
                              .string()
                              .describe(
                                "Property's name if type is HACKLE_PROPERTY or USER_PROPERTY. Experiment key if type is AB_TEST. Feature flag key if type is FEATURE_FLAG. You can put any non-empty string if type is COHORT or SEGMENT.",
                              ),
                          }),
                          match: z.object({
                            operator: z.enum([
                              'IS_ONE_OF',
                              'IS_NOT_ONE_OF',
                              'IS_STARTS_WITH',
                              'IS_NOT_STARTS_WITH',
                              'IS_ENDS_WITH',
                              'IS_NOT_ENDS_WITH',
                              'IS_CONTAINS',
                              'IS_NOT_CONTAINS',
                              'EQ',
                              'NOT_EQ',
                              'GT',
                              'GTE',
                              'LT',
                              'LTE',
                              'IS_TRUE',
                              'IS_FALSE',
                              'VERSION_EQ',
                              'VERSION_NOT_EQ',
                              'VERSION_GT',
                              'VERSION_GTE',
                              'VERSION_LT',
                              'VERSION_LTE',
                            ]),
                            valueType: z.enum(['NUMBER', 'STRING', 'BOOLEAN', 'VERSION']),
                            values: z
                              .array(z.union([z.string(), z.number(), z.boolean()]))
                              .describe(
                                "Values of targeting condition's key. Followings are some special cases: The values will be treated as names if you are using SEGMENT. Only strings 'A' and 'B' are allowed if type is AB_TEST. Only boolean values are accepted if type is FEATURE_FLAG. You should put cohort's id if type is COHORT.",
                              ),
                          }),
                        }),
                      )
                      .describe(
                        "Users who The user he satisfies all conditions in this array will see this rule's remote config value.",
                      ),
                  })
                  .describe('Targeting rule.'),
              }),
            )
            .describe('The earlier a condition is placed in the array, the earlier it is applied.'),
        }),
      },
      async ({ remoteConfigId, body }) => {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(await WebClient.put(`/api/v1/remote-configs/${remoteConfigId}/parameters`, body)),
            },
          ],
        };
      },
    );
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'Updates', implying a mutation, but doesn't disclose behavioral traits such as permissions required, whether changes are reversible, rate limits, or what the response looks like. This is inadequate for a mutation tool with complex parameters.

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

Conciseness4/5

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

The description is a single sentence with zero waste, making it appropriately sized and front-loaded. However, it's overly concise to the point of under-specification, slightly reducing effectiveness.

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

Completeness2/5

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

Given the complexity (2 parameters with nested objects), no annotations, and no output schema, the description is incomplete. It fails to provide necessary context for safe and effective use, such as error handling or return values, making it insufficient for this tool's requirements.

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 description coverage is 50%, with detailed descriptions for nested parameters but not for top-level ones. The description adds no meaning beyond the schema, as it doesn't explain parameters like 'remoteConfigId' or 'body'. However, the schema provides some context, so baseline 3 is appropriate.

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

Purpose3/5

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

The description 'Updates remote config's content' states the action (updates) and resource (remote config's content), but it's vague about what 'content' specifically means. It doesn't distinguish this tool from sibling tools like 'remote-config-update-description' or 'remote-config-update-user-identifier-criteria', leaving ambiguity about scope.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. With siblings like 'remote-config-create' and 'remote-config-update-description', the description lacks any indication of prerequisites, context, or exclusions for usage.

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

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

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