Skip to main content
Glama
canopy-labs

Featureflip

Official

Replace targeting rules

update_targeting
Destructive

Replace the complete targeting configuration for a flag in one environment in a single update. Because omitted rules are removed, fetch current rules first, then submit the full ordered rule set.

Instructions

REPLACE all targeting rules of a flag in one environment (full PUT — rules not included are removed). Rules are evaluated in order. Get the current rules first with get_targeting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flagYes
rulesYes
projectYes
environmentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

A4.3/5.0
Behavior5/5

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

The destructiveHint annotation already flags danger, and the description adds meaningful behavioral detail: it is a full PUT, omitted rules are removed, and rules are evaluated in order. This goes beyond the annotation and sets proper expectations for a write operation.

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

Conciseness5/5

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

Three short sentences deliver the core action, the destructive consequence, evaluation order, and a safety tip. Every sentence earns its place, and the key 'REPLACE' and 'rules not included are removed' messaging is front-loaded.

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

Completeness4/5

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

For a destructive replacement tool, the description covers the essential risks, ordering, and the recommended precondition. It does not detail return values or error cases, but with no output schema and a straightforward rules-replacement model, the description is sufficiently complete; a small gap remains around how to construct valid rule objects.

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

Parameters2/5

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

Schema description coverage is 0% for top-level parameters, yet the description only elaborates on the behavioral meaning of 'rules' rather than defining the format or purpose of project, flag, environment, or rules as parameters. It does not compensate enough for the missing schema descriptions.

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

Purpose5/5

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

The description states a specific verb ('REPLACE'), a clear resource ('all targeting rules of a flag in one environment'), and the full-PUT semantics that distinguish it from get_targeting. The phrase 'rules not included are removed' leaves no ambiguity about scope.

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

Usage Guidelines4/5

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

The description clearly indicates when to use this tool (full replacement) and explicitly instructs the user to fetch current rules via get_targeting first. It does not explicitly state when not to use it or what alternative to choose for partial updates, so it falls short of a 5.

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