Skip to main content
Glama
ylin6

Unleash Feature Flag MCP Server

by ylin6

getFeatures

Retrieve feature flags for a specific project to manage and control feature rollouts programmatically.

Instructions

Retrieve features for a specific project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes

Implementation Reference

  • Core handler function that fetches and returns the list of features for the specified projectId from the Unleash API.
    async function getFeatures(params: z.infer<typeof GetFeaturesSchema>) {
      const { projectId } = GetFeaturesSchema.parse(params);
      try {
        const response = await axios.get(
          `${UNLEASH_API_URL}/api/admin/projects/${projectId}/features`,
          {
            headers: {
              Authorization: `Bearer ${UNLEASH_AUTH_TOKEN}`,
            },
          }
        );
        return response.data;
      } catch (error) {
        console.error('Error fetching features:', error);
        throw error;
      }
  • src/index.ts:31-39 (registration)
    Registers the MCP tool named 'getFeatures' with its description, input schema (RawGetFeaturesShape), and a thin wrapper handler that invokes the core getFeatures function and formats the response as MCP content.
    server.tool(
      'getFeatures',
      'Retrieve features for a specific project',
      RawGetFeaturesShape,
      async (args) => {
        const data = await getFeatures(args);
        return { content: [{ type: 'text', text: JSON.stringify(data) }] };
      }
    );
  • Zod input schema definition for the getFeatures tool, specifying the required 'projectId' parameter. This raw shape is used directly in the MCP tool registration.
    const RawGetFeaturesShape = {
      projectId: z.string(),
    };
  • Full Zod schema for getFeatures input validation, wrapping the raw shape and used within the handler for parsing params.
    const GetFeaturesSchema = z.object(RawGetFeaturesShape);
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 but only states the action without behavioral details. It doesn't disclose whether this is a read-only operation, requires authentication, has rate limits, or what the return format might be, leaving significant 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, making it appropriately sized and front-loaded. Every part of the sentence contributes to understanding the tool's purpose.

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 (1 parameter, no output schema, no annotations), the description is incomplete. It lacks details on behavior, parameter semantics, and output, making it insufficient for an AI agent to fully understand how to invoke and interpret results.

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

Parameters2/5

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

Schema description coverage is 0%, and the description doesn't add any meaning beyond the schema. It mentions 'specific project' which hints at the 'projectId' parameter, but provides no details on format, constraints, or examples, failing to compensate for the low 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 'retrieve' and the resource 'features for a specific project', making the purpose understandable. However, it doesn't differentiate from sibling tools like 'getFeatureFlag' or 'getProjects', which might retrieve similar data.

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?

No guidance is provided on when to use this tool versus alternatives like 'getFeatureFlag' or 'getProjects'. The description implies usage for retrieving features tied to a project, but lacks explicit context or exclusions.

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

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/ylin6/unleash-ff-mcp-server'

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