Railflag

v0.1.0
com.railflag/railflag Checked 1 day ago Published 15 days ago

Create, target and roll out feature flags.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_flags List flags

All flags with their state in each environment.

ParameterTypeDescription
searchstring

get_flag Get flag

One flag: variations and full targeting in every environment, with versions for safe updates.

ParameterTypeDescription
key *string

list_environments List environments

Environments, whether they require approval, and their published config versions. Keys are not returned.

create_flag Create flag

Creates a flag, off in every environment. Boolean flags have variations [false, true].

ParameterTypeDescription
key *stringKey used in code, e.g. new-checkout
name *string
descriptionstring
kindstring
tagsarray
typestring
variationsarrayRequired for string/number/json flags

toggle_flag Turn a flag on or off

Turns a flag on or off in one environment. In environments that need approval this returns an approvalUrl for a person.

ParameterTypeDescription
enabled *boolean
environment *string
key *string
reasonstring
watchPlanIdstringA Release Watch plan from suggest_watch_plan: it starts watching when this change is applied

update_targeting Update targeting

Replaces a flag's targeting in one environment. Read it with get_flag first and pass its version as baseVersion so you never overwrite someone else's change. Rules are checked top to bottom; the first match wins.

ParameterTypeDescription
baseVersion *integer
environment *string
key *string
targeting *object
reasonstring
watchPlanIdstringA Release Watch plan from suggest_watch_plan: it starts watching when this change is applied

set_rollout Set a percentage rollout

Sets the percentage split for the default rule, or for one rule by id. percentages has one number per variation and must add up to 100 (e.g. [80, 20] gives 20% true for a boolean flag). Raising a percentage only adds users.

ParameterTypeDescription
environment *string
key *string
percentages *array
reasonstring
ruleIdstring
watchPlanIdstringA Release Watch plan from suggest_watch_plan: it starts watching when this change is applied

get_history Change history

Audit log for the project or one flag: who changed what, when and why.

ParameterTypeDescription
keystring
limitinteger

get_change_request Check an approval

Status of a change waiting for approval: pending, applied, rejected or failed.

ParameterTypeDescription
id *string

suggest_watch_plan Plan what to monitor for a change

Drafts a Release Watch plan for a flag change: which signals to monitor (error rate, latency, conversions, new Sentry issues, the rollout split), the limits, and for how long. Describe the change with percentages (default rule split, like set_rollout), enabled (on/off) or a full targeting. Returns a watchPlanId to pass to the change tool. On plans without Release Watch it says what it would monitor instead.

ParameterTypeDescription
environment *string
key *string
autoPausebooleanPause the rollout on its own when a limit stays broken. Off unless the user asks for it.
enabledboolean
percentagesarray
targetingobject

get_watch Check a Release Watch

A watch: its status (draft, active, passed, paused, stopped), each signal's state, the timeline and the verdict.

ParameterTypeDescription
id *string

list_watches List Release Watches

Watches in the project, newest first, optionally for one flag and by status (comma separated: draft, active, passed, paused, stopped, expired).

ParameterTypeDescription
keystring
statusstring

stop_watch Stop a Release Watch

Stops watching. Doesn't change the flag.

ParameterTypeDescription
id *string

monitoring_coverage What should I monitor?

The project's monitoring coverage: live Production flags nobody watches (ranked by risk), kill switches never tested, flags no SDK evaluates, and services missing error or latency metrics. Business plan.

connect_monitoring Connect a monitoring tool

Starts connecting Prometheus/Grafana, Datadog, Sentry, New Relic or a Slack channel for alerts. Returns a one-time link: give it to the user, who enters the credentials there. Never ask the user for credentials in chat. Admins only.

ParameterTypeDescription
vendor *string
namestring

list_sources Supported sources

Vendors Railflag can import flags from, what it reads from each, and which are coming later.

connect_source Connect a source

Starts a read-only connection to the user's account at another flag vendor (see list_sources). Returns a link the user opens to enter their credentials there. Never ask the user to paste credentials into the chat. After they finish, call get_connection.

ParameterTypeDescription
vendor *stringWhich vendor to import from

get_connection Connection status

Whether the user finished connecting, which source environments are visible, and whether decisions can be compared.

ParameterTypeDescription
connectionId *string

scan_source Scan the source

Reads all flags and their targeting from the connected vendor (read only). Runs in the background: poll get_run with the returned runId.

ParameterTypeDescription
connectionId *string

get_run Job status

Status and result of a scan, compare or apply run.

ParameterTypeDescription
runId *string

plan_migration Plan migration

Builds a dry-run plan from the latest scan. envMap maps source environment ids (from get_connection or the scan) to Railflag environment keys, e.g. {"production": "staging"} to try production data in staging first. Nothing is written.

ParameterTypeDescription
connectionId *string
envMap *object

get_plan Get plan

A plan's summary, issues and items. full=true includes each item's targeting.

ParameterTypeDescription
planId *string
fullboolean

explain_item Explain one flag

The source vendor's definition of one flag next to what it becomes in Railflag, and its issues.

ParameterTypeDescription
key *string
planId *string

update_plan Resolve plan issues

Records decisions on issues. Each issue lists its allowed actions: skip_flag, drop_rule, keep, rename (value = new key), overwrite. Info issues need no decision. Ask the user when the choice is not obviously safe.

ParameterTypeDescription
decisions *array
planId *string
baseVersioninteger

compare_decisions Compare with the source

Asks the source vendor what sample users get (AB Tasty: Decision API, needs a Decision API key on the connection; Unleash: its server-side playground) without recording anything, and compares with the plan. Runs in the background: poll get_run.

ParameterTypeDescription
environment *stringRailflag environment key in the plan
planId *string
contextsarraySpecific users to check; each needs a "key" (the user id)
sampleSizeinteger

apply_plan Apply plan

Writes the plan into one Railflag environment. Running it again changes nothing. Environments that need approval return an approvalUrl for a person. Never writes to the source vendor.

ParameterTypeDescription
environment *string
planId *string
planVersioninteger

rollback_run Roll back an import

Undoes one apply run: restores previous targeting and archives flags it created.

ParameterTypeDescription
runId *string

disconnect_source Disconnect a source

Deletes the stored credentials for a source connection.

ParameterTypeDescription
connectionId *string

get_code_guide Code migration guide

How to rewrite the source vendor's SDK calls to OpenFeature with Railflag: setup, regex patterns, before/after examples, notes. Apply it in the user's repo yourself and show them the diff.

ParameterTypeDescription
vendor *string
languagestringLanguage of the code to migrate