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
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| namespaceKey | Yes |
Implementation Reference
- src/index.ts:346-376 (handler)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, }; } } );
- src/index.ts:348-351 (schema)Zod input schema defining namespaceKey and key parameters for the delete_flag tool.{ namespaceKey: z.string().min(1), key: z.string().min(1), },
- src/services/fliptClient.ts:182-190 (helper)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; } }