Skip to main content
Glama
promptingbox

PromptingBox MCP Server

by promptingbox

search_prompts

Search for AI prompts by title, content, tag, folder, or favorites to find relevant templates for your projects.

Instructions

Search prompts in PromptingBox by title, content, tag, folder, or favorites. Returns matching prompts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoSearch text to match against title and content
tagNoFilter by tag name
folderNoFilter by folder name
favoritesNoSet to true to only show favorited prompts

Implementation Reference

  • The main handler function for search_prompts tool. It registers the tool with MCP server, defines input parameters using zod schema (query, tag, folder, favorites), calls client.searchPrompts() API, formats the results as a bulleted list with prompt titles, IDs, favorite indicators, and folder names, and returns the response with account info suffix.
    server.tool(
      'search_prompts',
      'Search prompts in PromptingBox by title, content, tag, folder, or favorites. Returns matching prompts.',
      {
        query: z.string().optional().describe('Search text to match against title and content'),
        tag: z.string().optional().describe('Filter by tag name'),
        folder: z.string().optional().describe('Filter by folder name'),
        favorites: z.boolean().optional().describe('Set to true to only show favorited prompts'),
      },
      async ({ query, tag, folder, favorites }) => {
        try {
          const [results, suffix] = await Promise.all([
            client.searchPrompts({ search: query, tag, folder, favorites }),
            getResponseSuffix(),
          ]);
    
          if (results.length === 0) {
            return {
              content: [{ type: 'text' as const, text: `No prompts found matching your search.\n\n${suffix}` }],
            };
          }
    
          const lines = results.map((p) =>
            `- ${p.isFavorite ? '⭐ ' : ''}${p.title} (id: \`${p.id}\`)${p.folderName ? ` — 📁 ${p.folderName}` : ''}`
          );
    
          return {
            content: [{
              type: 'text' as const,
              text: `Found ${results.length} prompt${results.length === 1 ? '' : 's'}:\n\n${lines.join('\n')}\n\n${suffix}`,
            }],
          };
        } catch (err) {
          const message = err instanceof Error ? err.message : String(err);
          return errorResult(`Failed to search prompts: ${message}`);
        }
      }
    );
  • Input validation schema for search_prompts using zod. Defines optional parameters: query (search text for title/content), tag (filter by tag name), folder (filter by folder name), and favorites (boolean filter for favorited prompts only).
    {
      query: z.string().optional().describe('Search text to match against title and content'),
      tag: z.string().optional().describe('Filter by tag name'),
      folder: z.string().optional().describe('Filter by folder name'),
      favorites: z.boolean().optional().describe('Set to true to only show favorited prompts'),
    },
  • The API client method that makes the actual HTTP request to search prompts. Constructs URLSearchParams from the provided search parameters (search, tag, folder, favorites) and makes a GET request to /api/mcp/prompt endpoint. Returns an array of PromptListItem objects.
    async searchPrompts(params: SearchPromptsParams): Promise<PromptListItem[]> {
      const qs = new URLSearchParams();
      if (params.search) qs.set('search', params.search);
      if (params.tag) qs.set('tag', params.tag);
      if (params.folder) qs.set('folder', params.folder);
      if (params.favorites) qs.set('favorites', 'true');
      const query = qs.toString();
      return this.request<PromptListItem[]>(`/api/mcp/prompt${query ? `?${query}` : ''}`);
    }
  • TypeScript interface defining the shape of search_prompts parameters: optional search string, optional tag string, optional folder string, and optional favorites boolean. This type is used by the searchPrompts API client method.
    export interface SearchPromptsParams {
      search?: string;
      tag?: string;
      folder?: string;
      favorites?: boolean;
    }
  • TypeScript interface defining the PromptListItem structure returned by searchPrompts: id, title, folderId, folderName, and optional isFavorite boolean. This is the output type for the search_prompts tool results.
    export interface PromptListItem {
      id: string;
      title: string;
      folderId: string | null;
      folderName: string | null;
      isFavorite?: boolean;
    }
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 the search functionality and return outcome, but lacks details on permissions, rate limits, pagination, error handling, or whether it's read-only/destructive. For a search tool with zero annotation coverage, this is a significant gap.

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 purpose ('Search prompts...') and includes key details (searchable fields and outcome) without any wasted words. Every part earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 parameters with full schema coverage and no output schema, the description is adequate for a basic search tool but lacks completeness. It doesn't cover behavioral aspects like permissions or pagination, and without annotations or output schema, the agent may struggle with implementation details. A 3 reflects a minimum viable description with clear gaps.

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 all 4 parameters. The description adds value by listing the searchable fields (title, content, tag, folder, favorites), which aligns with the parameters, but doesn't provide additional syntax, format, or interaction details beyond what the schema specifies. Baseline 3 is appropriate when 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 action ('Search') and resource ('prompts in PromptingBox'), specifying searchable fields (title, content, tag, folder, favorites) and the outcome ('Returns matching prompts'). However, it doesn't explicitly differentiate from sibling tools like 'list_prompts' or 'search_templates', which would require a 5.

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 such as 'list_prompts' (for unfiltered listing) or 'search_templates' (for a different resource). The description implies usage through the searchable fields but lacks explicit when/when-not instructions or named alternatives.

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/promptingbox/mcp'

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