Skip to main content
Glama
flipt-io

Flipt MCP Server

Official
by flipt-io

delete_flag

Remove feature flags from the Flipt MCP Server by specifying the namespace and key. Ensures clean management of flag configurations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
namespaceKeyYes

Implementation Reference

  • Registration and inline handler implementation for the 'delete_flag' MCP tool. Includes input schema validation with Zod, calls fliptClient to delete the flag, and formats success/error responses.
    server.tool(
      'delete_flag',
      {
        namespaceKey: z.string().min(1),
        key: z.string().min(1),
      },
      async args => {
        try {
          await fliptClient.deleteFlag(args.namespaceKey, args.key);
          return {
            content: [
              {
                type: 'text',
                text: `Deleted flag ${args.key} in namespace ${args.namespaceKey}`,
              },
            ],
          };
        } catch (error: any) {
          console.error('Error deleting flag:', error);
          return {
            content: [
              {
                type: 'text',
                text: `Failed to delete flag: ${error.message}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
  • Zod input schema defining namespaceKey and key parameters for the delete_flag tool.
    {
      namespaceKey: z.string().min(1),
      key: z.string().min(1),
    },
  • Supporting utility in FliptClient that wraps the generated API call to delete a flag.
    async deleteFlag(namespaceKey: string, key: string) {
      try {
        await this.flagsApi.deleteFlag(namespaceKey, key);
        return { success: true };
      } catch (error) {
        console.error('Error deleting flag:', error);
        throw error;
      }
    }

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/flipt-io/mcp-server-flipt'

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