Skip to main content
Glama
LeonNonnast

Dev MCP Prompt Server

by LeonNonnast

search_prompts

Find development prompts for UI/UX design, project setup, and debugging by searching with keywords or tags to enhance AI-powered workflows.

Instructions

Search for prompts by keyword or tag

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query

Implementation Reference

  • Handler for the 'search_prompts' tool: validates input query, calls promptManager.searchPrompts, logs results, and returns JSON-formatted search results.
    case "search_prompts":
      if (!args || typeof args.query !== "string") {
        throw new McpError(
          ErrorCode.InvalidRequest,
          "Query parameter is required"
        );
      }
      const results = await this.promptManager.searchPrompts(args.query);
      logger.info(
        `Search results for "${args.query}": ${results.length} prompts`
      );
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(results, null, 2),
          },
        ],
      };
  • Core implementation of prompt search: computes relevance score based on matches in title (3pts), description (2pts), tags (1pt), category (1pt), sorts by score descending.
    async searchPrompts(query: string): Promise<PromptWithScore[]> {
      const lowercaseQuery = query.toLowerCase();
      const results: PromptWithScore[] = [];
    
      for (const prompt of this.prompts.values()) {
        let score = 0;
    
        // Check title
        if (prompt.title.toLowerCase().includes(lowercaseQuery)) {
          score += 3;
        }
    
        // Check description
        if (
          prompt.description &&
          prompt.description.toLowerCase().includes(lowercaseQuery)
        ) {
          score += 2;
        }
    
        // Check tags
        if (
          prompt.tags &&
          prompt.tags.some((tag) => tag.toLowerCase().includes(lowercaseQuery))
        ) {
          score += 1;
        }
    
        // Check category
        if (prompt.category.toLowerCase().includes(lowercaseQuery)) {
          score += 1;
        }
    
        if (score > 0) {
          results.push({ ...prompt, searchScore: score });
        }
      }
    
      // Sort by score (descending)
      return results.sort((a, b) => b.searchScore - a.searchScore);
    }
  • Type definition for the input schema of the search_prompts tool, specifying the required 'query' string parameter.
    export interface SearchPromptsRequest {
      query: string;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic function without behavioral details. It lacks information on permissions, rate limits, pagination, or response format, which are critical for a search operation.

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 zero waste. It's front-loaded and appropriately sized for a simple tool, making it easy to parse quickly.

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 search tool with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like result format, error handling, or limitations, leaving significant gaps for the agent to operate 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?

Schema description coverage is 100%, so the schema already documents the 'query' parameter. The description adds minimal value by implying keywords or tags as search criteria, but doesn't elaborate on syntax or format beyond what the schema provides.

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 action ('search') and resource ('prompts') with search criteria ('by keyword or tag'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'search_profiles' or 'list_skills', which would require a more precise scope definition.

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 prerequisites, exclusions, or compare it to sibling tools like 'search_profiles' or 'list_skills', leaving the agent to infer usage context.

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/LeonNonnast/mcpdevprompts'

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