Skip to main content
Glama
flipt-io

Flipt MCP Server

Official
by flipt-io

delete_distribution

Remove a specific distribution for a feature flag rule in Flipt MCP Server by specifying namespace, flag, rule, and distribution IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
distributionIdYes
flagKeyYes
namespaceKeyYes
ruleIdYes

Implementation Reference

  • The primary MCP tool handler for 'delete_distribution'. Registers the tool with input schema and executes the deletion via fliptClient, returning success or error content.
    server.tool( 'delete_distribution', { namespaceKey: z.string().min(1), flagKey: z.string().min(1), ruleId: z.string().min(1), distributionId: z.string().min(1), }, async args => { try { await fliptClient.deleteDistribution( args.namespaceKey, args.flagKey, args.ruleId, args.distributionId ); return { content: [ { type: 'text', text: `Successfully deleted distribution ${args.distributionId} from rule ${args.ruleId}`, }, ], }; } catch (error: any) { console.error('Error deleting distribution:', error); return { content: [ { type: 'text', text: `Failed to delete distribution: ${error.message}`, }, ], isError: true, }; } } );
  • Helper method in FliptClient class that wraps the generated API call to delete a distribution.
    async deleteDistribution(namespaceKey: string, flagKey: string, ruleId: string, id: string) { try { await this.distributionsApi.deleteDistribution(namespaceKey, flagKey, ruleId, id); return { success: true }; } catch (error) { console.error('Error deleting distribution:', error); throw error; } }
  • Zod input schema for the delete_distribution tool parameters.
    { namespaceKey: z.string().min(1), flagKey: z.string().min(1), ruleId: z.string().min(1), distributionId: z.string().min(1), },

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