Skip to main content
Glama
configcat

ConfigCat MCP Server

Official
by configcat

replace-setting-value-v2

Replaces a feature flag's value and targeting rules in a ConfigCat environment. Specify the new default value and rules; any omitted fields are reset to their original state.

Instructions

This endpoint replaces the value and the Targeting Rules of a Feature Flag or Setting in a specified Environment identified by the SDK key passed in the X-CONFIGCAT-SDKKEY header.

Only the defaultValue, targetingRules, and percentageEvaluationAttribute fields are modifiable by this endpoint.

Important: As this endpoint is doing a complete replace, it's important to set every other field that you don't want to change to its original state. Not listing one means it will reset.

For example: We have the following resource of a Feature Flag.

{
  "defaultValue": {
    "boolValue": false
  },
  "targetingRules": [
    {
      "conditions": [
        {
          "userCondition": {
            "comparisonAttribute": "Email",
            "comparator": "sensitiveTextEquals",
            "comparisonValue": {
              "stringValue": "test@example.com"
            }
          }
        }
      ],
      "percentageOptions": [],
      "value": {
        "boolValue": true
      }
    }
  ]
}

If we send a replace request body as below:

{
  "defaultValue": {
    "boolValue": true
  }
}

Then besides that the default served value is set to true, all the Targeting Rules are deleted. So we get a response like this:

{
  "defaultValue": {
    "boolValue": true
  },
  "targetingRules": []
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoThe reason note for the Audit Log if the Product's "Config changes require a reason" preference is turned on.
settingIdYesThe id of the Setting.
requestBodyYes
environmentIdYesThe identifier of the Environment.
bypassApprovalNoWhether to bypass the approval process and directly apply the change. This is only applicable for users with bypass approval permission.
latestVersionIdNoOptional. The version identifier of the last change made to the Feature Flag or Setting in the Environment. It can be used to make sure concurrent updates are not overwriting each other. If provided and the version identifier does not match the current version, the update will be rejected with a 409 Conflict response. The latest version id can be acquired from the `LastVersionId` property of the response models.
Install Server

TDQS

A3.8/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well. It explicitly warns that this endpoint performs a complete replace, that unlisted fields are reset, and that the SDK key must be passed in the X-CONFIGCAT-SDKKEY header. The example vividly illustrates the destructive behavior.

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 front-loaded with the core purpose and critical warning, followed by a concrete example that clarifies the replace semantics. The example is somewhat long, but it earns its place by showing the reset behavior that would otherwise be easy to misunderstand.

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

Completeness4/5

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

Given the complex nested schema, high parameter count, and absence of annotations or output schema, the description is substantially complete. It covers authentication, modifiable fields, and the most dangerous behavioral pitfall. It could still benefit from explicit guidance on how it differs from the similarly named sibling endpoint 'replace-setting-value'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 83%, so the schema already documents most parameters. The description adds valuable meaning beyond the schema by explaining that only defaultValue, targetingRules, and percentageEvaluationAttribute are modifiable and by demonstrating how omitting targetingRules deletes them. This helps the agent construct the request body correctly.

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

Purpose4/5

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

The description clearly states the tool replaces the value and Targeting Rules of a Feature Flag or Setting in a specified Environment, naming the exact resource and action. It also lists the modifiable fields. However, it does not explicitly differentiate itself from the sibling tool 'replace-setting-value'.

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?

The description explains the full-replace behavior and warns about resetting omitted fields, but it does not say when to prefer this tool over alternatives like 'update-setting-value' or 'replace-setting-value'. No explicit when-to-use or when-not-to-use guidance is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other 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/configcat/mcp-server'

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