> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to the LaunchDarkly MCP server

The LaunchDarkly MCP connector routes your AI agent's tool calls to LaunchDarkly's own MCP server through Scalekit. Each user signs in to LaunchDarkly once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 162 tools.

**Authentication:** OAuth2.1/DCR
**Categories:** Developer Tools, Monitoring, Automation
**Tools:** 162: 75 read, 57 write, 30 destructive
**Users sign in with:** OAuth
**OAuth app:** Scalekit's or your own
**Built by:** Vendor MCP
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=LAUNCHDARKLYMCP)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the LaunchDarkly MCP connection

   In **AgentKit > Connections**, create a LaunchDarkly MCP connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

   Scalekit credentials are available for LaunchDarkly MCP server, so you don't need to register an OAuth app.

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'launchdarklymcp'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize LaunchDarkly MCP:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'launchdarklymcp_find_o11y_project',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "launchdarklymcp"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize LaunchDarkly MCP:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="launchdarklymcp_find_o11y_project",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user signs in once. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'launchdarklymcp_find_o11y_project',
  toolInput: {},
  connector: 'launchdarklymcp',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="launchdarklymcp_find_o11y_project",
    tool_input={},
    connection_name="launchdarklymcp",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `launchdarklymcp_find_o11y_project`

Find O11y Project · Read-only

Find the LaunchDarkly project that holds a service's observability data (logs, traces, metrics, errors). Use this before other observability tools when you know a service but not its project; a project's name often does not match the services it holds. A match means the project has had data for the service, not that it is sending now; confirm the window with get-keys key=service_name. Pass the returned projectKey to the other observability toolruntime.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectQuery` (`string`, optional): Only check LaunchDarkly projects whose name or key contains this text. Omit to check every project.
- `serviceName` (`string`, optional): Service name or a part of it, case-insensitive, e.g. checkout or checkout-api. Omit to list every project that has reported any service.

Example input: `{}`

### `launchdarklymcp_get_agent_config_approvals`

Get Agent Config Approvals · Read-only

List approval requests for an AgentControl Config. Pass projectKey and configKey, or only id. Each request has a url that opens it in LaunchDarkly. reviewStatus is the reviewers' decision: pending, approved, or declined. status is the change itself: pending, scheduled, completed (applied), or failed. Pass id to return only that request, for example to check whether it was approved; the id from create is enough on its own, and any key passed with it must match the request's resource. Each request lists its reviews with kind and comment, so a decline shows its reason. For integration-managed approvals with auto-apply on, reading a request can make LaunchDarkly apply it once approved.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `configKey` (`string`, optional): No description.
- `env` (`string`, optional): Environment key. If the user hasn't named one, ask; don't guess.
- `id` (`string`, optional): Return only this approval request.
- `projectKey` (`string`, optional): Project key. If the user hasn't named one, ask; don't guess.

Example input: `{}`

### `launchdarklymcp_get_agent_configs`

Get Agent Configs · Read-only

Without configKey: search and browse AgentControl Configs (query, tags, view, modes, maintainerId, maintainerTeamKey, sort, limit, offset; filters combine with AND). With configKey: get one config; section is config (default, with variations), health (missing variations, models, prompts, tool references), status (lifecycle across every environment; no env needed), targeting (one environment; requires env), or versions (every saved version of one variation, newest first; requires variationKey). To restore an earlier prompt or model, pass that version's model and messages to update-agent-config resource=variation.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `configKey` (`string`, optional): No description.
- `env` (`string`, optional): Required for section=targeting; not used by the other sections.
- `limit` (`integer`, optional): No description.
- `maintainerId` (`string`, optional): A member ID.
- `maintainerTeamKey` (`string`, optional): No description.
- `modes` (`array`, optional): No description.
- `offset` (`integer`, optional): No description.
- `query` (`string`, optional): No description.
- `section` (`string`, optional): Only with configKey. Defaults to config. One of: `config`, `health`, `status`, `targeting`, `versions`.
- `sort` (`string`, optional): No description. One of: `creationDate`, `-creationDate`, `lastModified`, `-lastModified`, `name`, `-name`.
- `tags` (`array`, optional): No description.
- `variationKey` (`string`, optional): Required for section=versions; not used by the other sections.
- `view` (`string`, optional): No description.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_agent_graphs`

Get Agent Graphs · Read-only

Without graphKey: list AgentControl graphs in a project (limit, offset). With graphKey: get one graph including its edges. Timestamps in the result are UTC.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `graphKey` (`string`, optional): No description.
- `limit` (`integer`, optional): No description.
- `offset` (`integer`, optional): No description.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_agent_skills`

Get Agent Skills · Read-only

AgentControl agent skills: versioned SKILL.md documents that AgentControl Config variations attach by {key, version}. These are not the LaunchDarkly workflow guides served by get-skills and load-skill. Without skillKey: list skills (query matches key, name, or description); when hasMore is true, pass nextOffset as offset. With skillKey: section skill (default) returns the latest version with its markdown; versions lists every version newest first with its markdown; references lists the variations that attach the skill and the version each one pins.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `limit` (`integer`, optional): Defaults to 25. Not used by section skill.
- `offset` (`integer`, optional): Pass nextOffset from the previous page.
- `query` (`string`, optional): Only without skillKey.
- `section` (`string`, optional): Only with skillKey. Defaults to skill. One of: `skill`, `versions`, `references`.
- `skillKey` (`string`, optional): No description.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_ai_config`

GetAiConfig · Read-only

Get details about a specific AI Config including its variations and metadata.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `configKey` (`string`, required): The key of the AI Config to retrieve.
- `projectKey` (`string`, required): The project key where the AI Config resides.

Example input: `{"configKey":"<configKey>","projectKey":"default"}`

### `launchdarklymcp_get_ai_config_health`

GetAiConfigHealth · Read-only

Get the health status of an AI Config including latency, error rates, and evaluation metrics.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `configKey` (`string`, required): The key of the AI Config to retrieve health status for.
- `environmentKey` (`string`, required): The environment key to retrieve health metrics from.
- `projectKey` (`string`, required): The project key identifying which project contains the AI Config.

Example input: `{"configKey":"<configKey>","environmentKey":"<environmentKey>","projectKey":"default"}`

### `launchdarklymcp_get_ai_config_status_across_envs`

GetAiConfigStatusAcrossEnvs · Read-only

Get the status of an AI Config across all environments in a project.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `configKey` (`string`, required): The key of the AI Config to retrieve status across all environments.
- `projectKey` (`string`, required): The project key identifying which project contains the AI Config.

Example input: `{"configKey":"<configKey>","projectKey":"default"}`

### `launchdarklymcp_get_ai_config_targeting`

GetAiConfigTargeting · Read-only

Get the targeting rules and rollout configuration for an AI Config in a specific environment.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `configKey` (`string`, required): The key of the AI Config to retrieve targeting rules for.
- `env` (`string`, required): The environment key to retrieve targeting configuration from.
- `projectKey` (`string`, required): The project key identifying which project contains the AI Config.

Example input: `{"configKey":"<configKey>","env":"<env>","projectKey":"default"}`

### `launchdarklymcp_get_ai_model_configs`

Get Ai Model Configs · Read-only

Get the AI model configs that AgentControl Config variations can select: global catalog models (global=true) and the project's custom models. Without keys: a page filtered by query (case-insensitive match on key or name, for example gpt-4o), tags, and restricted; when hasMore is true, pass nextOffset as offset. With keys: those model configs, and any not found in missingKeys; version (an integer from an earlier read) needs exactly one key. Pass a model config's key (for example OpenAI.gpt-4o) as modelConfigKey and its id (for example gpt-4o) as modelName on a variation. Costs are USD per token.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `keys` (`array`, optional): Model config keys to get. Not combined with query, tags, restricted, limit, or offset.
- `limit` (`integer`, optional): Defaults to 25.
- `offset` (`integer`, optional): Pass nextOffset from the previous page.
- `query` (`string`, optional): No description.
- `restricted` (`boolean`, optional): true returns only restricted models, false only unrestricted. Omit for both.
- `tags` (`array`, optional): Matches model configs with any of these tags.
- `version` (`integer`, optional): Only with exactly one key. Omit for the latest.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_ai_tools`

Get Ai Tools · Read-only

Without toolKey: list AI tool definitions in a project (limit). With toolKey: get one AI tool definition including its schema. With toolKey and section versions: list that tool's versions newest first, paged by limit and offset; when hasMore is true, pass nextOffset as offset. To attach a tool, put its key and version in a variation's tools array ({key, version}).

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `limit` (`integer`, optional): No description.
- `offset` (`integer`, optional): Only with section=versions. Pass nextOffset from the previous page.
- `section` (`string`, optional): Only with toolKey. Defaults to tool. versions pages by limit (1-100, default 25) and offset. One of: `tool`, `versions`.
- `toolKey` (`string`, optional): No description.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_alert_firing_history`

Get Alert Firing History · Read-only

Show when an alert actually fired, and what state it is in now.

This is the tool that answers "is this alert doing anything?". list-alerts cannot: disabled=false only means the alert is being evaluated, and updated_at is the last config edit, not the last firing. Use this to find stale alerts worth retiring, to check whether a threshold is reachable, and to confirm an alert still works after you retune it.

INPUTS:
- projectKey (required): The LaunchDarkly project key (e.g., "default").
- alertId (required): The numeric ID of the alert (from list-alerts)
- lookbackDays (optional, default 30): How far back to count firings. Must be positive.
- limit (optional, default 20, max 100): Max individual firing rows to return, newest first

RETURNS:
- firing_count: Total firings in the window. May exceed the rows returned — check truncated
- last_fired_at: Timestamp of the most recent firing, or null if it never fired in the window
- firings: Newest-first rows with timestamp, state, group_by_key, and investigation_conversation_id when an automatic investigation ran for that firing
- current_state: Latest state per group (any state, unwindowed). This is how you tell an alert firing RIGHT NOW from one that fired and resolved. States: Normal, Pending, Alerting, AlertingSilently, NoData, Error

Only Alerting transitions are counted, so firing_count is a count of real firings rather than of every state change.

Retention is not a constraint: the backing table has no TTL, so 30-, 60-, and 90-day windows are all equally valid. Pick the one that fits the question.

A current_state of NoData is a finding worth reporting — the alert's query matches nothing, so it can no longer fire regardless of threshold. That usually means the underlying service was renamed or stopped emitting.

Example usage:
{"projectKey": "default", "alertId": 42, "lookbackDays": 90}

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `alertId` (`number`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `includeIdleGroups` (`boolean`, optional): No description.
- `limit` (`number`, optional): No description.
- `lookbackDays` (`number`, optional): No description.

Example input: `{"alertId":1,"projectKey":"default"}`

### `launchdarklymcp_get_alerts`

Get Alerts · Read-only

Without alertId: list existing alerts as compact rows with each enabled alert's current state, 50 at a time; page with offset, and set fullConfig for investigation settings and destination IDs; check this before creating a new alert. Pass state=Alert to answer "what is firing right now" in one call. Filter by alert name with search; filter further by productType, disabled, query (text of the alert's own filter), destination, or tag. updated_at is the last config edit, not the last firing; use get-alert-firing-history for when and how often an alert fired. For project-wide stale, never-fired or unrouted alert questions, set audit (one firing lookup per alert, so slower) instead of looping get-alert-firing-history; say "no firings in the last N days", not "never fired". With alertId: get one alert's full configuration. Webhook URLs in destinations are masked.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): The LaunchDarkly project key (e.g., "default").
- `alertId` (`number`, optional): The numeric alert ID, from the list. Omit to list alerts; pass to get one alert.
- `audit` (`boolean`, optional): Without alertId. Instead of the list, return one row per alert with status: active (fired within inactiveDays), stale (fired within historyWindowDays only), never_fired, disabled (history not checked) or unknown (lookup failed), plus firings_in_history_window, last_fired_at, destination_types, no_destinations, last_edited_at, last_editor_uid and alert_url, sorted never_fired first; and summary, total_alerts and alerts_without_destinations. Other list filters do not apply.
- `destination` (`string`, optional): Only when listing. Destination kind (Slack, Webhook, Email, Jira) or a case-insensitive substring of its name, e.g. #ops-alerts.
- `disabled` (`boolean`, optional): Only when listing. true keeps disabled alerts, false keeps enabled ones.
- `fullConfig` (`boolean`, optional): Only when listing. Return each alert's full list configuration (threshold cooldown, destination IDs, investigation settings and repositories, updated_at) instead of the compact row. Defaults to false.
- `historyWindowDays` (`number`, optional): With audit. How far back to look for any firing, at most 3650 and at least inactiveDays. Defaults to 365.
- `inactiveDays` (`number`, optional): With audit. An enabled alert whose last firing is older than this many days is stale. Defaults to 30.
- `limit` (`number`, optional): Only when listing. Alerts to return, at most 200. Defaults to 50.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.
- `offset` (`number`, optional): Only when listing. Alerts to skip, for paging. Defaults to 0.
- `productType` (`string`, optional): Only when listing. Keep alerts on this data source. One of: `Logs`, `Traces`, `Errors`, `Sessions`, `Metrics`, `Events`, `PAEvents`, `LDCustomEvents`, `ExternalMonitor`.
- `query` (`string`, optional): Only when listing. Case-insensitive substring of the alert's filter, e.g. service_name=api.
- `search` (`string`, optional): Only when listing. Case-insensitive substring match on alert name.
- `state` (`string`, optional): Only when listing. Keep alerts whose most urgent current group state is this; Alert lists what is firing now. Disabled alerts have no state. One of: `Alert`, `Warn`, `Error`, `NoData`, `Normal`, `Unknown`.
- `tag` (`string`, optional): Only when listing. Alert tag key, or key=value, e.g. owner=team-o11y. Case-insensitive.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_approval_requests`

Get Approval Requests · Read-only

List approval requests, including applied (completed), scheduled, and failed requests. Pass projectKey, env, and flagKey or segmentKey (never both) for one flag or segment; only id for one request; or projectKey without a key for the whole project, the list its Approvals page shows across flags, segments, and AgentControl Configs. Given only an approval request id, call this tool with just id: it returns any approval request, whether for a flag, segment, or AgentControl Config, so never ask which kind it is. Pass status or reviewStatus to keep only some requests, for example reviewStatus ["pending"] and status ["pending"] for requests still awaiting review. Project-wide, also narrow by env, assignedToMemberIds (members asked to review; for requests waiting on the user, pass the id from get-member-self), requestedByMemberId, and resourceKind, and page with limit (default 20, max 200) and offset: results are newest first, nextOffset is set when more remain, and each request has resourceKind, resourceKey, and env. Each request has a url that opens it in LaunchDarkly. reviewStatus is the reviewers' decision: pending, approved, or declined. status is the change itself: pending, scheduled, completed (applied), or failed. Pass id to return only that request, for example to check whether it was approved; the id from create is enough on its own, and any key passed with it must match the request's resource. Each request lists its reviews with kind and comment, so a decline shows its reason. For integration-managed approvals with auto-apply on, reading a request can make LaunchDarkly apply it once approved. Timestamps in the result are UTC.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `assignedToMemberIds` (`array`, optional): Project-wide only: member IDs asked to review the request.
- `env` (`string`, optional): Environment key, required with flagKey or segmentKey. Project-wide, omit it for every environment.
- `flagKey` (`string`, optional): No description.
- `id` (`string`, optional): Return only this approval request.
- `limit` (`integer`, optional): Project-wide only: page size, default 20.
- `offset` (`integer`, optional): Project-wide only: results to skip, from nextOffset.
- `projectKey` (`string`, optional): Project key. If the user hasn't named one, ask; don't guess.
- `requestedByMemberId` (`string`, optional): Project-wide only: member ID of the requester.
- `resourceKind` (`string`, optional): Project-wide only: requests for this kind of resource; aiconfig is an AgentControl Config. One of: `flag`, `segment`, `aiconfig`.
- `reviewStatus` (`array`, optional): Keep only requests with these review decisions. Omit to list every decision.
- `segmentKey` (`string`, optional): No description.
- `status` (`array`, optional): Keep only requests whose change is in these statuses. Omit to list every status.

Example input: `{}`

### `launchdarklymcp_get_automated_rollout_config`

Get Automated Rollout Config · Read-only

Fetch a single automated rollout config by id to verify its state.

Use this after create-automated-rollout-config (which returns config_id) to confirm the rollout was recorded and to check its progress.

LIFECYCLE:
- pr_state: "pending" until the guarding PR merges, then "merged".
- status: "active" while releasing, then "complete", "expired", or "archived".

The config reports its execution_mode. Each environment reports its desired_release_type, trigger_type, wait_before_release_millis, the pinned override (if any), and release progress via released_at and associated_release_id (both set once the environment's release starts). An environment is editable with update-automated-rollout-config only while its status is "pending" and release_lifecycle_status is "not_started".

INPUTS:
- projectKey (required): LaunchDarkly project key (e.g., "default").
- configId (required): The rollout config id returned by create-automated-rollout-config.

RETURNS:
- found: Boolean; false when no config with that id exists for the project's account.
- config: The rollout config when found â { id, project_key, flag_key, repo_full_name, pr_number, pr_url, pr_state, deployment_trigger, merge_position, status, execution_mode, required_application_keys, created_at, updated_at, completed_at, environments: [{ environment_key, desired_release_type, trigger_type, status, release_lifecycle_status, wait_before_release_millis, associated_release_id, released_at, override: { release_method, rollout_context_kind_key, stages, metric_keys, metric_group_keys, rollback_on_regression } }] }. deployment_trigger is the git SHA stamped when the PR merged (null until the merge is ingested); merge_position is that commit's order on the base branch.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `configId` (`string`, required): Rollout config id returned by create-automated-rollout-config.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.

Example input: `{"configId":"<configId>","projectKey":"default"}`

### `launchdarklymcp_get_changes`

Get Changes · Read-only

Show what changed around a failure: one time-ordered timeline for a service and window that merges build version changes seen in traces, logs and errors, LaunchDarkly flag changes from the audit log, and the service's alert firings and config edits. Use it to answer "did a deploy or a flag change cause this?" before digging into traces. By default flag changes are only those the service's spans evaluated in the window (evaluated_by_service, the strongest link to the failure) or, when the service records no flag evaluations, those in environmentKey; set allFlagChanges for the rest. Alert firings of one alert and group less than two hours apart are one alert_episode row with firings and last_fired_at. When the timeline exceeds maxTokens the newest rows, nearest endDate, are kept.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): LaunchDarkly project key.
- `serviceName` (`string`, required): Exact service_name value, e.g. production-api; find it with get-keys key=service_name.
- `startDate` (`string`, required): Start: ISO 8601, a date, relative (now-6h) or epoch seconds. Start before the failure so the change that preceded it is inside the window.
- `alertIds` (`array`, optional): Alerts whose state changes to include. Omit to use alerts whose query names the service.
- `allFlagChanges` (`boolean`, optional): Also list flag changes the service did not evaluate in the window and changes outside environmentKey, including project-level ones. Defaults to false; sources.flags.omitted counts what was left out.
- `endDate` (`string`, optional): End, same formats. Defaults to now.
- `environmentKey` (`string`, optional): LaunchDarkly environment key whose flag changes to include, e.g. production. Omit for every environment.
- `maxFlagChanges` (`number`, optional): Flag audit-log entries to read, at most 200. Defaults to 100. When the window holds more, the newest page is read and the rest of the window is sampled in equal slices; sources.flags.sampling says how.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.
- `query` (`string`, optional): Extra observability filter ANDed with the service for the version and flag-evaluation lookups, e.g. environment=production.
- `versionKey` (`string`, optional): Attribute that holds the build version. Omit to try service_version, then tags.version, then version.

Example input: `{"projectKey":"default","serviceName":"<serviceName>","startDate":"<startDate>"}`

### `launchdarklymcp_get_context_instances`

GetContextInstances · Read-only

Get all stored instances of a specific context by kind and key. Returns every recorded occurrence of the context, including its full attribute set (e.g., merchantCountryCode, disbursementRail) and which SDK/application reported each instance.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `environmentKey` (`string`, required): Environment Key for this operation.
- `key` (`string`, required): Key for this operation.
- `kind` (`string`, required): Kind for this operation.
- `projectKey` (`string`, required): Project Key for this operation.
- `continuationToken` (`string`, optional): Continuation Token for this operation.
- `limit` (`number`, optional): Limit for this operation.

Example input: `{"environmentKey":"<environmentKey>","key":"<key>","kind":"<kind>","projectKey":"default"}`

### `launchdarklymcp_get_dashboards`

Get Dashboards · Read-only

Without dashboardId: list existing dashboards, with next_offset when more remain; set includeGraphs for each dashboard's graph stubs. Check this before creating a new dashboard. search matches dashboard names only; to find dashboards that chart a metric, service or query, set graphSearch (and productType), which also returns matched_graphs. maxQueriesPerDashboard returns graph queries to reuse. With dashboardId: get one dashboard with every graph's full definition, its template variables, kind (Standard graph grid or Brief analytical report), and time_preset. Graph queries can reference variables as $key; pass their defaultValues to preview-graph as variables.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): The LaunchDarkly project key (e.g., "default").
- `dashboardId` (`number`, optional): The numeric dashboard ID, from the list. Omit to list dashboards; pass to get one.
- `graphSearch` (`string`, optional): Only when listing. Case-insensitive text to find in a graph's title, query, metric series queries, SQL, services or environments, e.g. a metric or service name. Matching dashboards list it under matched_graphs.
- `includeGraphs` (`boolean`, optional): Only when listing. Include each dashboard's graph stubs (id, title, type, productType); by default only graph_count is returned.
- `limit` (`number`, optional): Only when listing. Maximum dashboards to return, at most 50 (default 10).
- `maxQueriesPerDashboard` (`number`, optional): Only when listing. Return up to this many graph queries per dashboard (at most 20) under queries, to reuse known-good filters. Defaults to 0.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.
- `offset` (`number`, optional): Only when listing. Dashboards to skip, most recently updated first; pass next_offset from the previous result for the next page. Defaults to 0.
- `productType` (`string`, optional): Only when listing. Keep dashboards with a graph on this data source: Logs, Traces, Errors, Sessions, Metrics, PAEvents, or Events; case-insensitive.
- `search` (`string`, optional): Only when listing. Filter dashboards by name.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_datasets`

Get Datasets · Read-only

Without datasetId: list offline datasets in a project (id, name, status, row count, creation info), paged by page and pageSize. With datasetId: get one dataset including its processing status and row count. Dataset status is pending, ready, or failed. Timestamps in the result are UTC.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `datasetId` (`string`, optional): No description.
- `page` (`integer`, optional): No description.
- `pageSize` (`integer`, optional): No description.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_doc`

GetDoc · Read-only

Fetch the full markdown content of a LaunchDarkly documentation page.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `url` (`string`, required): Url for this operation.

Example input: `{"url":"<url>"}`

### `launchdarklymcp_get_error_group`

Get Error Group · Read-only

Get one error group by secure_id with its state, stack and one occurrence (the latest unless errorObjectId or startDate picks another), with its trace_id, session, and next_id and previous_id. Set occurrences to list occurrences in a window instead. Frames carry link (GitHub source URL), in_app and source_map_error when known; top_frame adds code_before and code_after. include adds distribution (browser, OS, env, service, version) and trend for the window. _pivots gives get-trace and search-logs arguments for the occurrence's trace.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): LaunchDarkly project key.
- `secureId` (`string`, required): secure_id of the error group, from search-error-groups.
- `endDate` (`string`, optional): End, same formats. Defaults to now.
- `errorObjectId` (`number`, optional): ID of one occurrence, from occurrences or this tool's next_id and previous_id. Omit for the latest occurrence.
- `include` (`array`, optional): Extra context for the group over startDate to endDate (default the last 7 days): distribution (top browser, os_name, environment, service_name and service_version values with counts and percent) and trend (occurrence counts in up to 60 equal buckets, per minute for windows of an hour or less, with the peak bucket). Not with occurrences.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.
- `occurrences` (`number`, optional): List this many occurrences instead, newest first, at most 50 (id, timestamp, event, service, version, session_secure_id, error_url), plus totalCount. Needs startDate; not with errorObjectId.
- `page` (`number`, optional): With occurrences. Page number. Defaults to 1.
- `query` (`string`, optional): Filter that picks the occurrence, or with occurrences filters the list, e.g. service_name=web. Needs startDate.
- `startDate` (`string`, optional): Start: ISO 8601, a date, relative (now-1h) or epoch seconds. With it, the occurrence returned is the latest one in the window that matches query.

Example input: `{"projectKey":"default","secureId":"<secureId>"}`

### `launchdarklymcp_get_evaluations`

Get Evaluations · Read-only

Without evaluationId: list AI evaluation definition snapshots in a project (search by name, state active or archived, sortBy updatedAt or lastRun, limit, offset). With evaluationId: get one snapshot including prompts, models, criteria, and toolruntime. Timestamps in the result are UTC.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `evaluationId` (`string`, optional): No description.
- `limit` (`integer`, optional): No description.
- `offset` (`integer`, optional): No description.
- `search` (`string`, optional): No description.
- `sortBy` (`string`, optional): No description. One of: `updatedAt`, `lastRun`.
- `state` (`string`, optional): No description. One of: `active`, `archived`.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_experiments`

Get Experiments · Read-only

Without experimentKey: list experiments in a project, optionally filtered by environmentKey, flagKey, or status; each entry has key, name, description, and current iteration status. With experimentKey (environmentKey also required): get one experiment including its treatments, metrics, and current iteration status. Timestamps in the result are UTC.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `environmentKey` (`string`, optional): Environment key. If the user hasn't named one, ask; don't guess.
- `experimentKey` (`string`, optional): No description.
- `flagKey` (`string`, optional): No description.
- `limit` (`number`, optional): No description.
- `offset` (`number`, optional): No description.
- `status` (`string`, optional): No description.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_flag_code_references`

Get Flag Code References · Read-only

Get per-repository code-reference counts for one flag. Requires projectKey and flagKey. The flags map contains repository names, default branches, enabled state, hunkCount, fileCount, latestCommitTime, and links, not file paths or source hunks. Covers only default branches of repositories onboarded to code-reference scanning; an empty flags map is not proof of dead code, and disabled or stale scans need investigation. Use this evidence to identify other repositories to inspect during flag-safety review. Pair with get-flag-extinctions for removal history; neither proves that a change is correctly flag-gated.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `flagKey` (`string`, required): The flag key whose code references to check.
- `projectKey` (`string`, required): The project key. Ask if unknown.

Example input: `{"flagKey":"<flagKey>","projectKey":"default"}`

### `launchdarklymcp_get_flag_extinctions`

Get Flag Extinctions · Read-only

Get commits that removed the last code reference to one flag in scanned repositories. Requires projectKey and flagKey. Returns an items map keyed by repository name; each event has revision, message, time (Unix epoch milliseconds), flagKey, and projKey. Optional repoName and branchName narrow the search; without branchName, only default branches are queried. Supply from and to together in Unix epoch milliseconds to filter by commit time. Extinctions are historical: references may have been reintroduced, so also check current code-reference statistics and inspect relevant branches before treating a flag as unused. An empty result does not prove the flag has no references.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `flagKey` (`string`, required): The flag key whose removal history to read.
- `projectKey` (`string`, required): The project key. Ask if unknown.
- `branchName` (`string`, optional): Optional branch name; otherwise each repository's default branch is queried.
- `from` (`integer`, optional): Earliest commit time in Unix epoch milliseconds. Requires to.
- `repoName` (`string`, optional): Optional repository name.
- `to` (`integer`, optional): Latest commit time in Unix epoch milliseconds. Requires from.

Example input: `{"flagKey":"<flagKey>","projectKey":"default"}`

### `launchdarklymcp_get_flag_health`

GetFlagHealth · Read-only

Get health indicators for a feature flag including evaluation counts, error rates, and usage patterns.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `env` (`string`, required): The environment key to check flag health in.
- `flagKey` (`string`, required): The feature flag key to retrieve health indicators for.
- `projectKey` (`string`, required): The project key identifying which project contains the flag.

Example input: `{"env":"<env>","flagKey":"<flagKey>","projectKey":"default"}`

### `launchdarklymcp_get_flag_status_across_envs`

GetFlagStatusAcrossEnvs · Read-only

Get the on/off status and targeting summary for a feature flag across all environments in a project.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `flagKey` (`string`, required): The feature flag key
- `projectKey` (`string`, required): The project key
- `allEnvs` (`boolean`, optional): Include every environment instead of only the project's critical environments. Ignored when env is set.
- `env` (`string`, optional): Optional environment filter

Example input: `{"flagKey":"<flagKey>","projectKey":"default"}`

### `launchdarklymcp_get_flag_unique_context_exposures`

Get Flag Unique Context Exposures · Read-only

Get unique-context exposure counts (distinct-context cardinality) for a flag in an environment. Returns how many distinct users/accounts/etc. were actually exposed to the flag over a time window, broken down by context kind.

CRITICAL DISTINCTION: unique exposures are NOT evaluation counts. One context evaluated 10,000 times counts as 1 exposure (not 10,000). This ~1000x difference is critical for guarded rollout sizing. The guarded-release UI gates on this figure. For total SDK call counts use get-flag-evaluation-summaries.

from/to accept ISO 8601 strings or Unix millisecond timestamp strings (default: last 30 days).

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `envKey` (`string`, required): No description.
- `flagKey` (`string`, required): No description.
- `projectKey` (`string`, required): No description.
- `from` (`string`, optional): No description.
- `to` (`string`, optional): No description.

Example input: `{"envKey":"<envKey>","flagKey":"<flagKey>","projectKey":"default"}`

### `launchdarklymcp_get_flags`

Get Flags · Read-only

Without flagKey: search and browse feature flags; returns a paginated summary per flag (key, name, kind, tags, temporary, archived, deprecated, maintainer, and whether targeting is on) in one environment. Set includeDescription to also return each flag's description. Always set env to the environment the user named. With flagKey: get one flag scoped to env, with the full targeting tree (rules, individual targets, fallthrough, prerequisites) and variations. Each rule and each clause carries an `_id`; pass them as ruleId and clauseId to update-targeting-rules (addValuesToClause, removeValuesFromClause, updateClause) or create-approval-request to edit a clause in place.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): The project key
- `env` (`string`, optional): Environment key. Always set to the environment the user named.
- `expand` (`string`, optional): Only with flagKey. A comma-separated list of fields to expand in the response.
- `flagKey` (`string`, optional): The feature flag key. Omit to list flags; pass to get one flag.
- `includeDescription` (`boolean`, optional): Only without flagKey. Return each flag's description. Off by default.
- `limit` (`integer`, optional): No description.
- `maintainerId` (`string`, optional): No description.
- `maintainerTeamKey` (`string`, optional): No description.
- `offset` (`integer`, optional): No description.
- `query` (`string`, optional): No description.
- `sdkAvailability` (`string`, optional): No description. One of: `client`, `mobile`, `anyClient`, `server`.
- `sort` (`string`, optional): No description. One of: `creationDate`, `-creationDate`, `name`, `-name`.
- `state` (`string`, optional): No description. One of: `live`, `deprecated`, `archived`.
- `tags` (`array`, optional): No description.
- `type` (`string`, optional): No description. One of: `temporary`, `permanent`.
- `view` (`string`, optional): No description.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_incidents`

Get Incidents · Read-only

Read incidents from the incident.io workspace connected to this project, to learn whether one already exists for a problem and what responders found. Without incidentId: list the most recent 250 incidents, filtered by query and status (incident.io has no text search, so older matches are not found). With incidentId: one incident's roles, custom fields, status-update timeline, follow-ups and postmortem. Fails without retry when incident.io is not connected.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `incidentId` (`string`, optional): Incident id or numeric reference (123 for INC-123). Omit to list incidents.
- `includeFollowUps` (`boolean`, optional): With incidentId. Include post-incident follow-ups. Defaults to true.
- `includeUpdates` (`boolean`, optional): With incidentId. Include the status-update timeline. Defaults to true.
- `limit` (`number`, optional): Only when listing. At most 100. Defaults to 25.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.
- `query` (`string`, optional): Only when listing. Case-insensitive substring of reference, name, summary, severity or incident type.
- `status` (`string`, optional): Only when listing. Substring of the status name or category, e.g. active, triage, closed.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_investigation`

Get Investigation · Read-only

Read the automatic investigation that ran for an alert firing, so you can build on its diagnosis instead of investigating again. Pass the investigation_conversation_id from get-alert-firing-history. Returns its status, final answer and artifacts such as pull requests; set includeMessages for every turn. Cite the investigation's findings as its conclusions and check them against current data before acting. An investigation you neither started nor were shared returns an error naming that; retrying will not help.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `conversationId` (`string`, required): Investigation conversation id, from investigation_conversation_id in get-alert-firing-history or last_investigation_conversation_id in get-alerts.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `includeMessages` (`boolean`, optional): Also return every turn (role, text, tool calls). Defaults to false.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.

Example input: `{"conversationId":"<conversationId>","projectKey":"default"}`

### `launchdarklymcp_get_member_self`

GetMemberSelf · Read-only

Get the profile of the currently authenticated member, including their role and permissions.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `launchdarklymcp_get_metric_data_sources`

Get Metric Data Sources · Read-only

Warehouse-native metric data sources: each maps a SQL query, table, or view in a connected warehouse to metric events. Without dataSourceKey: list a project's data sources (environmentKey, integrationKey, archived, includeMetrics). With dataSourceKey: get one data source. With warehouseConnections true: list the warehouse connections bound to the project instead, with the environment each serves. includeMetrics adds the metrics built on each data source.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `archived` (`boolean`, optional): Listing data sources only. true lists only archived data sources, false only active ones. Omitted, the list shows active ones.
- `dataSourceKey` (`string`, optional): Get this data source.
- `environmentKey` (`string`, optional): Keep only data sources or connections for this environment. Not with dataSourceKey.
- `includeMetrics` (`boolean`, optional): Also return the metrics built on each data source. Gonfalon returns at most 10 metrics; metricsTotalCount is the full count. Not with warehouseConnections.
- `integrationKey` (`string`, optional): Keep only data sources or connections for this warehouse. Not with dataSourceKey. One of: `snowflake-experimentation`, `databricks-experimentation`, `redshift-experimentation`, `bigquery-experimentation`, `clickhouse-experimentation`.
- `warehouseConnections` (`boolean`, optional): List warehouse connections instead of data sources.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_metric_events`

Get Metric Events · Read-only

Metric event keys LaunchDarkly has observed. Without eventKey: list recently observed event keys (query, environmentKey, dataSourceKey, limit up to 50). With dataSourceKey and eventKey: check whether that warehouse data source has produced the event. ready false means it has not been seen yet; contextKinds are the analysis units a metric on the event can use.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `dataSourceKey` (`string`, optional): Warehouse metric data source key. Required with eventKey.
- `environmentKey` (`string`, optional): Listing only: keep events seen in this environment. Not with eventKey; a data source already belongs to one environment.
- `eventKey` (`string`, optional): Check this event key on dataSourceKey. Takes only projectKey and dataSourceKey alongside it.
- `limit` (`integer`, optional): Listing only. Defaults to 50. Not with eventKey.
- `query` (`string`, optional): Listing only: fuzzy match on event key. Not with eventKey.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_metrics`

Get Metrics · Read-only

LaunchDarkly metrics used by experiments and guarded rollouts; for observability metric names in a time window, use get-keys with productType metrics. Without metricKey: list metrics in a project (query, tags, eventKind, isNumeric, hasConnections, maintainerIds, maintainerTeamKey, metricUsedIn, dataSourceKeys, versionIds, sort, limit, offset). With metricKey: get full details for one metric. To find which metric a metric version ID belongs to (experiments reference metrics by version), list with versionIds. Timestamps in the result are UTC.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `dataSourceKeys` (`array`, optional): No description.
- `eventKind` (`string`, optional): No description.
- `hasConnections` (`boolean`, optional): No description.
- `isNumeric` (`boolean`, optional): No description.
- `limit` (`integer`, optional): No description.
- `maintainerIds` (`array`, optional): No description.
- `maintainerTeamKey` (`string`, optional): No description.
- `metricKey` (`string`, optional): No description.
- `metricUsedIn` (`string`, optional): No description.
- `offset` (`integer`, optional): No description.
- `query` (`string`, optional): No description.
- `sort` (`string`, optional): createdAt, name, connectionCount, or activeConnectionCount. Prefix with - for descending order.
- `tags` (`array`, optional): No description.
- `versionIds` (`array`, optional): Metric version IDs. Returns the metrics these versions belong to; each result carries its versionId.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_playgrounds`

Get Playgrounds · Read-only

Without playgroundId: list LLM playgrounds in a project (names, variant counts, timestamps); search by name, filter by status, paged by limit and offset. With playgroundId: get one playground including its variants (evaluation definitions and their positions). Timestamps in the result are UTC.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `limit` (`number`, optional): No description.
- `offset` (`number`, optional): No description.
- `playgroundId` (`string`, optional): No description.
- `search` (`string`, optional): No description.
- `status` (`string`, optional): No description.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_projects`

Get Projects · Read-only

Without projectKey: list LaunchDarkly projects in the account; use to discover project keys before calling project-scoped toolruntime. To find the project that holds a service's logs, traces or errors, use find-o11y-project instead of matching project names. query searches name or key (case-insensitive), tags filters (all must match), sort is name or -name. If the user named no project, search once with query and ask the user when no single project clearly matches; do not page. Next page: offset + limit. With projectKey: get one project with its environments; use to retrieve environments or verify a project exists. Set fullSettings to true (projectKey only) to also return every project-level setting under a settings object, such as defaultClientSideAvailability, snippet and view-association requirements, the full naming convention, and lifecycle settings (settings.lifecycle: requireReadyToArchive and the checks and day thresholds that decide whether archive-flag is allowed). Neither mode returns server-side SDK keys; use get-sdk-key.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `fullSettings` (`boolean`, optional): No description.
- `limit` (`number`, optional): No description.
- `offset` (`number`, optional): No description.
- `projectKey` (`string`, optional): Project key. If the user hasn't named one, ask; don't guess.
- `query` (`string`, optional): No description.
- `sort` (`string`, optional): No description. One of: `name`, `-name`.
- `tags` (`array`, optional): No description.

Example input: `{}`

### `launchdarklymcp_get_prompt_snippets`

Get Prompt Snippets · Read-only

Without snippetKey: list reusable prompt snippets in a project (filter, limit, offset). With snippetKey: get one snippet. Timestamps in the result are UTC.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `filter` (`string`, optional): No description.
- `limit` (`integer`, optional): No description.
- `offset` (`integer`, optional): No description.
- `snippetKey` (`string`, optional): No description.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_release_policies`

Get Release Policies · Read-only

List release policies and guarded-rollout metric settings.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_get_removal_readiness`

Get Removal Readiness · Read-only

Detailed safety check before removing a feature flag in one environment; env is required, so ask which environment when the user hasn't named one. Checks dependencies, code references, active targeting, expiring targets, and cross-environment status. Returns a readiness verdict: 'safe' (proceed), 'caution' (review warnings), or 'blocked' (must resolve blockers first). Always run this before archive-flag or delete-flag. Timestamps in the result are UTC.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `env` (`string`, required): Environment key
- `flagKey` (`string`, required): Feature flag key
- `projectKey` (`string`, required): LaunchDarkly project key

Example input: `{"env":"<env>","flagKey":"<flagKey>","projectKey":"default"}`

### `launchdarklymcp_get_resource_views`

Get Resource Views · Read-only

List the views a flag, segment, or AgentControl Config is linked to. Views are an Enterprise feature. Flags and AgentControl Configs are identified by key; segments additionally require `environmentId` because segments are environment-scoped.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): No description.
- `resourceKey` (`string`, required): No description.
- `resourceType` (`string`, required): No description. One of: `flags`, `segments`, `aiConfigs`.
- `environmentId` (`string`, optional): No description.
- `limit` (`number`, optional): No description.
- `offset` (`number`, optional): No description.

Example input: `{"projectKey":"default","resourceKey":"<resourceKey>","resourceType":"flags"}`

### `launchdarklymcp_get_rollout_completeness`

Get Rollout Completeness · Read-only

Check whether a feature flag is fully rolled out: every traffic-bearing environment serves one variation to all contexts, and a stability gate is met. A flag at 100% never looks inactive, so use this to find flags whose code path is dead and ready for cleanup. Serving is deterministic when targeting is off (off variation) or on with no rules, individual targets, prerequisites, or percentage rollout (fallthrough variation). Traffic-bearing environments have a status other than new and a lastRequested time. The stability gate passes when any environment is launched or the flag is at least stabilityDays old (default 14). Returns isFullyRolledOut, consensusVariation, per-environment results, and blockers. Timestamps in the result are UTC.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `flagKey` (`string`, required): Feature flag key
- `projectKey` (`string`, required): LaunchDarkly project key
- `envKeys` (`string`, optional): environment keys to check; default every environment of the flag
- `stabilityDays` (`string`, optional): minimum flag age in days that passes the stability gate when no environment is launched; default 14

Example input: `{"flagKey":"<flagKey>","projectKey":"default"}`

### `launchdarklymcp_get_sdk_key`

Get Sdk Key · Read-only

Return the server-side SDK key (sdk-...) for one environment. This is the only tool that returns that credential. Do not use get-environment, get-projects, get-keys, or get-sdk-active.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.

Example input: `{"environmentKey":"<environmentKey>","projectKey":"default"}`

### `launchdarklymcp_get_segments`

Get Segments · Read-only

Without segmentKey: list segments in one environment with rule counts and target counts, paged; query searches name or key, tags filters, view restricts to segments linked to a view. Always list first to avoid creating duplicates. With segmentKey: get one segment's rules, included and excluded user keys, includedContexts and excludedContexts for other context kinds, tags, and creation date. Timestamps in the result are UTC.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `limit` (`integer`, optional): No description.
- `offset` (`integer`, optional): No description.
- `query` (`string`, optional): No description.
- `segmentKey` (`string`, optional): Omit to list segments; pass to get one segment.
- `sort` (`string`, optional): No description. One of: `creationDate`, `-creationDate`, `name`, `-name`, `lastModified`, `-lastModified`.
- `tags` (`array`, optional): No description.
- `view` (`string`, optional): No description.

Example input: `{"environmentKey":"<environmentKey>","projectKey":"default"}`

### `launchdarklymcp_get_service_connections_usage`

GetServiceConnectionsUsage · Read-only

Get a time series of service connection minutes from your LaunchDarkly account. Use this for capacity planning, cost analysis, and before/after deploy comparisons (e.g. compare daily incremental minutes around a deploy date).

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `aggregationType` (`string`, optional): No description. One of: `month_to_date`, `incremental`.
- `connectionType` (`array`, optional): No description.
- `environmentKey` (`array`, optional): No description.
- `from` (`string`, optional): No description.
- `granularity` (`string`, optional): No description. One of: `daily`, `hourly`, `monthly`.
- `groupBy` (`array`, optional): No description.
- `projectKey` (`array`, optional): No description.
- `relayVersion` (`array`, optional): No description.
- `sdkName` (`array`, optional): No description.
- `sdkType` (`array`, optional): No description.
- `sdkVersion` (`array`, optional): No description.
- `to` (`string`, optional): No description.

Example input: `{}`

### `launchdarklymcp_get_session_details`

Get Session Details · Read-only

Get one session's details in one call: the session row, its frontend errors, a network resource summary, web vitals, rage clicks, and active and idle intervals; choose sections with include. _pivots gives ready-made arguments for the logs, traces, errors, flag evaluations and timeline of the session's window. When you reference the session, wrap its ID in <session-id></session-id> so the UI can link it.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): LaunchDarkly project key.
- `sessionSecureId` (`string`, required): Secure ID of the session, e.g. from search-sessions.
- `include` (`array`, optional): Sections to return. Defaults to all of them.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.

Example input: `{"projectKey":"default","sessionSecureId":"<sessionSecureId>"}`

### `launchdarklymcp_get_session_event_chunks`

Get Session Event Chunks · Read-only

List the rrweb event chunks recorded for a session.
Session replay events are stored in chunks; this returns one entry per chunk with chunk_index and the chunk's start timestamp (epoch millis).
Use it to see how a session's recording is segmented, then fetch a specific chunk's raw contents with get-session-event-chunk-url.

REQUIRED INPUTS:
- projectKey: The LaunchDarkly project key (e.g., "default").
- sessionSecureId: The secure ID of the session to list event chunks for. REQUIRED.

The session's chunked field (from query-sessions) tells you whether chunks exist — unchunked (very short or old) sessions return an empty list.
For a cheap chronological overview of a session prefer query-timeline-events; only fetch raw chunks when you need actual DOM/interaction detail.

Here's an example of a valid input:
{"projectKey": "default", "sessionSecureId": "abc123def456"}

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): LaunchDarkly project key.
- `sessionSecureId` (`string`, required): Secure ID of the session, e.g. from search-sessions.
- `index` (`integer`, optional): chunk_index of one chunk to download. Omit to list the chunks.
- `timestamp` (`string`, optional): ISO 8601 moment with a timezone, e.g. 2024-01-15T10:00:00Z, to download the chunk covering it. Omit to list the chunks.

Example input: `{"projectKey":"default","sessionSecureId":"<sessionSecureId>"}`

### `launchdarklymcp_get_skills`

Get Skills · Read-only

List the LaunchDarkly skill guides this server ships. Each guide carries the workflow, the safety checks, and the tool sequence for one task: deciding whether to flag a change, flag creation, flag targeting, guarded rollouts, automated releases, end-to-end PR flagging, flag discovery, flag cleanup, experiment setup, metric choice, creation, and instrumentation, and observability work: investigations across logs, traces, errors, and sessions, alert triage, query syntax, OpenTelemetry metrics, charts, and alert creation and cleanup.

Returns each guide's `skill` key, `description`, and available `references`. Use `load-skill` with a `skill` key to read the guide.

With no `query`, returns every guide. With a `query`, returns ranked matches.

Examples:
- query: `rollout monitoring` â finds the guarded rollout guide
- query: `remove flag from code` â finds the flag cleanup guide
- query: `conversion event tracking` â finds the metric guides
- query: `stale noisy alerts` â finds the alert management guide

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `query` (`string`, optional): No description.

Example input: `{}`

### `launchdarklymcp_get_trace`

Get Trace · Read-only

Get one trace by ID as a span tree with each span's service, duration, self_ms (time not spent in children) and status, plus completeness and error groups. For latency read top_self_time (5 spans with the most own time) and critical_path (spans the root waited on, walking back from each end to the last-finishing child, with critical_ms); both cover hidden spans. Attributes appear only for expandSpanId. For large traces set onlyServiceEntrySpans; maxTokens also caps the spans shown. Pass a known span time as timestamp, not startDate.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): LaunchDarkly project key.
- `traceId` (`string`, required): Trace ID, e.g. traceID from search-traces or search-logs.
- `endDate` (`string`, optional): End of the lookup window when timestamp is omitted, in the same formats as startDate. Defaults to now.
- `expandSpanId` (`string`, optional): Span ID to return with its full attributes (e.g. http.route, exception details) and with its subtree never collapsed.
- `maxSpans` (`number`, optional): Spans to show in the tree, at most 500. Defaults to 100; the rest are counted in hidden_child_spans_count.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.
- `onlyServiceEntrySpans` (`boolean`, optional): Show only root spans, spans whose service differs from their parent's, and spans with errors; hidden spans are counted in hidden_child_spans_count. Defaults to false.
- `startDate` (`string`, optional): Only without timestamp. Start of the window to look the trace up in: ISO 8601 or relative to now, e.g. now-6h. Defaults to 24 hours before endDate.
- `timestamp` (`string`, optional): When any span in the trace ran, ISO 8601 with a timezone, e.g. its search-traces timestamp. Pass it whenever you know a span time: spans within an hour of it are read directly. Omit it only when no span time is known; the trace is then looked up between startDate and endDate.

Example input: `{"projectKey":"default","traceId":"<traceId>"}`

### `launchdarklymcp_get_views`

Get Views · Read-only

Views are an Enterprise feature. Without viewKey: list views (key, name, description, tags, maintainer; linked-resource counts when includeResourceSummary is set); query searches by name, tags filters, sort is key, name, or updatedAt (default updatedAt, most recent first). Responses include totalCount and pageInfo.offset; for the next page set offset to the current offset + limit. With viewKey: get one view with name, description, tags, maintainer, and linked-resource counts (flags, segments, AgentControl Configs); use list-view-resources to enumerate the linked resources themselves. Timestamps in the result are UTC.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `includeResourceSummary` (`boolean`, optional): No description.
- `limit` (`number`, optional): No description.
- `offset` (`number`, optional): No description.
- `query` (`string`, optional): No description.
- `sort` (`string`, optional): No description. One of: `key`, `name`, `updatedAt`.
- `tags` (`array`, optional): No description.
- `viewKey` (`string`, optional): No description.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_getenvironment`

GetEnvironment · Read-only

Get details about a specific environment in a project, including its keys and settings.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `environmentKey` (`string`, required): The key of the environment to retrieve.
- `projectKey` (`string`, required): The key of the project that contains the environment.

Example input: `{"environmentKey":"<environmentKey>","projectKey":"default"}`

### `launchdarklymcp_getevaluationrunsummary`

GetEvaluationRunSummary · Read-only

Get the summary results of a completed evaluation run, including pass/fail counts and aggregate scores.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `evaluationId` (`string`, required): The unique identifier of the evaluation definition.
- `projectKey` (`string`, required): The project key identifying which project the evaluation belongs to.
- `runId` (`string`, required): The unique identifier of the evaluation run to retrieve the summary for.

Example input: `{"evaluationId":"<evaluationId>","projectKey":"default","runId":"<runId>"}`

### `launchdarklymcp_getexperimentmetricresults`

GetExperimentMetricResults · Read-only

Get detailed statistical results for a single metric on an experiment iteration. Returns, per treatment: sample sizes (analyzedUnitCount, trafficCount, conversionCount), the observed mean and standard deviation, and a `statistics` block with the lift versus control (relativeDifferences: estimate plus lower/upper interval bounds and, for frequentist experiments, a per-comparison pValue), the overall pValue, Bayesian probabilities (probabilityToBeBest, probabilityToBeatBaseline, expectedLoss), and an isSignificant flag. Reads from LaunchDarkly's internal analysis API. Defaults to the current iteration and the latest analysis; pass iterationId to target a previous iteration. Use disableMultipleComparisonCorrection / disableSequentialTesting to see uncorrected numbers. Use get-experiment-results for a cross-metric overview, or get-experiment to discover metric keys.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `environmentKey` (`string`, required): Environment Key for this operation.
- `experimentKey` (`string`, required): Experiment Key for this operation.
- `metricKey` (`string`, required): Metric Key for this operation.
- `projectKey` (`string`, required): Project Key for this operation.
- `disableMultipleComparisonCorrection` (`boolean`, optional): Disable Multiple Comparison Correction for this operation.
- `disableSequentialTesting` (`boolean`, optional): Disable Sequential Testing for this operation.
- `iterationId` (`string`, optional): Iteration Id for this operation.

Example input: `{"environmentKey":"<environmentKey>","experimentKey":"<experimentKey>","metricKey":"<metricKey>","projectKey":"default"}`

### `launchdarklymcp_getexperimentresults`

GetExperimentResults · Read-only

Get an overall results summary for an experiment, across every metric on the current iteration. Discovers the iteration's metrics, then fetches each metric's analysis from LaunchDarkly's internal results API and returns a compact per-metric summary: which treatment is leading (isBest) — the arm with the highest probability to beat the baseline for Bayesian experiments, or the lowest p-value versus control for frequentist (note: not significance-gated, so a treatment can be flagged leading even when nothing is significant) — each treatment's lift versus control, whether it's statistically significant, and sample sizes. Pass iterationId to summarize a previous iteration. For the full per-treatment statistics (intervals, p-values, Bayesian probabilities) on one metric, use get-experiment-metric-results.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `environmentKey` (`string`, required): Environment Key for this operation.
- `experimentKey` (`string`, required): Experiment Key for this operation.
- `projectKey` (`string`, required): Project Key for this operation.
- `disableMultipleComparisonCorrection` (`boolean`, optional): Disable Multiple Comparison Correction for this operation.
- `disableSequentialTesting` (`boolean`, optional): Disable Sequential Testing for this operation.
- `iterationId` (`string`, optional): Iteration Id for this operation.

Example input: `{"environmentKey":"<environmentKey>","experimentKey":"<experimentKey>","projectKey":"default"}`

### `launchdarklymcp_getkeys`

GetKeys · Read-only

Discover available data keys/dimensions for a product type.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `productType` (`string`, required): One of logs, traces, sessions, errors, metrics, paevents, or events; case-insensitive. Use paevents for product-analytics events (keys like type, key, view_name); events is the legacy session_events source.
- `projectKey` (`string`, required): LaunchDarkly project key.
- `startDate` (`string`, required): Start: ISO 8601 (2024-01-15T10:00:00Z), a date, relative (now-1h, now-7d) or epoch seconds.
- `endDate` (`string`, optional): End, same formats. Defaults to now.
- `key` (`string`, optional): An observability attribute key from this tool's key list, e.g. service_name; not a flag or project key. Set it to get that key's observed values ranked by frequency instead of the key list.
- `limit` (`number`, optional): Keys to return, at most 100. Defaults to 25. With key, values to return, 1-100, default 30.
- `search` (`string`, optional): Filter keys by name, or with key, a substring of the values.

Example input: `{"productType":"<productType>","projectKey":"default","startDate":"<startDate>"}`

### `launchdarklymcp_getsdkactive`

GetSdkActive · Read-only

Check whether any SDKs have been active in a given environment. Returns true if any SDK has initialized or sent events in the environment. Use this to verify that an environment is actually in use before cleanup. Optionally filter by sdkName or sdkWrapperName to check a specific SDK.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `purpose` (`string`, optional): No description. One of: `ai`.
- `sdkName` (`string`, optional): No description.
- `sdkWrapperName` (`string`, optional): No description.

Example input: `{"environmentKey":"<environmentKey>","projectKey":"default"}`

### `launchdarklymcp_list_ai_configs`

ListAiConfigs · Read-only

List all AI Configs in a project with their current status and variation count.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): The project key to list AI Configs from.
- `limit` (`number`, optional): Maximum number of AI Configs to return per page.
- `offset` (`number`, optional): Offset for pagination.
- `query` (`string`, optional): Search query to filter AI Configs by name or key.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_list_view_resources`

List View Resources · Read-only

List the resources of one type linked to a view. Views are an Enterprise feature. Returns resource keys with link timestamps (and environment info for segments). Use query for a case-insensitive search on resource keys.

Sorting: use `sort` with `linkedAt` (default) or `name`.

Pagination: responses include `totalCount` and `pageInfo.offset`. To get the next page, set `offset` to the current offset + limit.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): No description.
- `resourceType` (`string`, required): No description. One of: `flags`, `segments`, `aiConfigs`.
- `viewKey` (`string`, required): No description.
- `limit` (`number`, optional): No description.
- `offset` (`number`, optional): No description.
- `query` (`string`, optional): No description.
- `sort` (`string`, optional): No description. One of: `linkedAt`, `name`.

Example input: `{"projectKey":"default","resourceType":"flags","viewKey":"<viewKey>"}`

### `launchdarklymcp_match_release_policies`

MatchReleasePolicies · Read-only

Resolve which release policies would govern a flag in a given environment — a read-only dry-run of the server-side policy matching logic. Does not create or modify anything.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `flagKey` (`string`, optional): No description.
- `flagTags` (`array`, optional): No description.

Example input: `{"environmentKey":"<environmentKey>","projectKey":"default"}`

### `launchdarklymcp_previewgraph`

PreviewGraph · Read-only

Preview a chart/graph inline WITHOUT saving it to a dashboard.
Always use this tool first when a user asks to create or visualize a chart.
Returns both the graph configuration and the queried metrics data so the user can see the chart rendered inline. After showing the preview, ask the user if they want to save it to a dashboard (using create-graph).

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `expressions` (`array`, required): Aggregations, e.g. [{"aggregator":"Count","column":""}] or [{"aggregator":"P90","column":"duration"}].
- `productType` (`string`, required): Data source: Logs, Traces, Errors, Sessions, Metrics, PAEvents, or Events; case-insensitive. PAEvents is the product-analytics source the graph editor shows: filter custom events with type="track" key="<name>" and page or screen views with type="*_view" view_name="<path>". Events is the legacy session_events source, filtered with event="<name>".
- `projectKey` (`string`, required): LaunchDarkly project key.
- `title` (`string`, required): Chart title, e.g. Error Rate by Service.
- `type` (`string`, required): Chart type: "Line chart", "Bar chart", or "Table".
- `bucketCount` (`number`, optional): Number of time buckets, at most 300. Defaults to 12. Set it to 1 for a single total per group over the whole window.
- `display` (`string`, optional): Exact style value. Line chart: Line, Stacked, or Stacked area. Bar chart: Stacked or Grouped.
- `endDate` (`string`, optional): End, same formats. Defaults to now.
- `groupBy` (`array`, optional): Dimension keys from get-keys, e.g. ["level"].
- `groupByLimit` (`number`, optional): Maximum groups when groupBy is set, at most 50. Defaults to 5.
- `query` (`string`, optional): Filter in search syntax, e.g. level=error. A dashboard query's $key references need variables.
- `startDate` (`string`, optional): Start: ISO 8601, a date, relative (now-6h) or epoch seconds. Defaults to 24 hours before endDate.
- `variables` (`object`, optional): Template variable values by key, substituted for $key as the dashboard does, e.g. {"env": ["production"]}. Use a dashboard's defaultValues from get-dashboards.

Example input: `{"expressions":[],"productType":"<productType>","projectKey":"default","title":"<title>","type":"<type>"}`

### `launchdarklymcp_query_funnel`

Query Funnel · Read-only

Count how many sessions (or other groups) reach each step of an ordered funnel, where each step is a logs, traces, or product-analytics events search query, e.g. step=landing then step=signup. Step N counts groups that matched every step up to N; with strictOrder each step must also come strictly after the previous one. Returns per-step counts and conversion ratios as totals over the whole window, not time buckets; with breakdownBy, one funnel per cohort in groups.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `productType` (`string`, required): Source every step searches: logs, traces, or paevents for product-analytics events (track, page and screen views, clicks; filter custom events with type="track" key="<name>"). One of: `logs`, `traces`, `paevents`.
- `projectKey` (`string`, required): LaunchDarkly project key.
- `startDate` (`string`, required): ISO 8601 start time with a timezone, e.g. 2024-01-15T10:00:00Z.
- `steps` (`array`, required): Funnel steps in order, 1 to 10.
- `breakdownBy` (`string`, optional): Key, or array of keys, splitting the funnel into cohorts, e.g. environment. Each cohort's group lists the values in the same order.
- `breakdownLimit` (`number`, optional): Maximum cohorts returned with breakdownBy, largest first; 1 to 100, defaults to 10.
- `endDate` (`string`, optional): ISO 8601 end time with a timezone. Defaults to now.
- `groupBy` (`string`, optional): Key, or array of keys, identifying who moves through the funnel. Defaults to secure_session_id; use e.g. context.contextKeys.user to follow users across sessions. Records with an empty key are skipped.
- `query` (`string`, optional): Base filter ANDed into every step, e.g. service_name=web. Empty adds no filter. Query syntax: see QUERY SYNTAX in the search-aggregations tool description; a bad clause is dropped silently and widens results.

LOG SEARCH: to find logs that mention or contain some words, the query is just those words: logs mentioning a connection reset means query: connection reset. Bare words search the log message as whole words (graphql request matches messages with both words); every other field is an attribute. There is no contains operator and no message prefix is needed: message contains "x" also requires the words message and contains. Common attributes: level, service_name, service_version, environment, source, secure_session_id, trace_id, span_id, code.filepath, code.function, host.name. secure_session_id EXISTS keeps only logs tied to a session.
SPEED: bare words in the message (recovered panic) are whole-word, index-assisted matches; *x*, "quoted phrases" and message:"..." / message="..." are substring scans that read every message in the window and can time out over days. Write the words bare with no field, operator or quotes (query: recovered panic, not "recovered panic", message:"recovered panic" or message contains "recovered panic"), even for multi-word requests; use *x* or a quoted phrase only when the user asks for an exact phrase or the bare words return too much, or add an attribute filter (service_name=..., level=error).
- `strictOrder` (`boolean`, optional): When true, a group counts for a step only if its first matching record comes strictly after its record for the previous step. Defaults to false (any order).

Example input: `{"productType":"logs","projectKey":"default","startDate":"<startDate>","steps":[]}`

### `launchdarklymcp_search_aggregations`

Search Aggregations · Read-only

Compute time-bucketed aggregates (counts, sums, averages, percentiles) for a product type; prefer it to raw queries for trends, group comparisons, or windows over 24 hours; for services ranked by error rate, request count or p95, or one service's health by endpoint, use search-service-map with include health. Pass expressions or the functionType and column shorthand, not both. For metrics the column is value; for traces duration, in nanoseconds. Each expression is labelled with the aggregator the backend ran; check it. If estimated is true, values are sampled (see sampling); set exact for exact values, and heed low_sample: a sampled percentile over few rows is noise. For a monotonic counter, Sum over the window is its increase. For counts per hour or per day, set bucketCount to the number of hours or days; rate is only for per-second style rates. Ratios: series and formulas; period-over-period: compareTo; is it abnormal: anomaly; metric to trace: exemplars; dropped at ingest: includeIngest. populationFunctionType aggregates twice, per groupBy value then across values, e.g. the Max of each pod's Avg.

QUERY SYNTAX (summary; load-skill observability/querying-patterns has the full grammar): a filter only, no pipes, SELECT or aggregation; empty matches everything in the window.
- key=value with = != < <= > >= EXISTS NOT EXISTS. Adjacent terms are AND; OR, NOT and parentheses group (NOT binds tightest, then AND, then OR); service_name=(api OR worker) groups values.
- = is exact and case-sensitive. A * makes an unanchored, case-insensitive contains match; anchor with a regex: span_name=/^gorm\./. A bare term matches a whole word of the default key (log message, span name, error event).
- In key=value, quote a value containing spaces or = > < : ! ( ): url.query="*utm_source=newsletter*", not url.query=*utm_source=newsletter*. Bare terms with no key need no quotes: quoting them turns whole-word matches into a slower substring scan.
- Durations: 500ms, 2s, 24h (integers; no d). Traces duration is in nanoseconds.
- Keys are case-sensitive snake_case. Confirm one with get-keys search=<name>; list real values with get-keys key=<name>.
SILENT FAILURES: invalid syntax never errors; the bad clause is dropped and results get WIDER. key= with no value adds no filter; a trailing key!= negates the previous clause. Check that a filter narrowed the results before concluding data is absent.

SERVICE NAMES: one system may report under several environment-prefixed service_name values (prod-api, staging-api, prod-api-worker). Before concluding a count is complete, list the family with get-keys key=service_name search=<name> and filter with service_name=(a OR b); a * wildcard is an unanchored contains match and also pulls in sibling services.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `productType` (`string`, required): Data to aggregate. Use metrics for OpenTelemetry metric data points, paevents for product-analytics events (filter custom events with type="track" key="<name>"), and events only for the legacy session_events source (filter with event="<name>"). One of: `errors`, `traces`, `requests`, `logs`, `sessions`, `metrics`, `paevents`, `events`.
- `projectKey` (`string`, required): LaunchDarkly project key.
- `startDate` (`string`, required): Start: ISO 8601 (2024-01-15T10:00:00Z), a date, relative (now-1h, now-7d) or epoch seconds.
- `anomaly` (`boolean`, optional): Fit an expected band to each group's series and flag buckets outside it: each series gains expected_lower and expected_upper, and anomaly lists the anomalous buckets. Needs one expression, bucketCount of at least 8, and no series, rate or populationFunctionType. Slower: the backend fits a model per group.
- `anomalyDirection` (`string`, optional): With anomaly: flag values above the band, below it, or both (default). One of: `both`, `above`, `below`.
- `anomalySensitivity` (`number`, optional): With anomaly: the share of normal values the band covers, 0.5-0.99, default 0.95. Higher flags fewer, more extreme buckets.
- `bucketCount` (`number`, optional): Number of time buckets, at most 300. Defaults to 10, so omitting it returns a time series. Set it to 1 for a single total per group over the whole window.
- `column` (`string`, optional): Field for functionType; required for every functionType except Count.
- `compareTo` (`string`, optional): Period-over-period offset: a whole number with m, h, d or w, e.g. 1h, 1d, 1w. Reruns the same query over the window shifted back by it and adds the earlier values with the same bucket position, group and column: previous_values on each series, or previous (keyed by expression) on each row; comparison_window gives the shifted dates. A group missing from the earlier top groups has no previous value.
- `endDate` (`string`, optional): End, same formats. Defaults to now.
- `environments` (`array`, optional): Exact environment values to restrict to, e.g. ["Production"]; values are case-sensitive, so list them with get-keys key=environment.
- `exact` (`boolean`, optional): Read every matching row instead of a sample. Slower on wide windows. Set it when the answer needs a precise count, a small or rare-event count, or a distinct count, or when a previous response had estimated true. Defaults to false.
- `exemplarLimit` (`number`, optional): With exemplars: how many to return, 1-50, default 10.
- `exemplars` (`boolean`, optional): productType metrics only: also return exemplars, the trace and session IDs recorded with matching data points, each with get_trace arguments to open the trace. Kept for 30 days.
- `expressions` (`array`, optional): Aggregations per bucket, for several at once. Every aggregator except Count needs a column. Without expressions or functionType, a plain Count.

RECIPES: first and last seen per group: expressions [{"aggregator":"Min","column":"timestamp"},{"aggregator":"Max","column":"timestamp"}] with bucketCount 1; values are Unix seconds. Browser web vitals are metrics named LCP, INP, CLS, FCP, TTFB, and FID (productType metrics, column value, group by metric_name and filter service_name to the frontend); CLS is unitless, the rest are milliseconds, and P75 is the usual summary.
- `formulas` (`array`, optional): Expressions over the series letters, evaluated per bucket and group: + - * / ^, parentheses and numbers, e.g. 100 * b / a for an error percentage. Each formula is one output column, named by its label or else the formula. Divide by zero or a missing series value gives no metric_value. Defaults to one formula per series letter, which returns the series themselves.
- `functionType` (`string`, optional): Shorthand for one expression, with column. Do not combine with expressions. One of: `Count`, `CountDistinct`, `CountDistinctKey`, `Min`, `Avg`, `P50`, `P75`, `P90`, `P95`, `P99`, `Max`, `Sum`.
- `groupBy` (`string`, optional): Key, or array of keys for a composite group, e.g. service_name or ["service_name","level"]; metric_name for metrics. Each bucket's group lists the values in the same order.
- `groupByLimit` (`number`, optional): Maximum groups returned when groupBy is set, at most 100. Defaults to 5. Groups are ranked by rankBy, highest first; set bucketCount to 1 for many groups.
- `includeIngest` (`boolean`, optional): Also return ingest: the project's sampling rate, per-minute rate limit, exclusion query, enabled filter rules and quota state for this product, any of which drops data before it is stored; completeness_note says in one line when this product is sampled, rate-limited, filtered or over quota right now. Use it when counts look too low or a spike looks capped.
- `includeOther` (`boolean`, optional): With groupBy, also return one series per time bucket that folds every group past groupByLimit, marked is_other with group "Other", so the groups add up to the ungrouped total. Count, Sum, Min and Max only. Defaults to false.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.
- `minCount` (`number`, optional): With groupBy, skip groups with fewer records than this over the whole window (for metrics, observations), so rare or junk values do not take the top slots. The response lists ranked_groups with each group's rank_value and count.
- `populationFunctionType` (`string`, optional): Second-pass aggregator for time vs space aggregation. Each groupBy value (e.g. k8s.pod.name) is first reduced inside each bucket with the expression's aggregator, then those per-value results are reduced across values with this one: aggregator Avg, populationFunctionType Max is the max across pods of each pod's average. The groups collapse into one series, so group is empty and groupByLimit is ignored. Needs groupBy; not with series. One of: `Count`, `Min`, `Avg`, `P50`, `P75`, `P90`, `P95`, `P99`, `Max`, `Sum`.
- `query` (`string`, optional): Filter, e.g. error EXISTS AND service_name=foo. Empty aggregates all records.

Query syntax: see QUERY SYNTAX in this tool's description.

GROUPING SPANS: server spans from HTTP middleware are often named only by method (GET, POST). To rank or compare endpoints, filter span_kind=Server and group by http.route, not span_name. When middleware adds an inner server span, both spans carry http.route and route counts are about twice the request count; the span_name grouping (bare GET next to GET /route) shows whether that applies.
- `rankBy` (`object`, optional): Aggregation that picks the top groups, highest first, e.g. {"aggregator":"Count","column":""} for the busiest groups while expressions report P95. Defaults to the first expression. Count and CountDistinctKey rank by record count; for metrics, Count ranks by observations.
- `rankOrder` (`string`, optional): With groupBy: DESC (default) keeps the groups with the largest rankBy value, ASC the smallest, e.g. the least-requested routes or the services with the lowest p50. One of: `DESC`, `ASC`.
- `rate` (`string`, optional): Return each bucket's Count or Sum as a rate: the value divided by bucket_window_seconds (the bucket width, also returned), times 60 for per_minute or 3600 for per_hour. Use it for request or error rates instead of dividing yourself. Rejected for other aggregators and with formulas; with series alone, each series comes back as a rate. One of: `per_second`, `per_minute`, `per_hour`.
- `series` (`array`, optional): Up to five input series for formulas, each with its own filter and one aggregator; they share productType, the window, groupBy and buckets. With series, leave query, functionType, column and expressions unset. Each series ranks its own top groups, so a group outside one series' top groups gives a null formula value.
- `services` (`array`, optional): Exact service_name values to restrict to, e.g. ["checkout-api"]. Same rows as service_name=(a OR b) in query, but with environments also set a sampled query reads a finer sample.

Example input: `{"productType":"errors","projectKey":"default","startDate":"<startDate>"}`

### `launchdarklymcp_search_change_history`

Search Change History · Read-only

Query the audit log to find what changed in a LaunchDarkly account. Returns changes newest first with who made each change and what they did. Filter by project, environment, resource kind or key, tags, text, and ISO 8601 dates. resourceKey requires resourceKind, the resource type such as flag, segment, view, or member; use the kind the request names, and if it names a key without its kind, ask which kind it is instead of omitting it. When hasMore is true, use nextBefore as endDate for the next page. Timestamps in the result are UTC.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `endDate` (`string`, optional): No description.
- `env` (`string`, optional): Environment key. If the user hasn't named one, ask; don't guess.
- `limit` (`integer`, optional): No description.
- `projectKey` (`string`, optional): Project key. If the user hasn't named one, ask; don't guess.
- `query` (`string`, optional): No description.
- `resourceKey` (`string`, optional): Set resourceKind with it.
- `resourceKind` (`string`, optional): Required whenever resourceKey is set. The resource type the request names, such as flag, segment, view, or member.
- `startDate` (`string`, optional): No description.
- `tags` (`array`, optional): No description.

Example input: `{}`

### `launchdarklymcp_search_contexts`

SearchContexts · Read-only

Search for stored LaunchDarkly contexts in an environment by kind, key, or attribute value. Returns context records including their stored attributes (e.g., merchantCountryCode, disbursementRail) and when the context was last seen.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `environmentKey` (`string`, required): No description.
- `projectKey` (`string`, required): No description.
- `continuationToken` (`string`, optional): No description.
- `filter` (`string`, optional): No description.
- `kind` (`string`, optional): No description.
- `limit` (`number`, optional): No description.

Example input: `{"environmentKey":"<environmentKey>","projectKey":"default"}`

### `launchdarklymcp_search_docs`

SearchDocs · Read-only

Search LaunchDarkly documentation to retrieve authoritative reference material for flags, targeting rules, experiments, segments, AgentControl configs, SDKs, API fields, rollouts, metrics, and more.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `query` (`string`, required): No description.

Example input: `{"query":"<query>"}`

### `launchdarklymcp_search_error_groups`

Search Error Groups · Read-only

Query error groups whose occurrences match a filter in a time window. Only OPEN groups unless state says otherwise. Each group's in_window block covers only matching occurrences; its event, serviceName, and environments are first-seen values, and a group can hold unrelated messages. Filter on exception.message; event and bare terms match only the original title. For one session's groups, query secure_session_id=<id> or use get-session-details. For one group's occurrences, trace_id and session, use get-error-group.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): LaunchDarkly project key.
- `startDate` (`string`, required): Start: ISO 8601 (2024-01-15T10:00:00Z), a date, relative (now-1h, now-7d) or epoch seconds.
- `count` (`number`, optional): Groups to return, at most 50. Defaults to 10.
- `endDate` (`string`, optional): End, same formats. Defaults to now.
- `page` (`number`, optional): Page number. Defaults to 1.
- `query` (`string`, optional): Filter, e.g. exception.message="Cannot use 'in' operator*" AND service_name=web. Empty returns all groups. Query syntax: see QUERY SYNTAX in the search-aggregations tool description; a bad clause is dropped silently and widens results.

FLAG FILTERS: feature_flag.key=<key> feature_flag.result.value=<value> (also feature_flag.result.reason.kind, feature_flag.context.key) keeps the records of requests that evaluated that flag value: on errors and logs through the flag evaluations recorded in the same trace, on traces through the span's own evaluation events. Use it to compare failures between variations.
- `sort` (`string`, optional): Order, newest or largest first: last_seen (default) or first_seen of a matching occurrence in the window, count of matching occurrences, sessions affected (groups with no session, such as backend errors, are left out), or spike: new or growing groups first, by window count over the count in the same-length window just before, with in_window.baseline_count, spike_ratio and new_in_window. count, sessions and spike reach the top 50 groups. One of: `last_seen`, `first_seen`, `count`, `sessions`, `spike`.
- `state` (`string`, optional): Workflow state of the groups to return. Defaults to OPEN, which leaves out resolved and ignored groups; ANY returns every state. Ignored when query already filters on status. To also leave out snoozed groups, add snoozed_until<"2024-01-15T10:00:00" (now, UTC) to query. One of: `OPEN`, `RESOLVED`, `IGNORED`, `ANY`.

Example input: `{"projectKey":"default","startDate":"<startDate>"}`

### `launchdarklymcp_search_flag_evaluations`

Search Flag Evaluations · Read-only

Query feature flag evaluations recorded on spans. With sessionSecureId: that session's evaluations (distinct: one row per flag with values and counts); set startDate to its created_at and endDate three hours later. Without it: counts across the project per flag, value and environment for flagKey (or a query), to see who was served what; include error_groups (needs variation) adds error groups sessions hit after being served that value; include sessions adds sessions served it. Pass only extra filters in query.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): LaunchDarkly project key.
- `startDate` (`string`, required): Start: ISO 8601 (2024-01-15T10:00:00Z), a date, relative (now-1h, now-7d) or epoch seconds.
- `direction` (`string`, optional): Timestamp sort direction. Defaults to DESC. One of: `ASC`, `DESC`.
- `distinct` (`boolean`, optional): Return one row per flag with each value the session saw and its evaluation count, instead of raw evaluations. Use it to learn which variation a user got. Defaults to false.
- `endDate` (`string`, optional): End, same formats. Defaults to now.
- `environmentKey` (`string`, optional): Without sessionSecureId: LaunchDarkly environment key (e.g. production) to count only that environment's evaluations.
- `flagKey` (`string`, optional): Without sessionSecureId: the flag key to count evaluations of across the project.
- `include` (`array`, optional): Without sessionSecureId and with flagKey: also return error_groups (error groups that sessions hit after being served variation; requires variation) and sessions (sessions served the flag, or variation when set).
- `includeLimit` (`number`, optional): Rows per include part, at most 50. Defaults to 10.
- `limit` (`number`, optional): Evaluations to return, at most 100. Defaults to 50. With distinct or without sessionSecureId, flag, value and environment rows to read, at most 500, defaulting to 200.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.
- `query` (`string`, optional): Extra filters, e.g. service_name=checkout-web. Empty applies only the session scope.
- `sessionSecureId` (`string`, optional): Secure ID of the session. Omit it to search the whole project for flagKey.
- `variation` (`string`, optional): Without sessionSecureId: the served value the include parts are about, e.g. true or control. Required with include error_groups: set it whenever the question is about users served one value. Counts still cover every value.

Example input: `{"projectKey":"default","startDate":"<startDate>"}`

### `launchdarklymcp_search_log_patterns`

Search Log Patterns · Read-only

Cluster the logs matching a filter into message templates, with ids, numbers and other variable parts masked, each with its count and the newest example. Use it to find the distinct shapes of an error or a noisy message in one call instead of paging search-logs; set patternKeys to ["error.message"] to template an attribute instead of the message. The log level key is level (level=error), not severity. It scans at most the newest 100,000 matching logs: when truncated is true, narrow the window or the filter for complete counts.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): LaunchDarkly project key.
- `startDate` (`string`, required): Start: ISO 8601 (2024-01-15T10:00:00Z), a date, relative (now-1h, now-7d) or epoch seconds.
- `endDate` (`string`, optional): End, same formats. Defaults to now.
- `limit` (`number`, optional): Patterns to return, most frequent first, at most 200. Defaults to 20.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.
- `patternKeys` (`array`, optional): Keys whose values are templated together, e.g. ["error.message"] or ["service_name","message"]. Defaults to ["message"]. Adding a key such as service_name splits each pattern by its value.
- `query` (`string`, optional): Filter, e.g. level=error AND service_name=api. Empty clusters all logs.

Example input: `{"projectKey":"default","startDate":"<startDate>"}`

### `launchdarklymcp_search_logs`

Search Logs · Read-only

Query raw log entries (timestamp, level, message, service, attributes) in a time window. An error-level log that recorded an error carries error_group_secure_id for get-error-group. Long values such as stack traces are shortened; to read one in full, repeat the query with fullAttributes, e.g. ["code.stacktrace"]. fields picks attributes; maxTokens bounds the response. To scope to a session, query secure_session_id=<id> with startDate at the session's created_at and endDate three hours later. Use search-aggregations for counts or trends.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): LaunchDarkly project key.
- `startDate` (`string`, required): Start: ISO 8601 (2024-01-15T10:00:00Z), a date, relative (now-1h, now-7d) or epoch seconds.
- `cursor` (`string`, optional): page.next_cursor from the previous result, to get the next page. Keep the other arguments unchanged. Omit for the first page.
- `direction` (`string`, optional): Timestamp sort direction. Defaults to DESC. One of: `ASC`, `DESC`.
- `endDate` (`string`, optional): End, same formats. Defaults to now.
- `environments` (`array`, optional): Exact environment values to restrict to, e.g. ["Production"]; values are case-sensitive, so list them with get-keys key=environment.
- `fields` (`array`, optional): Attribute keys to return; others are left out. A key covers its nested keys and * matches any characters, e.g. ["error.*","http.route"]. Core fields (timestamp, level, message, service, trace and span IDs) are always returned. Omit for every attribute.
- `fullAttributes` (`array`, optional): Attribute keys to return untruncated, e.g. ["code.stacktrace"]; a prefix such as code covers its nested keys and message covers the log message. By default values over 500 characters (messages over 2000) are shortened and a value repeated inside a longer one is replaced by a reference. ["*"] returns everything in full and caps limit at 10.
- `limit` (`number`, optional): Entries to return, at most 50. Defaults to 20.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.
- `query` (`string`, optional): Filter, e.g. level=error AND service_name=api, or bare unquoted message words such as recovered panic. Empty returns all logs. Query syntax: see QUERY SYNTAX in the search-aggregations tool description; a bad clause is dropped silently and widens results.

LOG SEARCH: to find logs that mention or contain some words, the query is just those words: logs mentioning a connection reset means query: connection reset. Bare words search the log message as whole words (graphql request matches messages with both words); every other field is an attribute. There is no contains operator and no message prefix is needed: message contains "x" also requires the words message and contains. Common attributes: level, service_name, service_version, environment, source, secure_session_id, trace_id, span_id, code.filepath, code.function, host.name. secure_session_id EXISTS keeps only logs tied to a session.
SPEED: bare words in the message (recovered panic) are whole-word, index-assisted matches; *x*, "quoted phrases" and message:"..." / message="..." are substring scans that read every message in the window and can time out over days. Write the words bare with no field, operator or quotes (query: recovered panic, not "recovered panic", message:"recovered panic" or message contains "recovered panic"), even for multi-word requests; use *x* or a quoted phrase only when the user asks for an exact phrase or the bare words return too much, or add an attribute filter (service_name=..., level=error).

FLAG FILTERS: feature_flag.key=<key> feature_flag.result.value=<value> (also feature_flag.result.reason.kind, feature_flag.context.key) keeps the records of requests that evaluated that flag value: on errors and logs through the flag evaluations recorded in the same trace, on traces through the span's own evaluation events. Use it to compare failures between variations.
- `services` (`array`, optional): Exact service_name values to restrict to, e.g. ["checkout-api"]. Same rows as service_name=(a OR b) in query, but with environments also set a sampled query reads a finer sample.

Example input: `{"projectKey":"default","startDate":"<startDate>"}`

### `launchdarklymcp_search_members`

Search Members · Read-only

Search account members by name or exact emails.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `emails` (`array`, optional): No description.
- `limit` (`integer`, optional): No description.
- `query` (`string`, optional): No description.

Example input: `{}`

### `launchdarklymcp_search_service_map`

Search Service Map · Read-only

Services from trace data in a window. include picks the parts (default dependencies). dependencies: without service, services and {source, target} pairs where source calls target, narrowed with search; with service, its upstream callers and downstream callees with calls, errors and latency. health: requests, errors, error_rate and p50/p95/p99 latency per service, ranked with sortBy (e.g. error_rate); with service, also per http.route.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): LaunchDarkly project key.
- `startDate` (`string`, required): Start: ISO 8601 (2024-01-15T10:00:00Z), a date, relative (now-1h, now-7d) or epoch seconds.
- `direction` (`string`, optional): Dependencies with service: upstream for its callers, downstream for the services it calls, or both (default). One of: `upstream`, `downstream`, `both`.
- `endDate` (`string`, optional): End, same formats. Defaults to now.
- `environmentIds` (`array`, optional): Dependencies with service: LaunchDarkly environment IDs to scope the edges to, as recorded in the traces key environment_id (see get-keys key=environment_id).
- `include` (`array`, optional): Parts to return: dependencies (the call graph, default) and health (RED stats per service, under health). Pass both for both.
- `limit` (`number`, optional): With health. Services, and routes with service, to return, at most 50. Defaults to 10.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.
- `search` (`string`, optional): Case-insensitive substring of service names, e.g. production-. For dependencies without service, keeps matching services and every edge touching one.
- `service` (`string`, optional): One exact service_name, e.g. production-api. With dependencies, returns only its callers and callees with per-edge stats; with health, also request stats per http.route.
- `sortBy` (`string`, optional): With health. Ranking for services and routes: errors (default), error_rate, or spans (request count for routes). One of: `errors`, `error_rate`, `spans`.

Example input: `{"projectKey":"default","startDate":"<startDate>"}`

### `launchdarklymcp_search_sessions`

Search Sessions · Read-only

Query sessions in a time window; set detailed for replay, privacy, and billing fields. length and active_length are in milliseconds. To fetch one session by secure_id, use a wide window and count 1. For the longest or shortest sessions, set sortField to length (total duration), not active_length. When you reference sessions from this tool, wrap each session ID in <session-id></session-id> so the UI can link it.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): LaunchDarkly project key.
- `startDate` (`string`, required): Start: ISO 8601 (2024-01-15T10:00:00Z), a date, relative (now-1h, now-7d) or epoch seconds.
- `count` (`number`, optional): Sessions to return, at most 50. Defaults to 10.
- `detailed` (`boolean`, optional): Also return replay bookkeeping, privacy and billing flags, and per-event-type counts (client_id, fingerprint, event_counts, privacy_setting, ...). Defaults to false.
- `endDate` (`string`, optional): End, same formats. Defaults to now.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.
- `page` (`number`, optional): Page number, from 1. Defaults to 1. The result's page.next_page names the next one.
- `query` (`string`, optional): Filter, e.g. identifier='user@example.com' AND has_errors=true, or secure_id=<id>. Empty returns all sessions. Query syntax: see QUERY SYNTAX in the search-aggregations tool description; a bad clause is dropped silently and widens results.

RELATIONSHIP SEARCH: session filters such as visited-url=*/a* visited-url=*/b* match in ANY order. To relate events, join span(A) / no_span(A) and log(A) / no_log(A) blocks with AND, OR, or THEN: span(A) THEN span(B) means B strictly after A; span(A) THEN no_span(B) is a drop-off, and no_span / no_log may only be the last step. Inside a block use span keys, not session keys: view_name="/checkout" (not visited-url), span_name="click" event.text="Pay Now", span_name="track" key="order_completed". Session keys (country, browser_name, identifier, length) stay outside blocks. Example: country=US span(view_name="/checkout") THEN no_span(span_name="track" key="order_completed")
- `sortDesc` (`boolean`, optional): Sort descending. Defaults to true.
- `sortField` (`string`, optional): Field to sort by: created_at (start time), length (total session duration; use it for longest or shortest sessions) or active_length (time the user was active). Defaults to created_at.

Example input: `{"projectKey":"default","startDate":"<startDate>"}`

### `launchdarklymcp_search_stale_flags`

Search Stale Flags · Read-only

Find cleanup candidates, prioritized as never requested, inactive beyond the threshold, or launched without recent changes. Timestamps in the result are UTC.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): the project key
- `env` (`string`, optional): environment to analyze; required unless useCriticalEnvs is true
- `evalWindow` (`integer`, optional): evaluation count window in days
- `inactiveDays` (`integer`, optional): days without requests before a flag is stale
- `includeEvalCounts` (`boolean`, optional): include total SDK evaluations by environment
- `includeOnly` (`string`, optional): temporary (default), permanent, or all
- `maintainerId` (`string`, optional): maintainer member ID
- `maintainerTeamKey` (`string`, optional): maintainer team key
- `useCriticalEnvs` (`boolean`, optional): analyze the first critical environment instead of env
- `view` (`string`, optional): view key

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_search_timeline_events`

Search Timeline Events · Read-only

Query timeline indicator events for one session (clicks, navigations, track and identify calls, focus and tab changes) in time order. Filter with types, startTime and endTime, and page with limit and offset. Errors, network requests and flag evaluations are not timeline events; use get-session-details and search-flag-evaluations for those.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): LaunchDarkly project key.
- `sessionSecureId` (`string`, required): Secure ID of the session, e.g. from search-sessions.
- `endTime` (`string`, optional): ISO 8601 time with a timezone, or relative to now; keep events at or before it.
- `limit` (`integer`, optional): Events to return, at most 500. Defaults to 100.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.
- `offset` (`integer`, optional): Matched events to skip, from next_offset of the previous call. Defaults to 0.
- `startTime` (`string`, optional): ISO 8601 time with a timezone, or relative to now, e.g. now-15m; keep events at or after it.
- `types` (`array`, optional): Event tags to keep, case-insensitive, e.g. ["Click","Navigate"]. Common tags: Click, Navigate, Track, Identify, Focus, TabHidden, Reload, Referrer, Viewport; type_counts lists the tags this session has. Omit for every tag.

Example input: `{"projectKey":"default","sessionSecureId":"<sessionSecureId>"}`

### `launchdarklymcp_search_traces`

Search Traces · Read-only

Query raw spans in a window of at most 24 hours; use search-aggregations for longer windows. view=traces returns one row per trace instead, to find slow or failing requests. Long values are shortened; fullAttributes reads them whole, fields picks attributes. For the slowest spans, set sortColumn=duration and sortDirection=DESC; duration is in nanoseconds. It reads a sample; for the true slowest, get search-aggregations Max(duration) with exact set to true, then search duration>=it. To scope to a session, query secure_session_id=<id> from its created_at to three hours later.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): LaunchDarkly project key.
- `startDate` (`string`, required): Start: ISO 8601 (2024-01-15T10:00:00Z), a date, relative (now-1h, now-7d) or epoch seconds.
- `cursor` (`string`, optional): page.next_cursor from the previous result, to get the next page. Keep the other arguments unchanged. Omit for the first page. Not available with sortColumn.
- `direction` (`string`, optional): Timestamp sort direction. Defaults to DESC. One of: `ASC`, `DESC`.
- `endDate` (`string`, optional): End, same formats. Defaults to now.
- `environments` (`array`, optional): Exact environment values to restrict to, e.g. ["Production"]; values are case-sensitive, so list them with get-keys key=environment.
- `fields` (`array`, optional): Attribute keys to return; others are left out. A key covers its nested keys and * matches any characters, e.g. ["http.*","error*"]. Core span fields (span name, service, duration, status, IDs) are always returned. Omit for every attribute.
- `fullAttributes` (`array`, optional): Attribute keys to return untruncated, e.g. ["code.stacktrace"]; a prefix such as code covers its nested keys. By default values over 500 characters are shortened and a value repeated inside a longer one is replaced by a reference. ["*"] returns everything in full and caps limit at 10.
- `limit` (`number`, optional): Traces to return, at most 50. Defaults to 20.
- `maxTokens` (`number`, optional): Response token budget, 500-100000, default 20000; rows past it are dropped and truncation_note says how to get them.
- `query` (`string`, optional): Filter, e.g. span_name="getUserData" AND service_name=auth. Empty returns all traces. Query syntax: see QUERY SYNTAX in the search-aggregations tool description; a bad clause is dropped silently and widens results.

RELATIONSHIP SEARCH: span(A) span(B) means the trace has both; span(A) OR span(B) either; span(A) THEN span(B) a B span that started strictly after A in the same trace; span(A) THEN no_span(B) no B after A (no_span only as the last step). Put one span's conditions inside one span(...). parent_span_id NOT EXISTS selects root spans; any_span(...), child_span(...), parent_span(...), root_span(...) match other spans in the same trace, top level only, never negated or used as THEN steps.

GROUPING SPANS: server spans from HTTP middleware are often named only by method (GET, POST). To rank or compare endpoints, filter span_kind=Server and group by http.route, not span_name. When middleware adds an inner server span, both spans carry http.route and route counts are about twice the request count; the span_name grouping (bare GET next to GET /route) shows whether that applies.

FLAG FILTERS: feature_flag.key=<key> feature_flag.result.value=<value> (also feature_flag.result.reason.kind, feature_flag.context.key) keeps the records of requests that evaluated that flag value: on errors and logs through the flag evaluations recorded in the same trace, on traces through the span's own evaluation events. Use it to compare failures between variations.
- `services` (`array`, optional): Exact service_name values to restrict to, e.g. ["checkout-api"]. Same rows as service_name=(a OR b) in query, but with environments also set a sampled query reads a finer sample.
- `sortColumn` (`string`, optional): Column to sort by, e.g. duration. Defaults to timestamp.
- `sortDirection` (`string`, optional): Direction for sortColumn. Defaults to DESC. One of: `ASC`, `DESC`.
- `view` (`string`, optional): spans (default) returns span rows. traces returns one row per trace, matching when any span matches; it takes only query, the window, limit and cursor. One of: `spans`, `traces`.

Example input: `{"projectKey":"default","startDate":"<startDate>"}`

### `launchdarklymcp_apply_agent_config_approval`

Apply Agent Config Approval · Write

Apply an already-approved AgentControl Config approval request. Call it only after the request's reviewStatus is approved; it never approves. If reviewStatus is declined or pending, do not apply: report it to the user. A result with scheduled: true is not live until executionDate. Arguments: id and confirm: true, plus an optional comment; nothing else. Unlike get-agent-config-approvals, it takes no projectKey, configKey, or env.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `id` (`string`, required): No description.
- `comment` (`string`, optional): No description.

Example input: `{"confirm":true,"id":"<id>"}`

### `launchdarklymcp_clone_ai_config_variation`

CloneAiConfigVariation · Write

Clone an existing AI Config variation to create a new variation with the same settings.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `configKey` (`string`, required): The key of the AI Config that contains the variation to clone.
- `projectKey` (`string`, required): The project key identifying which project contains the AI Config.
- `variationId` (`string`, required): The ID of the variation to clone.
- `name` (`string`, optional): The name for the new cloned variation.

Example input: `{"configKey":"<configKey>","projectKey":"default","variationId":"<variationId>"}`

### `launchdarklymcp_create_agent_config`

Create Agent Config · Write

Create an AgentControl Config or one of its variations. resource is required. configKey always names the config and variationKey and variationName always name a variation. resource=config creates the config (configKey, name, mode); pass variationKey, variationName, modelConfigKey, modelName, and instructions or messages to also create its first variation, optionally with tools and skills, in the same write. For mode judge, evaluationMetricKey and isInverted are required (isInverted: true if a lower metric value is better). maintainerId (member ID) or maintainerTeamKey (team key) sets the maintainer, not both. resource=variation adds variationKey and variationName to configKey, with model and prompts, or clones sourceVariationKey (omitted model, prompts, tools, skills, and judgeConfiguration are copied from it).

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `resource` (`string`, required): config: a new config, optionally with its first variation. variation: a new variation on configKey. One of: `config`, `variation`.
- `configKey` (`string`, optional): The config's key: the new config (resource=config) or the config to add the variation to (resource=variation).
- `description` (`string`, optional): No description.
- `evaluationMetricKey` (`string`, optional): No description.
- `instructions` (`string`, optional): The variation's system prompt.
- `isInverted` (`boolean`, optional): True when a lower evaluation metric value is better. False when a higher value is better.
- `judgeConfiguration` (`object`, optional): No description.
- `maintainerId` (`string`, optional): resource=config: a member ID.
- `maintainerTeamKey` (`string`, optional): resource=config: a team key.
- `messages` (`array`, optional): No description.
- `mode` (`string`, optional): No description. One of: `agent`, `completion`, `judge`.
- `modelConfigKey` (`string`, optional): A model config key from get-ai-model-configs: a global Provider.model-id key such as OpenAI.gpt-4o, or a custom model config's own key.
- `modelName` (`string`, optional): No description.
- `name` (`string`, optional): resource=config: the config's name.
- `parameters` (`object`, optional): No description.
- `skills` (`array`, optional): Agent skills to attach, as {key, version} from get-agent-skills. On update, the array replaces the attached skills; [] detaches them all.
- `sourceVariationKey` (`string`, optional): resource=variation: clone this variation.
- `tags` (`array`, optional): No description.
- `tools` (`array`, optional): No description.
- `variationKey` (`string`, optional): The new variation's key (resource=config: its first variation).
- `variationName` (`string`, optional): The new variation's name.
- `viewKeys` (`array`, optional): No description.

Example input: `{"projectKey":"default","resource":"config"}`

### `launchdarklymcp_create_agent_config_approval`

Create Agent Config Approval · Write

Create an approval request for an AgentControl Config change without approving it. Include at least one reviewer in notifyMemberIds or notifyTeamKeys. Each instruction is an AgentControl Config targeting semantic patch object with a kind: enableTargeting or disableTargeting turns targeting on or off, so enabling it is [{"kind":"enableTargeting"}]; rule and target kinds are those of update-agent-config resource=targeting targetingInstructions. A human approves or declines the request in LaunchDarkly; you cannot. Open approvalRequest.url in the user's browser when your client can (for example with open or xdg-open, or a browser tool), and show the link either way. Check the outcome once the user says the request has been reviewed, not in a loop. Check the outcome with get-agent-config-approvals and the request's id.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `configKey` (`string`, required): No description.
- `description` (`string`, required): No description.
- `instructions` (`array`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `comment` (`string`, optional): No description.
- `env` (`string`, optional): Environment key. If the user hasn't named one, ask; don't guess.
- `notifyMemberIds` (`array`, optional): No description.
- `notifyTeamKeys` (`array`, optional): No description.

Example input: `{"configKey":"<configKey>","description":"<description>","instructions":[],"projectKey":"default"}`

### `launchdarklymcp_create_agent_graph`

CreateAgentGraph · Write

Create a new agent graph in a project. An agent graph defines a directed graph of AgentControl Configs for multi-agent workflows. Provide a rootConfigKey and edges to define the graph structure, or create the graph with just metadata and add edges later via update-agent-graph. If rootConfigKey or edges are provided, both must be present.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `key` (`string`, required): No description.
- `name` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `description` (`string`, optional): No description.
- `edges` (`array`, optional): No description.
- `rootConfigKey` (`string`, optional): No description.

Example input: `{"key":"<key>","name":"<name>","projectKey":"default"}`

### `launchdarklymcp_create_agent_skill`

Create Agent Skill · Write

Create an agent skill from SKILL.md content. Provide a unique key, a display name, and the verbatim markdown. The skill starts at version 1. Attach it to a variation with create-agentcontrol-config-variation or update-agentcontrol-config-variation by passing skills: [{key, version}].

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `key` (`string`, required): No description.
- `markdown` (`string`, required): The SKILL.md content, verbatim.
- `name` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `description` (`string`, optional): No description.
- `maintainerId` (`string`, optional): No description.
- `maintainerTeamKey` (`string`, optional): No description.
- `tags` (`array`, optional): No description.

Example input: `{"key":"<key>","markdown":"<markdown>","name":"<name>","projectKey":"default"}`

### `launchdarklymcp_create_ai_config`

CreateAiConfig · Write

Create a new AI Config in a project. An AI Config manages AI model configurations with feature flag-style targeting and experimentation.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `key` (`string`, required): A unique key for the AI Config.
- `name` (`string`, required): A human-readable name for the AI Config.
- `projectKey` (`string`, required): The project key where the AI Config will be created.
- `description` (`string`, optional): An optional description for the AI Config.
- `tags` (`array`, optional): Optional list of tags to associate with the AI Config.

Example input: `{"key":"<key>","name":"<name>","projectKey":"default"}`

### `launchdarklymcp_create_ai_config_variation`

CreateAiConfigVariation · Write

Create a new variation for an AI Config with specific model, prompt, and parameter settings.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `configKey` (`string`, required): The key of the AI Config to create a new variation for.
- `name` (`string`, required): The name for the new variation.
- `projectKey` (`string`, required): The project key identifying which project contains the AI Config.
- `model` (`object`, optional): Model settings for the new variation such as model name and parameters.
- `prompt` (`array`, optional): Prompt messages array for the new variation.

Example input: `{"configKey":"<configKey>","name":"<name>","projectKey":"default"}`

### `launchdarklymcp_create_ai_model_config`

Create Ai Model Config · Write

Create a custom AI model config for a model that is not in the global catalog. Search get-ai-model-configs first, and use a global model if one exists. key uses letters, numbers, ., _, and - (for example gpt-image-2-custom). id is the provider's model ID (for example gpt-image-2). provider matches the key's prefix, if any (for example OpenAI). Costs are USD per token (for example 0.000005). params and customParams are JSON objects (for example {"temperature": 0.7}). maintainerId and maintainerTeamKey are not applied on create; set one of them with update-ai-model-config. Next, pass key as modelConfigKey and id as modelName when creating an AgentControl Config variation.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `id` (`string`, required): The provider's model ID.
- `key` (`string`, required): No description.
- `name` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `costPerCachedInputToken` (`number`, optional): No description.
- `costPerInputToken` (`number`, optional): No description.
- `costPerOutputToken` (`number`, optional): No description.
- `customParams` (`object`, optional): No description.
- `icon` (`string`, optional): No description.
- `params` (`object`, optional): No description.
- `provider` (`string`, optional): No description.
- `tags` (`array`, optional): No description.

Example input: `{"id":"<id>","key":"<key>","name":"<name>","projectKey":"default"}`

### `launchdarklymcp_create_ai_tool`

CreateAiTool · Write

Create a new AI tool definition in a project. The schema should be a raw JSON Schema object with type, properties, and required fields (e.g. {"type": "object", "properties": {...}}). Do NOT use the OpenAI function calling wrapper format. After creation, attach the tool to a variation using update-agentcontrol-config-variation.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `description` (`string`, required): No description.
- `key` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `schema` (`object`, required): No description.
- `customParameters` (`object`, optional): Application metadata, not sent to the model.
- `tags` (`array`, optional): No description.

Example input: `{"description":"<description>","key":"<key>","projectKey":"default","schema":{}}`

### `launchdarklymcp_create_alert`

CreateAlert · Write

Create a new observability alert that fires when a metric crosses a threshold.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `functionType` (`string`, required): Aggregator to monitor. Every value except Count also needs functionColumn, e.g. P95 with functionColumn duration for trace latency. Sessions and Errors alerts always use Count; any other value is ignored for them. One of: `Count`, `CountDistinct`, `CountDistinctKey`, `Min`, `Avg`, `P50`, `P75`, `P90`, `P95`, `P99`, `Max`, `Sum`.
- `name` (`string`, required): Alert name, e.g. High API Error Rate.
- `productType` (`string`, required): Data source. LDCustomEvents is LaunchDarkly custom (metric) events, filtered with key=<event key> and environment_id=<environment ID>. One of: `Logs`, `Traces`, `Errors`, `Sessions`, `Metrics`, `Events`, `LDCustomEvents`.
- `projectKey` (`string`, required): LaunchDarkly project key.
- `autoInvestigationEnabled` (`boolean`, optional): When true, each firing starts an AI investigation that posts its diagnosis to the destinations.
- `destinations` (`array`, optional): Notification destinations.
- `evaluationDelaySeconds` (`number`, optional): Seconds to wait before evaluating each window, so late-arriving data is counted. Defaults to 0.
- `functionColumn` (`string`, optional): Field to aggregate. Required for every functionType except Count: duration for trace latency (P95 of duration), value for metrics. Ignored for Sessions and Errors.
- `groupBy` (`array`, optional): Dimension keys; the alert fires separately per group, e.g. ["service_name"]. Sessions alerts cannot be grouped; Errors alerts always group by ["event"].
- `investigationCooldownSeconds` (`number`, optional): Minimum seconds between automatic investigations; keep it at or above thresholdCooldown. Defaults to 86400.
- `investigationPermissionMode` (`string`, optional): read investigates and reports; read-write may also open a PR. Defaults to read. One of: `read`, `read-write`.
- `investigationPrompt` (`string`, optional): Standing instructions prepended to each investigation.
- `investigationRepositories` (`array`, optional): Repositories the investigation may read. Without them it cannot correlate a firing with a deploy.
- `messageContent` (`string`, optional): Custom text included in notifications.
- `noDataBehavior` (`string`, optional): State when a window has no data: NORMAL treats it as healthy, ALERT fires, NO_CHANGE keeps the previous state. Defaults to NORMAL. One of: `NORMAL`, `ALERT`, `NO_CHANGE`.
- `populationFunctionType` (`string`, optional): Two-level aggregation: functionType is computed per unit (the groupBy keys, e.g. a user key), then this aggregates across units, e.g. P99 of Sum per user. PercentUnits alerts on the percentage (0-100) of units that sent a query-matching event and needs populationQuery or populationWindow. Requires groupBy and a Constant threshold. One of: `Count`, `CountDistinct`, `CountDistinctKey`, `Min`, `Avg`, `P50`, `P75`, `P90`, `P95`, `P99`, `Max`, `Sum`, `PercentUnits`.
- `populationQuery` (`string`, optional): With populationFunctionType: filter selecting the events whose senders form the population (the denominator), e.g. key=(page_view OR session_start).
- `populationWindow` (`number`, optional): With populationFunctionType: population lookback in seconds, at least thresholdWindow. Defaults to thresholdWindow.
- `query` (`string`, optional): Filter in search syntax, e.g. service_name=api level=error.
- `sendResolvedAlert` (`boolean`, optional): Also notify the destinations when the alert recovers.
- `tags` (`object`, optional): Key/value metadata on the alert, e.g. {"team": "release", "service": "api"}.
- `thresholdCondition` (`string`, optional): Outside applies to Anomaly only. Defaults to Above. One of: `Above`, `AboveOrEqual`, `Below`, `BelowOrEqual`, `Equal`, `NotEqual`, `Outside`.
- `thresholdCooldown` (`number`, optional): Seconds to wait before re-notifying while still alerting. Defaults to 1800.
- `thresholdType` (`string`, optional): Constant compares against thresholdValue; Anomaly detects deviations. Defaults to Constant. One of: `Constant`, `Anomaly`.
- `thresholdValue` (`number`, optional): Value to compare against. Required when thresholdType is Constant.
- `thresholdWindow` (`number`, optional): Evaluation window in seconds, e.g. 300 for the last 5 minutes. Defaults to 3600.
- `warnThresholdValue` (`number`, optional): Optional lower-severity threshold, crossed before thresholdValue, for an early warning.

Example input: `{"functionType":"Count","name":"<name>","productType":"Logs","projectKey":"default"}`

### `launchdarklymcp_create_approval_request`

CreateApprovalRequest · Write

Create an approval request for a flag change in an environment that requires approvals. Provide the same semantic patch instructions you would use for a direct change. The request will be reviewed by approvers before taking effect. Does NOT approve the request: that must be done by a human reviewer.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `description` (`string`, required): No description.
- `env` (`string`, required): No description.
- `flagKey` (`string`, required): No description.
- `instructions` (`array`, required): No description.
- `projectKey` (`string`, required): No description.
- `comment` (`string`, optional): No description.
- `notifyMemberIds` (`array`, optional): No description.
- `notifyTeamKeys` (`array`, optional): No description.
- `segmentKey` (`string`, optional): No description.

Example input: `{"description":"<description>","env":"<env>","flagKey":"<flagKey>","instructions":[],"projectKey":"default"}`

### `launchdarklymcp_create_automated_rollout_config`

CreateAutomatedRolloutConfig · Write

Record an automated rollout config in LaunchDarkly for a feature-flagged change.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `environments` (`array`, required): Per-environment rollout plan.
- `flagKey` (`string`, required): Key of the guarding flag, which must already exist.
- `projectKey` (`string`, required): LaunchDarkly project key.
- `endingVariationId` (`string`, optional): Variation a multi-variate flag rolls out to. Boolean flags default to true.
- `executionMode` (`string`, optional): parallel (default) starts environments independently; sequential releases them in array order. One of: `parallel`, `sequential`.
- `prNumber` (`number`, optional): Pull request number.
- `prUrl` (`string`, optional): Full pull request URL.
- `repoFullName` (`string`, optional): GitHub repository as owner/repo.
- `requiredApplicationKeys` (`array`, optional): SDK-reported application ids that must all evaluate the flag before release, so tests, jobs, and other apps do not trigger it. Pass only ids already instrumented in the repository's SDK configuration; never guess, and omit when there are none. Not a LaunchDarkly application object id.
- `startingVariationId` (`string`, optional): Variation a multi-variate flag rolls out from. Boolean flags default to false; multi-variate flags need both variation IDs, and setting only one is rejected.

Example input: `{"environments":[],"flagKey":"<flagKey>","projectKey":"default"}`

### `launchdarklymcp_create_environment`

Create Environment · Write

Create an environment in a LaunchDarkly project. name is the display name capitalized as the user wrote it (QA, not qa). Returns its key, name, client-side ID, mobile key, color, tags, and settings. Does not return the server-side SDK key; use get-sdk-key. Environment keys must be unique in the project, start with a letter or number, and contain only letters, numbers, periods, underscores, and dashes. A key already in use returns a conflict: do not retry with the same key; check it with get-environment and ask the user whether to use that environment or another key. A permission denied error can also mean the project has reached its environment limit. Boolean settings default to false. With sourceEnv, the new environment starts with a copy of that environment's flag configurations and segments, including rules but not individual context targets; its settings come from this call, not from sourceEnv. Approval settings cannot be set when creating an environment and are not copied.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `key` (`string`, required): No description.
- `name` (`string`, required): Display name, capitalized as the user wrote it, e.g. QA; not the key.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `color` (`string`, optional): RGB hex color without #, such as F5A623. Defaults to d9f9eb.
- `confirmChanges` (`boolean`, optional): No description.
- `critical` (`boolean`, optional): No description.
- `defaultTrackEvents` (`boolean`, optional): No description.
- `defaultTtl` (`integer`, optional): Minutes the PHP SDK may cache flag rules. Defaults to 0.
- `requireComments` (`boolean`, optional): No description.
- `secureMode` (`boolean`, optional): No description.
- `sourceEnv` (`string`, optional): Key of an environment in the same project to copy flag configurations and segments from. Omit unless the user names one; don't guess.
- `tags` (`array`, optional): No description.

Example input: `{"key":"<key>","name":"<name>","projectKey":"default"}`

### `launchdarklymcp_create_flag`

CreateFlag · Write

Create a new feature flag in a project. Defaults to a boolean temporary flag. After creation the flag is OFF in all environments: use toggle-flag to enable it.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `key` (`string`, required): No description.
- `name` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `clientSideAvailability` (`object`, optional): No description.
- `customProperties` (`object`, optional): No description.
- `defaults` (`object`, optional): No description.
- `description` (`string`, optional): No description.
- `kind` (`string`, optional): No description. One of: `boolean`, `multivariate`.
- `maintainerId` (`string`, optional): No description.
- `maintainerTeamKey` (`string`, optional): No description.
- `tags` (`array`, optional): No description.
- `temporary` (`boolean`, optional): No description.
- `variations` (`array`, optional): No description.
- `viewKeys` (`array`, optional): No description.

Example input: `{"key":"<key>","name":"<name>","projectKey":"default"}`

### `launchdarklymcp_create_playground`

CreatePlayground · Write

Create a new LLM playground. A playground lets you compare AgentControl Config variations side-by-side. Provide a name and variants — each variant references an evaluation definition (by evaluationId) and a display position.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `variants` (`array`, required): No description.

Example input: `{"name":"<name>","projectKey":"default","variants":[]}`

### `launchdarklymcp_create_prompt_snippet`

CreatePromptSnippet · Write

Create a new reusable prompt snippet.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `key` (`string`, required): No description.
- `name` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `text` (`string`, required): No description.
- `description` (`string`, optional): No description.
- `tags` (`array`, optional): No description.

Example input: `{"key":"<key>","name":"<name>","projectKey":"default","text":"<text>"}`

### `launchdarklymcp_create_segment`

CreateSegment · Write

Create a new segment in a project environment. The segment is empty after creation — use update-segment-rules to add targeting rules or update-segment-targets to add individual context keys. Segment keys are immutable after creation: choose carefully. Pass viewKeys to link the new segment to one or more views at creation time (Views are an Enterprise feature).

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `key` (`string`, required): No description.
- `name` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `description` (`string`, optional): No description.
- `tags` (`array`, optional): No description.
- `unbounded` (`boolean`, optional): No description.
- `viewKeys` (`array`, optional): No description.

Example input: `{"environmentKey":"<environmentKey>","key":"<key>","name":"<name>","projectKey":"default"}`

### `launchdarklymcp_create_view`

Create View · Write

Create a new view in a project. Views are an Enterprise feature. The view is empty after creation — use link-view-resources to link flags, segments, or AgentControl Configs to it, or pass viewKeys when creating those resources. The key is converted to lowercase by the API, so use the lowercase form to reference the view afterward.

MAINTAINER: set maintainerTeamKey or maintainerId to assign an owner; only one of the two can be specified. Prefer maintainerTeamKey when a suitable team exists.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `key` (`string`, required): No description.
- `name` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `description` (`string`, optional): No description.
- `maintainerId` (`string`, optional): No description.
- `maintainerTeamKey` (`string`, optional): No description.
- `tags` (`array`, optional): No description.

Example input: `{"key":"<key>","name":"<name>","projectKey":"default"}`

### `launchdarklymcp_createdashboard`

CreateDashboard · Write

Create a new empty dashboard (visualization) for organizing charts.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `timePreset` (`string`, optional): No description.
- `variables` (`array`, optional): Template variables that graph queries reference as $key, e.g. environment=$env.

Example input: `{"name":"<name>","projectKey":"default"}`

### `launchdarklymcp_createdataset`

CreateDataset · Write

Create a new offline dataset for AI evaluation. Provide a dataset name, filename, and format (csv, json, or jsonl). The dataset is created in pending status and must be uploaded separately. Returns the dataset ID and upload URL.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `filename` (`string`, required): No description.
- `format` (`string`, required): No description. One of: `csv`, `jsonl`.
- `key` (`string`, required): No description.
- `name` (`string`, required): No description.
- `projectKey` (`string`, required): No description.
- `empty` (`boolean`, optional): No description.
- `sizeBytes` (`number`, optional): No description.

Example input: `{"filename":"<filename>","format":"csv","key":"<key>","name":"<name>","projectKey":"default"}`

### `launchdarklymcp_createevaluation`

CreateEvaluation · Write

Create a new AI evaluation definition. An evaluation defines a comparison between AI Config variations using a dataset and judge criteria. After creation, use run-evaluation to start an evaluation run.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `generationModel` (`string`, required): No description.
- `generationProvider` (`string`, required): No description.
- `name` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `criteria` (`array`, optional): No description.
- `evaluationModel` (`string`, optional): No description.
- `evaluationProvider` (`string`, optional): No description.
- `generationContext` (`object`, optional): No description.
- `messages` (`array`, optional): No description.
- `parameters` (`object`, optional): No description.
- `promptSnippets` (`object`, optional): No description.
- `tools` (`array`, optional): No description.
- `variables` (`object`, optional): No description.

Example input: `{"generationModel":"<generationModel>","generationProvider":"<generationProvider>","name":"<name>","projectKey":"default"}`

### `launchdarklymcp_createexperiment`

CreateExperiment · Write

Create a new experiment on a flag or AgentControl Config. An experiment measures the impact of different variations on specified metrics. You must provide the initial iteration definition including a hypothesis, metrics, treatments, and flag configuration. One treatment must be marked as the baseline. Use `methodology` to pick the results-analysis approach (`bayesian` default, `frequentist`, or `export_only` for data-export-only mode). Use `analysisConfig` to set thresholds and multiple-comparison correction. Use `iteration.attributes` to declare slicing dimensions and `iteration.covariateId` to enable stratified sampling.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `iteration` (`object`, required): No description.
- `key` (`string`, required): No description.
- `name` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `analysisConfig` (`object`, optional): No description.
- `dataSource` (`string`, optional): No description. One of: `launchdarkly`, `snowflake`, `databricks`.
- `description` (`string`, optional): No description.
- `holdoutId` (`string`, optional): No description.
- `maintainerId` (`string`, optional): No description.
- `methodology` (`string`, optional): No description. One of: `bayesian`, `frequentist`, `export_only`.
- `tags` (`array`, optional): No description.

Example input: `{"environmentKey":"<environmentKey>","iteration":{},"key":"<key>","name":"<name>","projectKey":"default"}`

### `launchdarklymcp_creategraph`

CreateGraph · Write

Add a chart/graph to an existing dashboard.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `dashboardId` (`number`, required): Numeric dashboard ID from get-dashboards.
- `expressions` (`array`, required): Required unless cloneFrom is set. Aggregations, e.g. [{"aggregator":"Count","column":""}] or [{"aggregator":"P90","column":"duration"}].
- `productType` (`string`, required): Required unless cloneFrom is set. Data source: Logs, Traces, Errors, Sessions, Metrics, PAEvents, or Events; case-insensitive. PAEvents is the product-analytics source the graph editor shows: filter custom events with type="track" key="<name>" and page or screen views with type="*_view" view_name="<path>". Events is the legacy session_events source, filtered with event="<name>".
- `projectKey` (`string`, required): LaunchDarkly project key.
- `title` (`string`, required): Chart title, e.g. Error Rate by Service. Required unless cloneFrom is set.
- `type` (`string`, required): Required unless cloneFrom is set. Chart type: "Line chart" for trends, "Bar chart" for comparisons or histograms, "Table" for breakdowns, or "Heatmap".
- `bucketBy` (`string`, optional): Field to bucket by. Defaults to Timestamp.
- `bucketCount` (`number`, optional): Number of time buckets. Defaults to 12.
- `cloneFrom` (`object`, optional): Graph to copy. Its full configuration is saved as a new graph on dashboardId, which may be another dashboard; fields set alongside override the copy.
- `comparisonMode` (`string`, optional): Period-over-period comparison mode.
- `display` (`string`, optional): Exact style value. Line chart: Line, Stacked, or Stacked area. Bar chart: Stacked or Grouped.
- `environments` (`array`, optional): Limit the chart to these LaunchDarkly environments.
- `formulas` (`array`, optional): Calculated series over metricSeries, e.g. A / B * 100 for an error rate; replaces the stored formulas.
- `groupBy` (`array`, optional): Dimension keys from get-keys, e.g. ["level"].
- `groupByLimit` (`number`, optional): Maximum series when groupBy is set; keep it small for high-cardinality keys such as URLs or account IDs. Defaults to 10.
- `heatmapSecureSessionId` (`string`, optional): Heatmap only. secure_id of a session that visited the target page.
- `heatmapSessionTimestamp` (`string`, optional): Heatmap only. ISO timestamp of that session's navigation to the page.
- `limitAggregator` (`string`, optional): Aggregator that ranks groups for groupByLimit. Defaults to the first expression's aggregator, or Count when that is Count or CountDistinctKey. One of: `Count`, `CountDistinct`, `CountDistinctKey`, `Min`, `Avg`, `P50`, `P75`, `P90`, `P95`, `P99`, `Max`, `Sum`.
- `limitColumn` (`string`, optional): Column ranked with limitAggregator, e.g. duration. Defaults to the first expression's column. Ignored for Count.
- `metricSeries` (`array`, optional): Lettered input series (A, B, ...) for formulas; replaces the stored series. Without it the chart plots query and expressions.
- `query` (`string`, optional): Filter in search syntax, e.g. level=error. Must use the product type's event grammar for PAEvents and Events.
- `services` (`array`, optional): Limit the chart to these services.
- `showExemplars` (`boolean`, optional): Overlay representative data points.

Example input: `{"dashboardId":1,"expressions":[],"productType":"<productType>","projectKey":"default","title":"<title>","type":"<type>"}`

### `launchdarklymcp_createmetric`

CreateMetric · Write

Create a new metric in a LaunchDarkly project.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `key` (`string`, required): No description.
- `measureType` (`string`, required): distinct counts each unit's unique values of the unitAggregationField column; it does not use valueColumn. One of: `count`, `occurrence`, `value`, `distinct`.
- `name` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `successCriteria` (`string`, required): No description. One of: `HigherThanBaseline`, `LowerThanBaseline`.
- `analysisUnits` (`array`, optional): No description.
- `dataSourceKey` (`string`, optional): No description.
- `denominator` (`object`, optional): Denominator term of a ratio metric; the metric's own event is the numerator term. Custom metrics on a warehouse data source only: requires dataSourceKey.
- `description` (`string`, optional): No description.
- `eventDefault` (`object`, optional): Default for units that sent no event. value is only sent when disabled is false, because Gonfalon omits value when defaulting is disabled. The only supported value is 0; ratio metrics reject any other value.
- `eventKey` (`string`, optional): No description.
- `excludeUnitsWithoutEvents` (`boolean`, optional): Leave units that sent no event out of the analysis instead of counting them as 0.
- `filters` (`object`, optional): Count only events matching context attribute or event property clauses. Custom metrics only. A group joins clauses or further groups with and/or.
- `kind` (`string`, optional): No description. One of: `custom`, `pageview`, `click`, `trace`.
- `maintainerId` (`string`, optional): The ID of the member who maintains this metric.
- `percentile` (`integer`, optional): Analyze this percentile of unit values instead of the mean. Requires excludeUnitsWithoutEvents: true.
- `selector` (`string`, optional): No description.
- `tags` (`array`, optional): No description.
- `traceQuery` (`string`, optional): Trace query of a trace metric, for example service.name = "checkout".
- `traceValueLocation` (`string`, optional): Where a trace metric with measureType value reads its number, for example duration.
- `unit` (`string`, optional): No description.
- `unitAggregationField` (`string`, optional): Required with measureType distinct: the warehouse column whose unique values are counted per unit, for example ORDER_ID.
- `urls` (`array`, optional): No description.
- `valueAggregation` (`string`, optional): No description. One of: `sum`, `average`.
- `valueColumn` (`string`, optional): Warehouse column holding the numeric value for measureType value.
- `windowEndOffset` (`integer`, optional): End of the measurement window, in milliseconds after the unit's first exposure.
- `windowStartOffset` (`integer`, optional): Start of the measurement window, in milliseconds after the unit's first exposure.
- `winsorIncludeImputed` (`boolean`, optional): Count the 0 imputed for units without events when computing the winsorization bounds.
- `winsorLowerPercentile` (`number`, optional): Clamp unit values below this percentile, in the open interval (0, 100).
- `winsorUpperPercentile` (`number`, optional): Clamp unit values above this percentile, in the open interval (0, 100).

Example input: `{"key":"<key>","measureType":"count","name":"<name>","projectKey":"default","successCriteria":"HigherThanBaseline"}`

### `launchdarklymcp_createproject`

CreateProject · Write

Create a new LaunchDarkly project. Projects are top-level containers for feature flags and environments.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `key` (`string`, required): No description.
- `name` (`string`, required): No description.
- `tags` (`array`, optional): No description.

Example input: `{"key":"<key>","name":"<name>"}`

### `launchdarklymcp_invite_members`

InviteMembers · Write

Invite one or more people to the LaunchDarkly account by email. Each invitee receives an email invitation to join. Optionally assign a role (reader, writer, admin) — defaults to reader if not specified.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `emails` (`array`, required): No description.
- `role` (`string`, optional): No description.

Example input: `{"emails":[]}`

### `launchdarklymcp_link_view_resources`

Link View Resources · Write

Link flags, segments, or AgentControl Configs to a view. Views are an Enterprise feature.

IDENTIFYING RESOURCES:
- flags / aiConfigs: pass `keys`
- segments: pass `segmentIdentifiers` ({environmentId, segmentKey} pairs — segments are environment-scoped)
- any type: pass `filter` to link everything matching a list-endpoint filter expression (flags use comma-separated field:value filters, segments use queryfilter syntax; `environmentId` is required with a segments filter). Keys and filter combine as a union.

Large key lists are batched automatically at 20 keys per API request. The response aggregates successCount/failureCount across batches and lists any resources that failed to link.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `resourceType` (`string`, required): No description. One of: `flags`, `segments`, `aiConfigs`.
- `viewKey` (`string`, required): No description.
- `comment` (`string`, optional): No description.
- `environmentId` (`string`, optional): No description.
- `filter` (`string`, optional): No description.
- `keys` (`array`, optional): No description.
- `segmentIdentifiers` (`array`, optional): No description.

Example input: `{"projectKey":"default","resourceType":"flags","viewKey":"<viewKey>"}`

### `launchdarklymcp_load_skill`

Load Skill · Write

Read a LaunchDarkly skill guide listed by `get-skills`.

Pass a `skill` key such as `feature-flags/launchdarkly-flag-cleanup`. The response `text` is the guide body. Pass a `reference` path from the guide's `references` list, such as `references/pr-template.md`, to read that supporting file instead.

The `related` field names the guide keys to load next for adjacent work. Responses are capped at 75 KB.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `skill` (`string`, required): No description.
- `reference` (`string`, optional): No description.

Example input: `{"skill":"<skill>"}`

### `launchdarklymcp_runevaluation`

RunEvaluation · Write

Start a new run of an AI evaluation. This executes the evaluation against the configured dataset and judge criteria. Returns the run ID and status.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `evaluationId` (`string`, required): No description.
- `projectKey` (`string`, required): No description.
- `datasetId` (`string`, optional): No description.
- `playgroundId` (`string`, optional): No description.
- `rowSelectionMode` (`string`, optional): No description. One of: `all`, `top`, `random`.
- `rowSelectionUnit` (`string`, optional): No description. One of: `count`, `percent`.
- `rowSelectionValue` (`number`, optional): No description.

Example input: `{"evaluationId":"<evaluationId>","projectKey":"default"}`

### `launchdarklymcp_setup_ai_config`

SetupAiConfig · Write

Initialize an AI Config with its first variation and targeting setup in one step.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `configKey` (`string`, required): The key of the AI Config to initialize.
- `environmentKey` (`string`, required): The environment key to set up the AI Config in.
- `projectKey` (`string`, required): The project key identifying which project to set up the AI Config in.
- `model` (`object`, optional): Model settings for the initial variation.
- `prompt` (`array`, optional): Prompt messages for the initial variation.

Example input: `{"configKey":"<configKey>","environmentKey":"<environmentKey>","projectKey":"default"}`

### `launchdarklymcp_startguardedrollout`

StartGuardedRollout · Write

Start a guarded rollout on a flag's default rule (fallthrough). A guarded rollout progressively increases traffic to the test variation through a series of stages while monitoring metrics for regressions. Each stage specifies a rolloutWeight (percentage in thousandths, e.g. 10000 = 10%) and a monitoring window in milliseconds. Metrics define what to monitor and whether to notify or rollback on regression. Requires the flag to be on and not already have an active guarded rollout. If the environment requires approval, the response includes requiresApproval: true and the attempted instructions; call `create-approval-request` with the returned instructions to submit it for review.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `controlVariationId` (`string`, required): No description.
- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `flagKey` (`string`, required): No description.
- `metrics` (`array`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `randomizationUnit` (`string`, required): No description.
- `stages` (`array`, required): No description.
- `testVariationId` (`string`, required): No description.
- `comment` (`string`, optional): No description.
- `ruleId` (`string`, optional): Targeting rule _id from get-flags. Omit to start the rollout on the flag's default rule.
- `updateDefaultRuleOnCompletion` (`boolean`, optional): Rule targets only. When true, completing the rollout deletes the rule and makes the default rule serve the test variation.

Example input: `{"controlVariationId":"<controlVariationId>","environmentKey":"<environmentKey>","flagKey":"<flagKey>","metrics":[],"projectKey":"default","randomizationUnit":"<randomizationUnit>","stages":[],"testVariationId":"<testVariationId>"}`

### `launchdarklymcp_toggle_alert`

ToggleAlert · Write

Enable or disable an observability alert without changing its configuration.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `alertId` (`number`, required): No description.
- `confirm` (`boolean`, required): Confirm this destructive operation.
- `enabled` (`boolean`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.

Example input: `{"alertId":1,"confirm":true,"enabled":true,"projectKey":"default"}`

### `launchdarklymcp_toggle_flag`

ToggleFlag · Write

Turn a feature flag on or off in a specific environment. When off, all users receive the off variation.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `env` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `flagKey` (`string`, required): No description.
- `on` (`boolean`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `comment` (`string`, optional): No description.

Example input: `{"confirm":true,"env":"<env>","flagKey":"<flagKey>","on":true,"projectKey":"default"}`

### `launchdarklymcp_unlink_view_resources`

Unlink View Resources · Write

Unlink flags, segments, or AgentControl Configs from a view. Views are an Enterprise feature. Requires confirm=true, which approves the unlink. Unlinking never deletes flags, segments, or AgentControl Configs; only their link to the view is removed.

IDENTIFYING RESOURCES:
- flags / aiConfigs: pass `keys`
- segments: pass `segmentIdentifiers` ({environmentId, segmentKey} pairs)
- any type: pass `filter` to unlink everything matching a list-endpoint filter expression (`environmentId` is required with a segments filter). Keys and filter combine as a union.

Up to 100 keys or segmentIdentifiers per call, batched automatically at 20 per API request; split longer lists into several calls. The response aggregates successCount/failureCount across batches and lists any resources that failed to unlink.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Set true to approve unlinking these resources from the view. This only removes the links; it never deletes the resources.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `resourceType` (`string`, required): No description. One of: `flags`, `segments`, `aiConfigs`.
- `viewKey` (`string`, required): No description.
- `comment` (`string`, optional): No description.
- `environmentId` (`string`, optional): No description.
- `filter` (`string`, optional): No description.
- `keys` (`array`, optional): No description.
- `segmentIdentifiers` (`array`, optional): No description.

Example input: `{"confirm":true,"projectKey":"default","resourceType":"flags","viewKey":"<viewKey>"}`

### `launchdarklymcp_update_agent_config`

Update Agent Config · Write

Update an AgentControl Config. resource is required and picks what changes. resource=config: name, description, tags, defaultVariationKey (the variation new environments serve by default; existing environments keep their fallthrough, so change those with resource=targeting), evaluationMetricKey, isInverted, or maintainer (maintainerId or maintainerTeamKey, not both; an empty string removes it). Configs cannot be archived. resource=variation: one variation's name (variationName), model, prompts, tools, or skills, by variationKey. resource=targeting: one environment's targeting, in a single write: on turns targeting on or off; fallthrough sets the default for contexts no rule matches ({"variationKey":"candidate"} serves one variation, {"weights":[{"variationKey":"a","percent":50},{"variationKey":"b","percent":50}]} splits traffic); targetingInstructions changes rules and individual targets with kinds addRule, removeRule, reorderRules, replaceRules, updateRuleDescription, addClauses, removeClauses, addValuesToClause, removeValuesFromClause, updateClause, addTargets, removeTargets, clearTargets, and replaceTargets; rule kinds take ruleId, each kind takes variationKey where it serves a variation, and addTargets and removeTargets also require contextKind (for example user) and values. variation and targeting require confirm=true.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `configKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `resource` (`string`, required): config: the config's metadata. variation: one variation. targeting: one environment's on/off, fallthrough, rules, and individual targets. One of: `config`, `variation`, `targeting`.
- `archived` (`boolean`, optional): Not supported: a config cannot be archived; the tool rejects this field.
- `comment` (`string`, optional): No description.
- `confirm` (`boolean`, optional): Required true for resource=variation and resource=targeting.
- `defaultVariationKey` (`string`, optional): No description.
- `description` (`string`, optional): No description.
- `env` (`string`, optional): Environment key. If the user hasn't named one, ask; don't guess.
- `evaluationMetricKey` (`string`, optional): No description.
- `fallthrough` (`string`, optional): The default for contexts no rule matches: {variationKey} serves one variation; {weights, contextKind?, bucketBy?} is a percentage rollout whose percents sum to 100.
- `instructions` (`string`, optional): The variation's system prompt.
- `isInverted` (`boolean`, optional): True when a lower evaluation metric value is better. False when a higher value is better.
- `judgeConfiguration` (`object`, optional): No description.
- `maintainerId` (`string`, optional): A member ID.
- `maintainerTeamKey` (`string`, optional): No description.
- `messages` (`array`, optional): No description.
- `modelConfigKey` (`string`, optional): A model config key from get-ai-model-configs: a global Provider.model-id key such as OpenAI.gpt-4o, or a custom model config's own key.
- `modelName` (`string`, optional): No description.
- `name` (`string`, optional): No description.
- `on` (`boolean`, optional): resource=targeting: turn targeting on or off.
- `parameters` (`object`, optional): No description.
- `skills` (`array`, optional): Agent skills to attach, as {key, version} from get-agent-skills. On update, the array replaces the attached skills; [] detaches them all.
- `tags` (`array`, optional): No description.
- `targetingInstructions` (`array`, optional): Semantic patch instructions for rules and individual targets. Each instruction or replaceRules rule takes variationKey (a variation key or name) or variationId. addTargets and removeTargets take contextKind, variationKey, and values (context keys), e.g. [{"kind":"addTargets","contextKind":"user","variationKey":"candidate","values":["user-1"]}].
- `tools` (`array`, optional): No description.
- `variationKey` (`string`, optional): resource=variation: the variation to update.
- `variationName` (`string`, optional): resource=variation: the variation's new name.

Example input: `{"configKey":"<configKey>","projectKey":"default","resource":"config"}`

### `launchdarklymcp_update_agent_skill`

Update Agent Skill · Write

Update an agent skill's markdown, name, description, tags, or maintainer. Only provided fields are updated. Variations stay pinned to the version they attached; use list-agent-skill-references to find them and update-agentcontrol-config-variation to move them to the new version.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `skillKey` (`string`, required): No description.
- `description` (`string`, optional): No description.
- `maintainerId` (`string`, optional): No description.
- `maintainerTeamKey` (`string`, optional): No description.
- `markdown` (`string`, optional): Replaces the SKILL.md content.
- `moveVariations` (`object`, optional): Re-point AgentControl Config variations to one version of this skill, after any other changes here.
- `name` (`string`, optional): No description.
- `tags` (`array`, optional): Replaces the skill's tags.

Example input: `{"confirm":true,"projectKey":"default","skillKey":"<skillKey>"}`

### `launchdarklymcp_update_ai_config`

UpdateAiConfig · Write

Update the metadata for an AI Config such as name, description, and tags.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `configKey` (`string`, required): The key of the AI Config to update.
- `projectKey` (`string`, required): The project key identifying which project contains the AI Config.
- `description` (`string`, optional): The updated description for the AI Config.
- `name` (`string`, optional): The updated display name for the AI Config.
- `tags` (`array`, optional): Array of tags to associate with the AI Config.

Example input: `{"configKey":"<configKey>","projectKey":"default"}`

### `launchdarklymcp_update_ai_config_individual_targets`

UpdateAiConfigIndividualTargets · Write

Update the individual user targeting for an AI Config in a specific environment.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `configKey` (`string`, required): The key of the AI Config to update.
- `env` (`string`, required): The environment key where the AI Config targeting will be updated.
- `projectKey` (`string`, required): The project key for the LaunchDarkly project.
- `targets` (`array`, optional): The individual user targets to set for this AI Config.

Example input: `{"configKey":"<configKey>","env":"<env>","projectKey":"default"}`

### `launchdarklymcp_update_ai_config_rollout`

UpdateAiConfigRollout · Write

Update the rollout percentages for an AI Config's default rule in a specific environment.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `configKey` (`string`, required): The key of the AI Config to update.
- `env` (`string`, required): The environment key where the rollout will be updated.
- `projectKey` (`string`, required): The project key for the LaunchDarkly project.
- `rollout` (`object`, optional): The rollout configuration defining percentage splits across variations.

Example input: `{"configKey":"<configKey>","env":"<env>","projectKey":"default"}`

### `launchdarklymcp_update_ai_config_targeting_rules`

UpdateAiConfigTargetingRules · Write

Update the targeting rules for an AI Config in a specific environment.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `configKey` (`string`, required): The key of the AI Config to update targeting rules for.
- `env` (`string`, required): The environment key where targeting rules will be updated.
- `projectKey` (`string`, required): The project key identifying which project contains the AI Config.
- `rules` (`array`, optional): Array of targeting rule objects to apply to the AI Config.

Example input: `{"configKey":"<configKey>","env":"<env>","projectKey":"default"}`

### `launchdarklymcp_update_ai_config_variation`

UpdateAiConfigVariation · Write

Update a specific variation of an AI Config, including its prompt, model settings, and parameters.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `configKey` (`string`, required): The key of the AI Config that contains the variation to update.
- `projectKey` (`string`, required): The project key identifying which project contains the AI Config.
- `variationId` (`string`, required): The ID of the variation to update.
- `model` (`object`, optional): Model settings for this variation such as model name and parameters.
- `name` (`string`, optional): The updated name for the variation.
- `prompt` (`array`, optional): Prompt messages array for this variation.

Example input: `{"configKey":"<configKey>","projectKey":"default","variationId":"<variationId>"}`

### `launchdarklymcp_update_ai_model_config`

Update Ai Model Config · Write

Update an AI model config. Requires confirm=true. modelConfigKey is the key, not the id: for example OpenAI.gpt-4o for a global model, or the key a custom model was created with, which often has no provider prefix (for example gpt-image-2-custom). Pass the model key the user gives as modelConfigKey without asking or looking it up first. restricted=true stops variations from selecting the model and works on global models; restricted=false allows it again. The other fields change only custom models (global=false); params, customParams, and tags replace the current values. provider and id cannot change: create a new model config instead. If restricting fails because the key is in use, move those variations to another modelConfigKey, then retry.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): No description.
- `modelConfigKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `costPerCachedInputToken` (`number`, optional): No description.
- `costPerInputToken` (`number`, optional): No description.
- `costPerOutputToken` (`number`, optional): No description.
- `customParams` (`object`, optional): Replaces the current customParams.
- `maintainerId` (`string`, optional): No description.
- `maintainerTeamKey` (`string`, optional): No description.
- `name` (`string`, optional): No description.
- `params` (`object`, optional): Replaces the current params.
- `restricted` (`boolean`, optional): true restricts the model so variations cannot select it; false removes the restriction.
- `tags` (`array`, optional): Replaces the current tags.

Example input: `{"confirm":true,"modelConfigKey":"<modelConfigKey>","projectKey":"default"}`

### `launchdarklymcp_update_ai_tool`

UpdateAiTool · Write

Update an AI tool definition's description or schema. All fields are optional: only provided fields are updated. The schema should be a raw JSON Schema object with type, properties, and required fields.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `toolKey` (`string`, required): No description.
- `customParameters` (`object`, optional): Application metadata, not sent to the model.
- `description` (`string`, optional): No description.
- `schema` (`object`, optional): No description.
- `tags` (`array`, optional): Replaces the tool's tags.

Example input: `{"projectKey":"default","toolKey":"<toolKey>"}`

### `launchdarklymcp_update_automated_rollout_config`

Update Automated Rollout Config · Write

Modify an automated rollout config that has not started releasing. Pass only what changes: environments, repoFullName, prNumber, or prUrl; omitted fields stay as they are. environments REPLACES the whole ordered plan, so an environment you omit is removed: read the config with get-automated-rollout-config, edit that list, and send it back complete. Each environment takes the shape create-automated-rollout-config accepts: releaseType is override (default) or policy, never immediate, so an immediate release passes only environmentKey. The config must be active with an unmerged PR, and an environment is editable only while its status is "pending" and release_lifecycle_status is "not_started". Otherwise LaunchDarkly returns a conflict, which is terminal: do not retry. Returns updated and the config as stored.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `configId` (`string`, required): Id of the rollout config to modify.
- `confirm` (`boolean`, required): Confirm this destructive operation.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `environments` (`array`, optional): Complete replacement plan, in order. An environment you omit is removed.
- `prNumber` (`number`, optional): Pull request number.
- `prUrl` (`string`, optional): Full pull request URL.
- `repoFullName` (`string`, optional): GitHub repository as owner/repo.

Example input: `{"configId":"<configId>","confirm":true,"projectKey":"default"}`

### `launchdarklymcp_update_dashboard`

Update Dashboard · Write

Update an existing dashboard. Only the fields you provide are changed; everything else is preserved. Use create-graph/update-graph to add or edit charts.

INPUTS:
- projectKey (required): The LaunchDarkly project key (e.g., "default").
- dashboardId (required): The numeric ID of the dashboard (from list-dashboards)
- name (optional): New dashboard name
- timePreset (optional): New default time range, e.g. "last_24_hours", "last_7_days"
- graphIds (optional): Reorder (or hide) graphs — the full ordered list of graph IDs to display. Any existing graph omitted from this list disappears from the dashboard grid (it still exists; re-add its ID to show it again). Get current IDs from get-dashboard.
- variables (optional): REPLACES the full list of dashboard template variables. Each entry:
  - key, defaultValues (array), suggestionType (one of None, Value, Key), field (optional)

RETURNS:
- dashboard_updated: Boolean indicating success
- dashboard_id, dashboard_url, name, time_preset, graph_ids (final state)

Example - reorder graphs 10 and 11, dropping graph 12 from view:
{"projectKey": "default", "dashboardId": 12345, "graphIds": [11, 10]}

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `dashboardId` (`number`, required): Numeric dashboard ID from get-dashboards.
- `projectKey` (`string`, required): LaunchDarkly project key.
- `bucketBy` (`string`, optional): Graph only. Field to bucket by, e.g. Timestamp.
- `bucketCount` (`number`, optional): Graph only. Number of buckets.
- `comparisonMode` (`string`, optional): Graph only. Period-over-period comparison mode.
- `display` (`string`, optional): Graph only. Line, Stacked, or Stacked area.
- `environments` (`array`, optional): Graph only. Limit the chart to these LaunchDarkly environments.
- `expressions` (`array`, optional): Graph only. Replaces the aggregation list.
- `formulas` (`array`, optional): Graph only. Calculated series over metricSeries, e.g. A / B * 100 for an error rate; replaces the stored formulas.
- `graphId` (`number`, optional): Numeric ID of a graph on this dashboard. Set it to change that graph; omit it to change the dashboard.
- `graphIds` (`array`, optional): Dashboard only. Graph IDs in display order; graphs you leave out follow the listed ones.
- `groupBy` (`array`, optional): Graph only. Dimension keys from get-keys. [] removes grouping and its ranking.
- `groupByLimit` (`number`, optional): Graph only. Maximum series when grouped.
- `limitAggregator` (`string`, optional): Graph only. Aggregator that ranks groups for groupByLimit. One of: `Count`, `CountDistinct`, `CountDistinctKey`, `Min`, `Avg`, `P50`, `P75`, `P90`, `P95`, `P99`, `Max`, `Sum`.
- `limitColumn` (`string`, optional): Graph only. Column ranked with limitAggregator.
- `metricSeries` (`array`, optional): Graph only. Lettered input series (A, B, ...) for formulas; replaces the stored series. Without it the chart plots query and expressions.
- `name` (`string`, optional): Dashboard only. New dashboard name.
- `productType` (`string`, optional): Graph only. Data source: Logs, Traces, Errors, Sessions, Metrics, PAEvents, or Events; case-insensitive. PAEvents is the product-analytics source the graph editor shows: filter custom events with type="track" key="<name>" and page or screen views with type="*_view" view_name="<path>". Events is the legacy session_events source, filtered with event="<name>".
- `query` (`string`, optional): Graph only. Filter in search syntax, e.g. level=error. "" clears it.
- `services` (`array`, optional): Graph only. Limit the chart to these services.
- `showExemplars` (`boolean`, optional): Graph only. Overlay representative data points.
- `timePreset` (`string`, optional): Dashboard only. Default time range, e.g. last_24_hours or last_7_days.
- `title` (`string`, optional): Graph only. Chart title.
- `type` (`string`, optional): Graph only. "Line chart", "Bar chart", "Table", "Heatmap", or "Funnel chart".
- `variables` (`array`, optional): Dashboard only. Replaces every template variable.

Example input: `{"confirm":true,"dashboardId":1,"projectKey":"default"}`

### `launchdarklymcp_update_error_group_state`

Update Error Group State · Write

Triage an error group: set its state to OPEN, RESOLVED, or IGNORED, and optionally snooze it until a time. Changes whether Errors alerts fire for the group. Requires confirm=true. Check the group with get-error-group first. Returns the state and snoozed_until read back after the change.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `projectKey` (`string`, required): LaunchDarkly project key.
- `secureId` (`string`, required): secure_id of the error group, from search-error-groups.
- `state` (`string`, required): New state. Errors alerts count only OPEN groups that are not snoozed. A RESOLVED group reopens when the error recurs; an IGNORED group stays ignored. One of: `OPEN`, `RESOLVED`, `IGNORED`.
- `snoozedUntil` (`string`, optional): ISO 8601 time with a timezone until which alerts for the group are snoozed; keep state OPEN to snooze. Omit to clear any snooze.

Example input: `{"confirm":true,"projectKey":"default","secureId":"<secureId>","state":"OPEN"}`

### `launchdarklymcp_update_expiring_targets`

Update Expiring Targets · Write

List, add, update, or remove expiring targets on a flag. Expiring targets are automatically removed from targeting after a specified date. Timestamps in the result are UTC.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `action` (`string`, required): No description. One of: `list`, `add`, `update`, `remove`.
- `confirm` (`boolean`, required): Confirm this destructive operation.
- `env` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `flagKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `contextKey` (`string`, optional): No description.
- `contextKind` (`string`, optional): No description.
- `expiresAt` (`string`, optional): No description.
- `variationId` (`string`, optional): No description.

Example input: `{"action":"list","confirm":true,"env":"<env>","flagKey":"<flagKey>","projectKey":"default"}`

### `launchdarklymcp_update_flag`

Update Flag · Write

Update a flag's top-level settings and variations without changing environment targeting. It takes no environment: names, descriptions, tags, maintainers, and variations are project-wide, so never ask for one. Accepted instruction kinds: updateName, updateDescription, addTags and removeTags (values array), makeFlagTemporary, makeFlagPermanent, updateMaintainerMember, updateMaintainerTeam, addCustomProperties, replaceCustomProperties, removeCustomProperties, updateDefaultVariation, addVariation, updateVariation. updateDefaultVariation takes OnVariationValue and/or OffVariationValue (PascalCase), the variation values themselves, not indexes; for example {"kind":"updateDefaultVariation","OnVariationValue":true,"OffVariationValue":false}. Repeating an addVariation with the same value, name and description is a no-op; the same value with a different name or description is rejected (use updateVariation). Turning a flag on or off is environment-scoped: use toggle-flag, not turnFlagOn or turnFlagOff here. Pass either instructions or variationJsonSchema, never both; make two separate calls.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `flagKey` (`string`, required): The feature flag key. The key identifies the flag in your code.
- `projectKey` (`string`, required): The project key
- `comment` (`string`, optional): Optional audit comment.
- `dryRun` (`boolean`, optional): If true, the patch will be validated but not persisted. Returns a preview of the flag after the patch is applied.
- `instructions` (`array`, optional): Metadata-only semantic patch instructions.
- `variationJsonSchema` (`object`, optional): JSON schema that replaces the flag's variation schema.

Example input: `{"flagKey":"<flagKey>","projectKey":"default"}`

### `launchdarklymcp_update_flag_targeting`

Update Flag Targeting · Write

Add, remove, or replace users or contexts in individual flag targeting, and add or remove flag prerequisites, in one environment. Accepts only the instruction kinds addTargets, removeTargets, replaceTargets, addPrerequisite and removePrerequisite; use update-targeting-rules for rules.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `env` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `flagKey` (`string`, required): No description.
- `instructions` (`array`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `comment` (`string`, optional): No description.

Example input: `{"confirm":true,"env":"<env>","flagKey":"<flagKey>","instructions":[],"projectKey":"default"}`

### `launchdarklymcp_update_metric`

Update Metric · Write

Change an existing metric. Send only the fields to change; each one replaces the current value as a JSON Patch replace, so tags and analysisUnits must list every entry the metric should keep, and denominator replaces the whole denominator term. percentile sets analysisType to percentile and percentileValue. measureType and valueAggregation are sent as isNumeric and unitAggregationType, the same mapping create-metric uses. JSON null clears a window offset, a winsor bound, traceQuery, traceValueLocation, unitAggregationField, filters, or the denominator. A disabled eventDefault matches a read-back that omits value. Fields that only apply to some metric kinds are still sent; LaunchDarkly rejects illegal combinations. LaunchDarkly accepts an analysis unit only if its context kind is marked available for experiments and guarded rollouts in the project. Timestamps in the result are UTC.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `metricKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `analysisUnits` (`array`, optional): Context kinds to analyze the metric by. Replaces the metric's whole list.
- `archived` (`boolean`, optional): Whether the metric version is archived.
- `denominator` (`string`, optional): Replaces the metric's whole ratio denominator term; JSON null clears it. The metric's own event is the numerator term. Custom metrics on a warehouse data source only.
- `description` (`string`, optional): No description.
- `eventDefault` (`object`, optional): How units that sent no event count. disabled: true leaves them out of the analysis instead of counting them as value. Gonfalon omits value when disabled is true.
- `eventKey` (`string`, optional): Event key of a custom metric.
- `filters` (`string`, optional): Replaces the metric's event filters. JSON null clears them. Custom metrics only.
- `isActive` (`boolean`, optional): Whether the metric is active.
- `maintainerId` (`string`, optional): The ID of the member who maintains this metric.
- `measureType` (`string`, optional): distinct counts each unit's unique values of the unitAggregationField column; it does not use valueColumn. One of: `count`, `occurrence`, `value`, `distinct`.
- `name` (`string`, optional): No description.
- `percentile` (`integer`, optional): Analyze this percentile of unit values instead of the mean. Sent as analysisType percentile and percentileValue. Requires eventDefault.disabled true.
- `selector` (`string`, optional): CSS selector of a click metric.
- `successCriteria` (`string`, optional): Whether higher or lower values than the baseline count as an improvement. One of: `HigherThanBaseline`, `LowerThanBaseline`.
- `tags` (`array`, optional): Replaces the metric's whole tag list.
- `traceQuery` (`string`, optional): Trace query of a trace metric. JSON null clears it. Gonfalon still requires a query on a trace metric, so clearing traceQuery is rejected there.
- `traceValueLocation` (`string`, optional): Where a numeric trace metric reads its number. JSON null clears it.
- `unit` (`string`, optional): Unit label for a numeric metric, for example USD or ms.
- `unitAggregationField` (`string`, optional): Warehouse column whose unique values are counted per unit. JSON null clears it.
- `urls` (`array`, optional): Target URLs of a click or pageview metric.
- `valueAggregation` (`string`, optional): How a measureType value metric aggregates unit values. Requires measureType. One of: `sum`, `average`.
- `valueColumn` (`string`, optional): Warehouse column holding the numeric value for measureType value.
- `windowEndOffset` (`integer`, optional): End of the measurement window, in milliseconds after the unit's first exposure. JSON null clears it. Gonfalon requires both offsets set or both cleared.
- `windowStartOffset` (`integer`, optional): Start of the measurement window, in milliseconds after the unit's first exposure. JSON null clears it. Gonfalon requires both offsets set or both cleared.
- `winsorIncludeImputed` (`boolean`, optional): Count the 0 imputed for units without events when computing the winsorization bounds.
- `winsorLowerPercentile` (`number`, optional): Clamp unit values below this percentile, in the open interval (0, 100). JSON null clears the lower bound.
- `winsorUpperPercentile` (`number`, optional): Clamp unit values above this percentile, in the open interval (0, 100). JSON null clears the upper bound.

Example input: `{"confirm":true,"metricKey":"<metricKey>","projectKey":"default"}`

### `launchdarklymcp_update_off_variation`

Update Off Variation · Write

Set the variation a flag serves when its targeting is OFF, in one environment (env), several (envs), or every environment (allEnvs). One call repairs a whole flag: fallthroughVariationIndex also sets the default rule (what an ON flag serves when no rule matches), and updateFlagDefaults also sets the flag-level defaults that seed new environments (offVariation = variationIndex, onVariation = fallthroughVariationIndex). Each variationIndex is a 0-based position in the flag's variations; use get-flag to see them. For boolean flags, 0 = true, 1 = false by convention. Environments that already match are left alone. An environment that requires approval is reported as blocked with the instructions to pass to `create-approval-request`; the other environments still apply.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `envs` (`array`, required): No description.
- `flagKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `variationIndex` (`integer`, required): No description.
- `comment` (`string`, optional): No description.
- `fallthroughVariationIndex` (`integer`, optional): No description.

Example input: `{"confirm":true,"envs":[],"flagKey":"<flagKey>","projectKey":"default","variationIndex":1}`

### `launchdarklymcp_update_playground`

UpdatePlayground · Write

Update an LLM playground's name, variants, or archived status. All fields are optional.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `playgroundId` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `archived` (`boolean`, optional): No description.
- `name` (`string`, optional): No description.
- `variants` (`array`, optional): No description.

Example input: `{"playgroundId":"<playgroundId>","projectKey":"default"}`

### `launchdarklymcp_update_project`

Update Project · Write

Rename a LaunchDarkly project or change its tags. Send only the fields to change; each one replaces the current value, so tags must list every tag the project should keep. To add a tag, read the current tags with get-projects first. The project key cannot change.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `name` (`string`, optional): No description.
- `tags` (`array`, optional): Replaces the project's whole tag list.

Example input: `{"projectKey":"default"}`

### `launchdarklymcp_update_prompt_snippet`

UpdatePromptSnippet · Write

Update an existing prompt snippet. Creates a new version of the snippet. All fields are optional — only provided fields are updated.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `snippetKey` (`string`, required): No description.
- `description` (`string`, optional): No description.
- `name` (`string`, optional): No description.
- `tags` (`array`, optional): No description.
- `text` (`string`, optional): No description.

Example input: `{"projectKey":"default","snippetKey":"<snippetKey>"}`

### `launchdarklymcp_update_rollout`

UpdateRollout · Write

Change the default rule (fallthrough) for a flag. Set a percentage rollout across variations or serve a single variation to all unmatched users. Weights must sum to 100. Use human-friendly percentages (e.g., 80 for 80%). If the environment requires approval, the response includes requiresApproval: true and the attempted instructions; call `create-approval-request` with the returned instructions to submit it for review.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `env` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `flagKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `rolloutType` (`string`, required): No description. One of: `percentage`, `variation`.
- `comment` (`string`, optional): No description.
- `contextKind` (`string`, optional): No description.
- `variationIndex` (`integer`, optional): No description.
- `weights` (`array`, optional): No description.

Example input: `{"confirm":true,"env":"<env>","flagKey":"<flagKey>","projectKey":"default","rolloutType":"percentage"}`

### `launchdarklymcp_update_view`

Update View · Write

Update a view's name, description, maintainer, or tags. Views are an Enterprise feature. Include only the fields to change — provided values replace the existing ones (tags are replaced wholesale, not merged). Only one of maintainerId or maintainerTeamKey can be specified. The view key cannot be changed.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `viewKey` (`string`, required): No description.
- `description` (`string`, optional): No description.
- `maintainerId` (`string`, optional): No description.
- `maintainerTeamKey` (`string`, optional): No description.
- `name` (`string`, optional): No description.
- `tags` (`array`, optional): No description.

Example input: `{"projectKey":"default","viewKey":"<viewKey>"}`

### `launchdarklymcp_apply_approval_request`

ApplyApprovalRequest · Destructive

Apply an already-approved approval request. This executes the changes that were approved by reviewers. Only works on requests with reviewStatus 'approved'. Does NOT approve requests: that must be done by a human reviewer.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `id` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `comment` (`string`, optional): No description.

Example input: `{"confirm":true,"id":"<id>","projectKey":"default"}`

### `launchdarklymcp_archive_automated_rollout_config`

Archive Automated Rollout Config · Destructive

Archive an automated rollout config so the scheduler stops processing it. It is a soft delete: the config stays readable with get-automated-rollout-config, with status "archived". Returns archived, config_id, and project_key.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `configId` (`string`, required): Rollout config id returned by create-automated-rollout-config.
- `confirm` (`boolean`, required): Confirm this destructive operation.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.

Example input: `{"configId":"<configId>","confirm":true,"projectKey":"default"}`

### `launchdarklymcp_archive_flag`

ArchiveFlag · Destructive

Archive a feature flag (reversible). This is a soft-delete that can be undone. Recommended as the first step before permanent deletion. Always run check-removal-readiness before archiving.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `flagKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `comment` (`string`, optional): No description.

Example input: `{"confirm":true,"flagKey":"<flagKey>","projectKey":"default"}`

### `launchdarklymcp_copy_flag_config`

CopyFlagConfig · Destructive

Copy a flag's targeting configuration from one environment to another. Common use: promote from staging to production. Optionally select which aspects to copy: targeting, rules, offVariation, prerequisites, on state. If the target environment requires approval, the response includes requiresApproval: true and an approvalUrl; follow the approvalUrl to submit the copy request for review.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `flagKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `sourceEnv` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `targetEnv` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `excludedActions` (`array`, optional): No description.
- `includedActions` (`array`, optional): No description.

Example input: `{"confirm":true,"flagKey":"<flagKey>","projectKey":"default","sourceEnv":"<sourceEnv>","targetEnv":"<targetEnv>"}`

### `launchdarklymcp_delete_agent_config`

Delete Agent Config · Destructive

Permanently delete an AgentControl Config (resource=config) or one of its variations (resource=variation, with variationKey). Requires confirm=true.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `configKey` (`string`, required): No description.
- `confirm` (`boolean`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `resource` (`string`, required): No description. One of: `config`, `variation`.
- `variationKey` (`string`, optional): resource=variation: the variation to delete.

Example input: `{"configKey":"<configKey>","confirm":true,"projectKey":"default","resource":"config"}`

### `launchdarklymcp_delete_agent_skill`

Delete Agent Skill · Destructive

Permanently delete an agent skill and all of its versions. THIS IS IRREVERSIBLE. LaunchDarkly rejects the delete while any variation still attaches the skill; use list-agent-skill-references to find and detach them first. Requires confirm=true to execute.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): No description.
- `projectKey` (`string`, required): No description.
- `skillKey` (`string`, required): No description.

Example input: `{"confirm":true,"projectKey":"default","skillKey":"<skillKey>"}`

### `launchdarklymcp_delete_ai_config`

DeleteAiConfig · Destructive

Permanently delete an AI Config and all its variations. This is irreversible.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `configKey` (`string`, required): The key of the AI Config to permanently delete.
- `projectKey` (`string`, required): The project key identifying which project contains the AI Config to delete.

Example input: `{"configKey":"<configKey>","projectKey":"default"}`

### `launchdarklymcp_delete_ai_config_variation`

DeleteAiConfigVariation · Destructive

Delete a variation from an AI Config. This is permanent and cannot be undone.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `configKey` (`string`, required): The key of the AI Config that contains the variation to delete.
- `projectKey` (`string`, required): The project key identifying which project contains the AI Config.
- `variationId` (`string`, required): The ID of the variation to permanently delete.

Example input: `{"configKey":"<configKey>","projectKey":"default","variationId":"<variationId>"}`

### `launchdarklymcp_delete_ai_model_config`

Delete Ai Model Config · Destructive

Permanently delete a custom AI model config. Requires confirm=true. modelConfigKey is the key, not the id. Global models cannot be deleted; restrict them with update-ai-model-config instead. If the API returns "model config is still in use", move those variations to another modelConfigKey, then retry.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): No description.
- `modelConfigKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.

Example input: `{"confirm":true,"modelConfigKey":"<modelConfigKey>","projectKey":"default"}`

### `launchdarklymcp_delete_ai_tool`

DeleteAiTool · Destructive

Permanently delete an AI tool definition. THIS IS IRREVERSIBLE. Any AgentControl Config variations referencing this tool will lose the attachment. Requires confirm=true to execute.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm for this operation.
- `projectKey` (`string`, required): Project Key for this operation.
- `toolKey` (`string`, required): Tool Key for this operation.

Example input: `{"confirm":true,"projectKey":"default","toolKey":"<toolKey>"}`

### `launchdarklymcp_delete_alert`

DeleteAlert · Destructive

Permanently delete an observability alert. THIS IS IRREVERSIBLE. Requires confirm=true to execute. Use get-alert first to verify you are deleting the right alert.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `alertId` (`number`, required): The numeric ID of the alert to delete
- `confirm` (`boolean`, required): Must be true to execute the deletion
- `projectKey` (`string`, required): The LaunchDarkly project key (e.g., "default").

Example input: `{"alertId":1,"confirm":true,"projectKey":"default"}`

### `launchdarklymcp_delete_dashboard`

DeleteDashboard · Destructive

Permanently delete a dashboard (visualization) and all of its graphs. THIS IS IRREVERSIBLE. Requires confirm=true to execute. Use get-dashboard first to verify you are deleting the right dashboard.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Must be true to execute the deletion
- `dashboardId` (`number`, required): The numeric ID of the dashboard to delete (from list-dashboards)
- `projectKey` (`string`, required): The LaunchDarkly project key (e.g., "default").

Example input: `{"confirm":true,"dashboardId":1,"projectKey":"default"}`

### `launchdarklymcp_delete_flag`

DeleteFlag · Destructive

Permanently delete a feature flag and all its targeting rules across all environments. This is irreversible.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Must be set to true to confirm permanent deletion of the flag.
- `flagKey` (`string`, required): The key of the feature flag to permanently delete.
- `projectKey` (`string`, required): The project key where the flag resides.

Example input: `{"confirm":true,"flagKey":"<flagKey>","projectKey":"default"}`

### `launchdarklymcp_delete_graph`

Delete Graph · Destructive

Permanently remove a single chart/graph from its dashboard. THIS IS IRREVERSIBLE. The dashboard itself is untouched. Requires confirm=true to execute. Use get-dashboard first to verify you are deleting the right graph.

INPUTS:
- projectKey (required): The LaunchDarkly project key (e.g., "default").
- graphId (required): The numeric ID of the graph to delete (from get-dashboard)
- confirm (required): Must be true to execute the deletion

RETURNS:
- deleted: Boolean indicating success
- graph_id: ID of the deleted graph

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Must be true to delete.
- `dashboardId` (`number`, required): Numeric ID of the dashboard the graph is on, from get-dashboards.
- `graphId` (`number`, required): Numeric ID of the graph to delete.
- `projectKey` (`string`, required): LaunchDarkly project key.

Example input: `{"confirm":true,"dashboardId":1,"graphId":1,"projectKey":"default"}`

### `launchdarklymcp_delete_metric`

Delete Metric · Destructive

Permanently delete a metric. LaunchDarkly refuses while a flag, experiment, guarded rollout, metric group, or release policy uses it.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): No description.
- `metricKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.

Example input: `{"confirm":true,"metricKey":"<metricKey>","projectKey":"default"}`

### `launchdarklymcp_delete_prompt_snippet`

DeletePromptSnippet · Destructive

Permanently delete a prompt snippet. THIS IS IRREVERSIBLE. Any AgentControl Config variations referencing this snippet will lose their reference. Requires confirm=true to execute.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm for this operation.
- `projectKey` (`string`, required): Project Key for this operation.
- `snippetKey` (`string`, required): Snippet Key for this operation.

Example input: `{"confirm":true,"projectKey":"default","snippetKey":"<snippetKey>"}`

### `launchdarklymcp_delete_segment`

Delete Segment · Destructive

Permanently delete a segment from one environment. This is irreversible and requires confirm=true. Check that no flag targeting rules reference the segment first.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): No description.
- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `segmentKey` (`string`, required): No description.

Example input: `{"confirm":true,"environmentKey":"<environmentKey>","projectKey":"default","segmentKey":"<segmentKey>"}`

### `launchdarklymcp_delete_view`

Delete View · Destructive

Delete a view by key. THIS IS IRREVERSIBLE. Requires confirm=true to execute. Views are an Enterprise feature. Deleting a view does not delete the linked resources, only the view and its links.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `viewKey` (`string`, required): No description.

Example input: `{"confirm":true,"projectKey":"default","viewKey":"<viewKey>"}`

### `launchdarklymcp_deleteagentgraph`

DeleteAgentGraph · Destructive

Permanently delete an agent graph and all of its edges. THIS IS IRREVERSIBLE. Requires confirm=true to execute.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm for this operation.
- `graphKey` (`string`, required): Graph Key for this operation.
- `projectKey` (`string`, required): Project Key for this operation.

Example input: `{"confirm":true,"graphKey":"<graphKey>","projectKey":"default"}`

### `launchdarklymcp_deletedataset`

DeleteDataset · Destructive

Permanently delete an offline dataset and its associated metadata. THIS IS IRREVERSIBLE. Requires confirm=true to execute.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Must be set to true to confirm the irreversible deletion of the dataset.
- `datasetId` (`string`, required): The unique identifier of the dataset to permanently delete.
- `projectKey` (`string`, required): The project key identifying which project the dataset belongs to.

Example input: `{"confirm":true,"datasetId":"<datasetId>","projectKey":"default"}`

### `launchdarklymcp_saveandstartexperimentiteration`

SaveAndStartExperimentIteration · Destructive

Stop the current running iteration, create a new draft iteration with the provided field updates applied, and start it — the API-recommended way to mutate treatments, metrics, methodology, or other fields that are locked while an iteration is running. Provide `changeJustification` to record why a new iteration is needed. Field inputs are the same as `update-experiment`; updates are checked against the new iteration's not_started mutability rules. Fields not allowed in not_started are returned under `skipped` rather than being sent.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `experimentKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `analysisConfig` (`object`, optional): No description.
- `attributes` (`array`, optional): No description.
- `canReshuffleTraffic` (`boolean`, optional): No description.
- `changeJustification` (`string`, optional): No description.
- `covariateId` (`string`, optional): No description.
- `dataSource` (`string`, optional): No description. One of: `launchdarkly`, `snowflake`, `databricks`.
- `description` (`string`, optional): No description.
- `flags` (`object`, optional): No description.
- `flagSettings` (`object`, optional): No description.
- `holdoutId` (`string`, optional): No description.
- `hypothesis` (`string`, optional): No description.
- `maintainerId` (`string`, optional): No description.
- `methodology` (`string`, optional): No description. One of: `bayesian`, `frequentist`, `export_only`.
- `metrics` (`array`, optional): No description.
- `name` (`string`, optional): No description.
- `primaryFunnelKey` (`string`, optional): No description.
- `primarySingleMetricKey` (`string`, optional): No description.
- `randomizationUnit` (`string`, optional): No description.
- `tags` (`array`, optional): No description.
- `treatments` (`array`, optional): No description.

Example input: `{"confirm":true,"environmentKey":"<environmentKey>","experimentKey":"<experimentKey>","projectKey":"default"}`

### `launchdarklymcp_startexperimentiteration`

StartExperimentIteration · Destructive

Start an experiment iteration. This begins data collection for the experiment's current draft iteration and starts allocating live end-user traffic across its treatments. The experiment's flag must be toggled on, a randomization unit must be set, and at least one treatment must have a non-zero allocation percent.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `experimentKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `changeJustification` (`string`, optional): No description.

Example input: `{"confirm":true,"environmentKey":"<environmentKey>","experimentKey":"<experimentKey>","projectKey":"default"}`

### `launchdarklymcp_stopexperimentiteration`

StopExperimentIteration · Destructive

Stop the currently running iteration of an experiment. Data collection ends and the iteration moves to the `stopped` status. A winning treatment is required to stop: pass `winningTreatmentId` (the `_id` of one of the iteration's treatments, available from get-experiment) and an optional `winningReason` explaining the call. If the experiment was inconclusive, declare the baseline/control treatment as the winner.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `experimentKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `winningTreatmentId` (`string`, required): No description.
- `winningReason` (`string`, optional): No description.

Example input: `{"confirm":true,"environmentKey":"<environmentKey>","experimentKey":"<experimentKey>","projectKey":"default","winningTreatmentId":"<winningTreatmentId>"}`

### `launchdarklymcp_stopguardedrollout`

StopGuardedRollout · Destructive

Stop an active guarded rollout on a flag's default rule (fallthrough). This immediately halts the progressive rollout and locks the flag to its current state. If the environment requires approval, the response includes requiresApproval: true and the attempted instructions; call `create-approval-request` with the returned instructions to submit it for review.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `flagKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `comment` (`string`, optional): No description.
- `outcome` (`string`, optional): rollBack serves the control variation. rollForward serves the test variation. Omit to roll back. One of: `rollBack`, `rollForward`.
- `ruleId` (`string`, optional): Targeting rule _id from get-flags. Omit to stop the rollout on the flag's default rule.

Example input: `{"confirm":true,"environmentKey":"<environmentKey>","flagKey":"<flagKey>","projectKey":"default"}`

### `launchdarklymcp_update_alert`

UpdateAlert · Destructive

Update an existing observability alert. Only the fields you provide are changed; everything else is preserved.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `alertId` (`number`, required): Numeric alert ID from get-alerts.
- `confirm` (`boolean`, required): Confirm this destructive operation.
- `projectKey` (`string`, required): LaunchDarkly project key.
- `autoInvestigationEnabled` (`boolean`, optional): When true, each firing starts an AI investigation that posts its diagnosis to the destinations.
- `destinations` (`array`, optional): Replaces the whole destination list.
- `evaluationDelaySeconds` (`number`, optional): Seconds to wait before evaluating each window, so late-arriving data is counted.
- `functionColumn` (`string`, optional): Field to aggregate, e.g. duration for P90 latency. Omit for Count. "" clears it.
- `functionType` (`string`, optional): Aggregator to monitor. One of: `Count`, `CountDistinct`, `CountDistinctKey`, `Min`, `Avg`, `P50`, `P75`, `P90`, `P95`, `P99`, `Max`, `Sum`.
- `groupBy` (`array`, optional): Dimension keys; the alert fires separately per group, e.g. ["service_name"]. [] clears it.
- `investigationCooldownSeconds` (`number`, optional): Minimum seconds between automatic investigations; keep it at or above thresholdCooldown. Defaults to 86400.
- `investigationPermissionMode` (`string`, optional): read investigates and reports; read-write may also open a PR. Defaults to read. One of: `read`, `read-write`.
- `investigationPrompt` (`string`, optional): Standing instructions prepended to each investigation.
- `investigationRepositories` (`array`, optional): Repositories the investigation may read. Without them it cannot correlate a firing with a deploy.
- `messageContent` (`string`, optional): Custom text included in notifications. "" clears it.
- `name` (`string`, optional): New alert name.
- `noDataBehavior` (`string`, optional): State when a window has no data: NORMAL treats it as healthy, ALERT fires, NO_CHANGE keeps the previous state. Defaults to NORMAL. One of: `NORMAL`, `ALERT`, `NO_CHANGE`.
- `populationFunctionType` (`string`, optional): Two-level aggregation: functionType is computed per unit (the groupBy keys, e.g. a user key), then this aggregates across units, e.g. P99 of Sum per user. PercentUnits alerts on the percentage (0-100) of units that sent a query-matching event and needs populationQuery or populationWindow. Requires groupBy and a Constant threshold. One of: `Count`, `CountDistinct`, `CountDistinctKey`, `Min`, `Avg`, `P50`, `P75`, `P90`, `P95`, `P99`, `Max`, `Sum`, `PercentUnits`.
- `populationQuery` (`string`, optional): With populationFunctionType: filter selecting the events whose senders form the population (the denominator), e.g. key=(page_view OR session_start).
- `populationWindow` (`number`, optional): With populationFunctionType: population lookback in seconds, at least thresholdWindow. Defaults to thresholdWindow.
- `productType` (`string`, optional): Data source. LDCustomEvents is LaunchDarkly custom (metric) events, filtered with key=<event key> and environment_id=<environment ID>. One of: `Logs`, `Traces`, `Errors`, `Sessions`, `Metrics`, `Events`, `LDCustomEvents`.
- `query` (`string`, optional): Filter in search syntax, e.g. service_name=api level=error. "" clears it.
- `sendResolvedAlert` (`boolean`, optional): Also notify the destinations when the alert recovers.
- `tags` (`object`, optional): Key/value metadata on the alert, e.g. {"team": "release", "service": "api"}. Replaces all tags.
- `thresholdCondition` (`string`, optional): Outside applies to Anomaly only. One of: `Above`, `AboveOrEqual`, `Below`, `BelowOrEqual`, `Equal`, `NotEqual`, `Outside`.
- `thresholdCooldown` (`number`, optional): Seconds to wait before re-notifying while still alerting.
- `thresholdType` (`string`, optional): Constant compares against thresholdValue; Anomaly detects deviations. One of: `Constant`, `Anomaly`.
- `thresholdValue` (`number`, optional): Value to compare against. Required when thresholdType is Constant.
- `thresholdWindow` (`number`, optional): Evaluation window in seconds, e.g. 300 for the last 5 minutes.
- `warnThresholdValue` (`number`, optional): Optional lower-severity threshold, crossed before thresholdValue, for an early warning.

Example input: `{"alertId":1,"confirm":true,"projectKey":"default"}`

### `launchdarklymcp_update_segment_rules`

UpdateSegmentRules · Destructive

Add, remove, or modify attribute-based targeting rules on a segment. Rules evaluate context attributes to determine segment membership. Clauses within a rule are ANDed; multiple rules use OR logic. Supported kinds: addRule, removeRule, addClauses, removeClauses, updateClause, addValuesToClause, removeValuesFromClause, reorderRules, updateRuleDescription, updateRuleRolloutAndContextKind. If the environment requires approval, the response includes requiresApproval: true and the attempted instructions; call `create-approval-request` with the returned instructions to submit it for review.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `instructions` (`array`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `segmentKey` (`string`, required): No description.
- `comment` (`string`, optional): No description.

Example input: `{"confirm":true,"environmentKey":"<environmentKey>","instructions":[],"projectKey":"default","segmentKey":"<segmentKey>"}`

### `launchdarklymcp_update_segment_targets`

UpdateSegmentTargets · Destructive

Add or remove individual context keys from a segment's included or excluded lists. Included targets always match the segment. Excluded targets never match, even if rules would include them. Supported kinds: addIncludedTargets, removeIncludedTargets, addExcludedTargets, removeExcludedTargets. Each instruction requires contextKind and values. If the environment requires approval, the response includes requiresApproval: true and the attempted instructions; call `create-approval-request` with the returned instructions to submit it for review.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `instructions` (`array`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `segmentKey` (`string`, required): No description.
- `comment` (`string`, optional): No description.

Example input: `{"confirm":true,"environmentKey":"<environmentKey>","instructions":[],"projectKey":"default","segmentKey":"<segmentKey>"}`

### `launchdarklymcp_update_targeting_rules`

UpdateTargetingRules · Destructive

Add, remove, or modify custom targeting rules for a flag in an environment. Rules evaluate top-to-bottom; first matching rule wins. Use get-flag to look up rule _ids, clause _ids, and variation _ids before constructing instructions.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `env` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `flagKey` (`string`, required): No description.
- `instructions` (`array`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `comment` (`string`, optional): No description.

Example input: `{"confirm":true,"env":"<env>","flagKey":"<flagKey>","instructions":[],"projectKey":"default"}`

### `launchdarklymcp_updateagentgraph`

UpdateAgentGraph · Destructive

Update an agent graph's metadata or structure. All fields are optional. If rootConfigKey or edges are provided, both must be present and will fully replace the existing graph structure. Pass name or description to update metadata only.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `graphKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `description` (`string`, optional): No description.
- `edges` (`array`, optional): No description.
- `name` (`string`, optional): No description.
- `rootConfigKey` (`string`, optional): No description.

Example input: `{"confirm":true,"graphKey":"<graphKey>","projectKey":"default"}`

### `launchdarklymcp_updateexperiment`

UpdateExperiment · Destructive

Update fields on an experiment or its current iteration. Which fields are mutable depends on the current iteration's status (not_started, running, stopped). This tool first reads the experiment's mutableFieldsByStatus, applies only the updates that are allowed for the current status via the updateExperimentFields semantic patch, and returns any rejected fields under `skipped` with the reason. If no provided field is mutable, the response includes `currentStatus` and `allowedFields` so you can retry with valid inputs.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `confirm` (`boolean`, required): Confirm this destructive operation.
- `environmentKey` (`string`, required): Environment key. If the user hasn't named one, ask; don't guess.
- `experimentKey` (`string`, required): No description.
- `projectKey` (`string`, required): Project key. If the user hasn't named one, ask; don't guess.
- `analysisConfig` (`object`, optional): No description.
- `attributes` (`array`, optional): No description.
- `canReshuffleTraffic` (`boolean`, optional): No description.
- `covariateId` (`string`, optional): No description.
- `dataSource` (`string`, optional): No description. One of: `launchdarkly`, `snowflake`, `databricks`.
- `description` (`string`, optional): No description.
- `flags` (`object`, optional): No description.
- `flagSettings` (`object`, optional): No description.
- `holdoutId` (`string`, optional): No description.
- `hypothesis` (`string`, optional): No description.
- `maintainerId` (`string`, optional): No description.
- `methodology` (`string`, optional): No description. One of: `bayesian`, `frequentist`, `export_only`.
- `metrics` (`array`, optional): No description.
- `name` (`string`, optional): No description.
- `primaryFunnelKey` (`string`, optional): No description.
- `primarySingleMetricKey` (`string`, optional): No description.
- `randomizationUnit` (`string`, optional): No description.
- `tags` (`array`, optional): No description.
- `treatments` (`array`, optional): No description.

Example input: `{"confirm":true,"environmentKey":"<environmentKey>","experimentKey":"<experimentKey>","projectKey":"default"}`

## Related

Other Developer Tools connectors ([all 131](/agentkit/connectors/?category=developer-tools)):

- [GitHub](/agentkit/connectors/github/): Scalekit connector, OAuth, 217 tools
- [Microsoft Entra ID](/agentkit/connectors/microsoftentraid/): Scalekit connector, OAuth, 82 tools
- [Datadog](/agentkit/connectors/datadog/): Scalekit connector, API key, 105 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
