Skip to main content
Glama
cuongtl1992

Unleash MCP (Feature Toggle)

listFlags

Retrieve all feature flags from the Unleash MCP server to manage and monitor feature toggles effectively.

Instructions

Get a list of all feature flags

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the listFlags tool. Fetches all feature flags using getAllFeatureFlags and returns them as formatted JSON response, handling errors appropriately.
    async function handleListFlags() {
      try {
        // Get all feature flags
        const flags = await getAllFeatureFlags();
        
        if (!flags) {
          return {
            content: [{ 
              type: "text", 
              text: JSON.stringify({ 
                success: false,
                error: "Failed to fetch feature flags" 
              }, null, 2)
            }],
            isError: true
          };
        }
        
        return {
          content: [{ 
            type: "text", 
            text: JSON.stringify({ 
              success: true,
              count: flags.length,
              flags: flags
            }, null, 2)
          }]
        };
      } catch (error: any) {
        return {
          content: [{ 
            type: "text", 
            text: JSON.stringify({ 
              success: false,
              error: error.message 
            }, null, 2)
          }],
          isError: true
        };
      }
    }
  • Tool definition object for listFlags, specifying name, description, and reference to the handler function. Note: no input parameters schema as the tool takes no arguments.
    export const listFlags = {
      name: "listFlags",
      description: "Get a list of all feature flags",
      handler: handleListFlags
    }; 
  • src/server.ts:177-181 (registration)
    Registration of the listFlags tool with the MCP server using server.tool().
    server.tool(
      listFlags.name,
      listFlags.description,
      listFlags.handler as any
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does ('Get a list') but doesn't describe return format, pagination, sorting, filtering capabilities, or any side effects. For a list operation with zero annotation coverage, this leaves significant behavioral gaps.

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 with no wasted words. It's front-loaded with the core action and resource. Every word earns its place, making it maximally concise while still being clear.

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 listing operations (which often involve pagination, filtering, or sorting) and the absence of both annotations and an output schema, the description is insufficient. It doesn't explain what the return value looks like, how results are structured, or any limitations. For a list tool in a feature flag system with many sibling tools, more context is needed.

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

Parameters4/5

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

The tool has zero parameters, and schema description coverage is 100% (though trivial since there are no parameters). The description doesn't need to explain any parameters, and it correctly implies no filtering or input requirements with 'all feature flags'. This meets the baseline for zero-parameter tools.

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 verb 'Get' and the resource 'list of all feature flags', making the purpose unambiguous. It doesn't explicitly differentiate from sibling tools like 'getFlag' or 'getProjectFeatures', but the 'all' qualifier provides some distinction. This is a clear but not fully differentiated purpose statement.

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 'getFlag' (for a single flag) or 'getProjectFeatures' (for project-specific flags). There's no mention of prerequisites, context, or exclusions. The agent must infer usage from the tool name and description alone.

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