Skip to main content
Glama
ZhipingYang

FFS MCP Server

by ZhipingYang

ffs_search_flag

Search for Feature Flag Service (FFS) flags using keywords or flag IDs to find matching flags with their identifiers and types.

Instructions

Search for FFS flags by keyword. Returns matching flags with their IDs and types.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYesSearch keyword or complete Flag ID

Implementation Reference

  • Core handler logic for ffs_search_flag - the searchFlags function that makes HTTP request to FFS API to search for flags by keyword
    export async function searchFlags(keyword: string): Promise<FfsFlagSearchResult[]> {
      const res = await httpRequest<{ flags: FfsFlagSearchResult[] }>(
        `${FFS_CONFIG.baseUrl}${FFS_ENDPOINTS.flags}/?flagId=${encodeURIComponent(keyword)}`,
        { method: 'GET' }
      );
    
      return res.data.flags || [];
    }
  • src/index.ts:67-114 (registration)
    Tool registration with MCP server - defines tool name, description, input schema using Zod, and inline handler that calls searchFlags
    // Tool 2: ffs_search_flag
    server.tool(
      'ffs_search_flag',
      'Search for FFS flags by keyword. Returns matching flags with their IDs and types.',
      {
        keyword: z.string().describe('Search keyword or complete Flag ID'),
      },
      async ({ keyword }) => {
        try {
          const flags = await searchFlags(keyword);
          return {
            content: [
              {
                type: 'text' as const,
                text: JSON.stringify({
                  found: flags.length > 0,
                  count: flags.length,
                  flags: flags.map((f) => ({
                    id: f.id,
                    description: f.description || 'No description',
                    dataType: f.dataType,
                    status: f.status,
                  })),
                  message: flags.length === 0
                    ? 'No flags found. Please check the keyword.'
                    : flags.length === 1
                      ? `Found exact match: ${flags[0].id}`
                      : `Found ${flags.length} flags. Please specify the exact Flag ID.`,
                }, null, 2),
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: 'text' as const,
                text: JSON.stringify({
                  success: false,
                  message: error instanceof Error ? error.message : 'Unknown error',
                }, null, 2),
              },
            ],
            isError: true,
          };
        }
      }
    );
  • Input schema definition using Zod - validates keyword parameter as required string
    {
      keyword: z.string().describe('Search keyword or complete Flag ID'),
    },
  • Type definition for FfsFlagSearchResult - defines the structure of flag search results returned by the handler
    export interface FfsFlagSearchResult {
      id: string;
      description?: string;
      dataType: string;
      status: string;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool searches and returns data, implying a read-only operation, but doesn't cover critical aspects like authentication needs, rate limits, error handling, or pagination. For a search tool with zero annotation coverage, this leaves 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 that front-loads the core purpose ('Search for FFS flags by keyword') and adds necessary detail about returns. There is no wasted verbiage or redundancy, making it appropriately concise.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain the return format in detail (e.g., structure of 'matching flags'), error conditions, or behavioral constraints. For a search tool with no structured output documentation, more context is needed to guide the agent effectively.

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 input schema has 100% description coverage, with the 'keyword' parameter fully documented in the schema. The description adds minimal value by restating that it searches 'by keyword' and mentions 'complete Flag ID,' but this is already implied in the schema. Baseline 3 is appropriate as the schema does the heavy lifting.

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 tool's purpose: 'Search for FFS flags by keyword.' It specifies the verb ('Search') and resource ('FFS flags'), and mentions the return format ('matching flags with their IDs and types'). However, it doesn't explicitly differentiate this search tool from its siblings (e.g., ffs_get_flag_options), which prevents 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. It doesn't mention any prerequisites, exclusions, or comparisons with sibling tools like ffs_get_flag_options or ffs_check_account. 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

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/ZhipingYang/ffs-mcp-server'

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