Skip to main content
Glama
cuongtl1992

Unleash MCP (Feature Toggle)

getFeatureTags

Retrieve all tags associated with a specific feature in the Unleash Feature Toggle system to manage and organize feature configurations effectively.

Instructions

Get a list of all tags for a specific feature

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
featureNameYesName of the feature to get tags for

Implementation Reference

  • The handler function for the getFeatureTags tool, which calls the helper to fetch tags for a given feature and formats the JSON response with success/error handling.
    async function handleGetFeatureTags({ featureName }: { featureName: string }) {
      try {
        // Get all tags for the feature
        const tags = await getFeatureTags(featureName);
        
        if (tags === null) {
          return {
            content: [{ 
              type: "text", 
              text: JSON.stringify({ 
                success: false,
                error: `Failed to fetch tags for feature '${featureName}'` 
              }, null, 2)
            }],
            isError: true
          };
        }
        
        return {
          content: [{ 
            type: "text", 
            text: JSON.stringify({ 
              success: true,
              featureName,
              count: tags.length,
              tags: tags
            }, null, 2)
          }]
        };
      } catch (error: any) {
        return {
          content: [{ 
            type: "text", 
            text: JSON.stringify({ 
              success: false,
              error: error.message 
            }, null, 2)
          }],
          isError: true
        };
      }
    }
  • Zod schema defining the input parameter 'featureName' for the getFeatureTags tool.
    const getFeatureTagsParamsSchema = {
      featureName: z.string().min(1).describe('Name of the feature to get tags for')
    };
  • src/server.ts:195-200 (registration)
    Registration of the getFeatureTagsTool in the MCP server using server.tool().
    server.tool(
      getFeatureTagsTool.name,
      getFeatureTagsTool.description,
      getFeatureTagsTool.paramsSchema as any,
      getFeatureTagsTool.handler as any
    );
  • Helper function that queries the Unleash API to retrieve tags for a specific feature.
    export async function getFeatureTags(featureName: string): Promise<any[] | null> {
      try {
        const response = await client.get(`/api/admin/features/${featureName}/tags`);
        return response.data || [];
      } catch (error) {
        logger.error(`Error fetching tags for feature ${featureName}:`, error);
        return null;
      }
    } 
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. While 'Get' implies a read operation, it doesn't specify whether this requires authentication, has rate limits, returns paginated results, or what format the tag list takes. This leaves significant behavioral gaps for an agent.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the essential information.

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?

For a tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the return value looks like (e.g., array of tag objects, simple strings), nor does it address authentication requirements, error conditions, or behavioral constraints that would help an agent use it correctly.

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?

The schema has 100% description coverage, with the single parameter 'featureName' clearly documented in the schema itself. The description adds no additional parameter information beyond what's already in the structured schema, meeting the baseline for high schema coverage.

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 resource ('tags for a specific feature'), making the purpose immediately understandable. However, it doesn't differentiate this tool from potential sibling tools like 'getFlag' or 'getProjectFeature' that might also retrieve feature-related information, preventing a perfect 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 'getFlag' or 'getProjectFeature', nor does it mention prerequisites or exclusions. It simply states what the tool does without contextual usage information.

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