Skip to main content
Glama
Unleash

Unleash MCP Server

Official
by Unleash

wrap_change

Generate code snippets and guidance for wrapping code changes with runtime-controllable feature flags using language-specific templates and best practices.

Instructions

Generate code snippets and guidance for wrapping changes with feature flags.

⚠️ CRITICAL: This tool enforces RUNTIME-CONTROLLABLE feature flags. You MUST place flag checks INSIDE execution paths (handlers, functions), NOT wrapping route registrations, middleware mounting, or controller registration.

This tool provides language-specific templates and instructions for protecting code changes with feature flags. It helps you:

  • Find existing feature flag patterns in your codebase

  • Match detected conventions (imports, method names, wrapping styles)

  • Generate appropriate code snippets for your language/framework

  • Follow Unleash SDK best practices

  • Ensure flags are runtime controllable (toggle without redeploy)

Supported languages:

  • TypeScript/JavaScript (Node, React, Vue, Angular)

  • Python (FastAPI, Django, Flask)

  • Go

  • Ruby (Rails)

  • PHP

  • C# (.NET)

  • Java (Spring Boot)

  • Rust

The tool uses a prompt-based approach: it provides detailed instructions for searching your codebase for existing patterns and matching their conventions. If no patterns are found, it provides sensible defaults based on Unleash SDK documentation.

Usage:

  1. Call this tool with the flag name after creating a flag

  2. Follow the search instructions to find existing patterns

  3. Use the recommended template or match detected patterns

  4. Test your implementation

Best suited for use after evaluate_change recommends a flag and create_flag creates it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flagNameYesFeature flag name to wrap the code with (e.g., "new-checkout-flow")
languageNoProgramming language (optional, auto-detected from fileName). Supported: typescript, javascript, python, go, ruby, php, csharp, java, rust
fileNameNoFile name being modified (helps detect language, e.g., "checkout.ts")
codeContextNoOptional: surrounding code to help detect existing patterns
frameworkHintNoOptional: framework hint for specialized templates (React, Express, Django, Rails, etc.)
Behavior3/5

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

With no annotations, the description carries the burden. It discloses that the tool provides language-specific templates, searches for patterns, and uses a prompt-based approach. However, it doesn't detail side effects, limitations, or whether external calls are made.

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

Conciseness4/5

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

The description is lengthy but well-structured with sections and bullet points. Some redundancy exists, but it is efficiently organized for clarity.

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?

With no output schema, the description fails to explain what the tool returns (e.g., code snippets, instructions). This is a significant gap, as the agent needs to know how to use the output.

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

Parameters3/5

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

Schema coverage is 100%, so all parameters have basic descriptions. The description adds operational context (e.g., language auto-detection from fileName) but doesn't significantly enhance meaning beyond the schema.

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 the tool generates code snippets and guidance for wrapping changes with feature flags, a specific action on a specific resource. It distinguishes from sibling tools like create_flag and detect_flag by focusing on the wrapping process.

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 provides explicit usage steps and a critical warning about flag placement. It also advises when to use this tool in the workflow (after evaluate_change and create_flag). However, it doesn't explicitly state when not to use it.

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

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/Unleash/unleash-mcp'

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