Skip to main content
Glama
cuongtl1992

Unleash MCP (Feature Toggle)

archiveFlag

Archive a specific feature flag within a project using the Unleash MCP server. Manage feature toggles effectively by removing inactive or outdated flags.

Instructions

Archive a feature flag in a specific project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
featureNameYesName of the feature flag to archive
projectIdYesID of the project

Implementation Reference

  • The main handler function for the archiveFlag tool. It calls archiveFeatureFlag(projectId, featureName), handles success/error, and returns formatted MCP response.
    export async function handleArchiveFlag({ projectId, featureName }: { projectId: string, featureName: string }) {
      try {
        // Archive the feature flag
        const success = await archiveFeatureFlag(projectId, featureName);
        
        if (!success) {
          return {
            content: [{ 
              type: "text", 
              text: JSON.stringify({ 
                success: false,
                projectId,
                featureName,
                error: `Feature '${featureName}' not found in project '${projectId}' or could not be archived` 
              }, null, 2)
            }],
            isError: true
          };
        }
        
        return {
          content: [{ 
            type: "text", 
            text: JSON.stringify({ 
              success: true,
              projectId,
              featureName,
              message: `Feature '${featureName}' in project '${projectId}' has been archived successfully`
            }, null, 2)
          }]
        };
      } catch (error: any) {
        return {
          content: [{ 
            type: "text", 
            text: JSON.stringify({ 
              success: false,
              projectId,
              featureName,
              error: error.message || 'An unknown error occurred'
            }, null, 2)
          }],
          isError: true
        };
      }
    }
  • Zod schema defining the input parameters for the archiveFlag tool: projectId and featureName.
    export const ArchiveFlagParamsSchema = {
      projectId: z.string().describe('ID of the project'),
      featureName: z.string().describe('Name of the feature flag to archive')
    };
  • src/server.ts:157-162 (registration)
    Registers the archiveFlag tool with the MCP server by calling server.tool with the tool's name, description, schema, and handler.
    server.tool(
      archiveFlagTool.name,
      archiveFlagTool.description,
      archiveFlagTool.paramsSchema as any,
      archiveFlagTool.handler as any
    );
  • Tool object that exports the configuration for the archiveFlag tool, used in server registration.
    export const archiveFlagTool = {
      name: "archiveFlag",
      description: "Archive a feature flag in a specific project",
      paramsSchema: ArchiveFlagParamsSchema,
      handler: handleArchiveFlag
    }; 
Behavior2/5

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

No annotations are provided, so the description carries full burden. It implies a mutation ('Archive') but doesn't disclose critical behavioral traits: whether archiving is reversible, what permissions are required, how it affects related data, or what the response looks like. This leaves significant gaps for an agent to understand the tool's behavior.

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, efficient sentence that front-loads the core action and resource without unnecessary words. It earns its place by clearly stating the tool's purpose in a minimal format.

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 complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral outcomes, error conditions, or how archiving differs from other flag modifications, making it insufficient for an agent to fully understand the tool's context and effects.

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 description coverage is 100%, so the schema already documents both parameters ('featureName' and 'projectId') adequately. The description doesn't add any meaning beyond what the schema provides, such as format examples or constraints, but this is acceptable given the high schema coverage, resulting in a baseline score.

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 ('Archive') and resource ('feature flag in a specific project'), making the purpose immediately understandable. However, it doesn't differentiate this tool from similar siblings like 'disableFlag' or 'markFeaturesStale', which might also affect flag status, so it doesn't reach the highest score.

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 like 'disableFlag' or 'deleteStrategy', nor does it mention prerequisites or exclusions. It simply states what the tool does without context for selection among siblings.

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