Skip to main content
Glama
cuongtl1992

Unleash MCP (Feature Toggle)

deleteStrategy

Remove a strategy configuration from a feature flag in a specified environment to manage and streamline feature toggles effectively.

Instructions

Delete a strategy configuration from a feature flag in the specified environment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes
featureNameYes
projectIdYes
strategyIdYes

Implementation Reference

  • Handler function that executes the deleteStrategy tool logic by calling deleteFeatureStrategy and returning formatted success/error responses.
    export async function handleDeleteStrategy(params: {
      projectId: string;
      featureName: string;
      environment: string;
      strategyId: string;
    }) {
      try {
        // Delete the feature strategy
        const result = await deleteFeatureStrategy(
          params.projectId,
          params.featureName,
          params.environment,
          params.strategyId
        );
        
        if (!result) {
          return {
            content: [{ 
              type: "text", 
              text: JSON.stringify({ 
                success: false,
                error: `Failed to delete strategy ${params.strategyId} from feature flag '${params.featureName}'` 
              }, null, 2)
            }],
            isError: true
          };
        }
        
        return {
          content: [{ 
            type: "text", 
            text: JSON.stringify({ 
              success: true,
              message: `Successfully deleted strategy ${params.strategyId} from feature flag '${params.featureName}' in environment '${params.environment}'`
            }, null, 2)
          }]
        };
      } catch (error: any) {
        return {
          content: [{ 
            type: "text", 
            text: JSON.stringify({ 
              success: false,
              error: error.message 
            }, null, 2)
          }],
          isError: true
        };
      }
    }
  • Zod schema defining input parameters for the deleteStrategy tool: projectId, featureName, environment, strategyId.
    export const DeleteStrategyParamsSchema = {
      projectId: z.string().min(1),
      featureName: z.string().min(1).max(100).regex(/^[a-z0-9-_.]+$/, {
        message: "Name must be URL-friendly: use only lowercase, numbers, hyphens, underscores, and periods"
      }),
      environment: z.string().min(1),
      strategyId: z.string().min(1)
    };
  • src/server.ts:129-134 (registration)
    Registers the deleteStrategy tool with the MCP server using server.tool().
    server.tool(
      deleteStrategyTool.name,
      deleteStrategyTool.description,
      deleteStrategyTool.paramsSchema as any,
      deleteStrategyTool.handler as any
    );
  • Defines and exports the deleteStrategyTool object containing name, description, schema, and handler.
    export const deleteStrategyTool = {
      name: "deleteStrategy",
      description: "Delete a strategy configuration from a feature flag in the specified environment",
      paramsSchema: DeleteStrategyParamsSchema,
      handler: handleDeleteStrategy
    }; 
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool performs a deletion, implying it's destructive, but doesn't specify whether the deletion is permanent, reversible, requires specific permissions, or has side effects (e.g., on related configurations). For a destructive operation with zero annotation coverage, this is a significant gap in transparency.

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?

The description is a single, clear sentence with no wasted words. It's front-loaded with the core action ('Delete') and efficiently specifies the target, making it easy to scan and understand quickly.

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

Completeness2/5

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

Given the tool's complexity (destructive operation with 4 parameters), lack of annotations, 0% schema description coverage, and no output schema, the description is incomplete. It doesn't address behavioral aspects like permanence, permissions, or error handling, nor does it clarify parameter meanings or usage context, leaving significant gaps for an AI agent.

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?

The schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'feature flag' and 'environment', which relate to 'featureName' and 'environment', but doesn't explain 'projectId' or 'strategyId' or provide context like format constraints (e.g., 'featureName' has a pattern). The description adds minimal semantic value beyond the schema.

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

Purpose4/5

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

The description clearly states the action ('Delete') and the target ('a strategy configuration from a feature flag in the specified environment'), making the purpose understandable. It distinguishes from siblings like 'addStrategy' or 'updateStrategy' by specifying deletion, but doesn't explicitly differentiate from potentially similar tools like 'archiveFlag' or 'disableFlag'.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., whether the strategy must exist), exclusions, or comparisons with siblings like 'archiveFlag' or 'disableFlag' that might handle feature flags differently. Usage context is implied but not stated.

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

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cuongtl1992/unleash-mcp'

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