Skip to main content
Glama
f

prompts.chat MCP Server

by f

search_prompts

Find AI prompts by keyword, type, category, or tag to discover community-curated prompts for various AI tasks.

Instructions

Search for AI prompts by keyword. Returns matching prompts with title, description, content, author, category, and tags.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query to find relevant prompts
limitNoMaximum number of prompts to return (default 10, max 50)
typeNoFilter by prompt type
categoryNoFilter by category slug
tagNoFilter by tag slug

Implementation Reference

  • Handler function that implements the search_prompts tool logic by proxying the tool call to the upstream prompts.chat MCP server using callPromptsChatMcp.
    async ({ query, limit, type, category, tag }) => { try { const response = await callPromptsChatMcp("tools/call", { name: "search_prompts", arguments: { query, limit, type, category, tag }, }); if (response.error) { return { content: [{ type: "text" as const, text: JSON.stringify({ error: response.error.message }) }], isError: true, }; } const result = response.result as { content: Array<{ type: string; text: string }> }; return { content: [{ type: "text" as const, text: result.content[0].text }], }; } catch (error) { const message = error instanceof Error ? error.message : String(error); return { content: [{ type: "text" as const, text: JSON.stringify({ error: message }) }], isError: true, }; } }
  • Input schema definition for the search_prompts tool, including title, description, and Zod-based parameter validation.
    { title: "Search Prompts", description: "Search for AI prompts by keyword. Returns matching prompts with title, description, content, author, category, and tags.", inputSchema: { query: z.string().describe("Search query to find relevant prompts"), limit: z .number() .min(1) .max(50) .default(10) .describe("Maximum number of prompts to return (default 10, max 50)"), type: z .enum(["TEXT", "STRUCTURED", "IMAGE", "VIDEO", "AUDIO"]) .optional() .describe("Filter by prompt type"), category: z.string().optional().describe("Filter by category slug"), tag: z.string().optional().describe("Filter by tag slug"), }, },
  • src/index.ts:125-174 (registration)
    Registration of the search_prompts tool on the MCP server using server.registerTool, specifying name, schema, and handler.
    // Tool: search_prompts server.registerTool( "search_prompts", { title: "Search Prompts", description: "Search for AI prompts by keyword. Returns matching prompts with title, description, content, author, category, and tags.", inputSchema: { query: z.string().describe("Search query to find relevant prompts"), limit: z .number() .min(1) .max(50) .default(10) .describe("Maximum number of prompts to return (default 10, max 50)"), type: z .enum(["TEXT", "STRUCTURED", "IMAGE", "VIDEO", "AUDIO"]) .optional() .describe("Filter by prompt type"), category: z.string().optional().describe("Filter by category slug"), tag: z.string().optional().describe("Filter by tag slug"), }, }, async ({ query, limit, type, category, tag }) => { try { const response = await callPromptsChatMcp("tools/call", { name: "search_prompts", arguments: { query, limit, type, category, tag }, }); if (response.error) { return { content: [{ type: "text" as const, text: JSON.stringify({ error: response.error.message }) }], isError: true, }; } const result = response.result as { content: Array<{ type: string; text: string }> }; return { content: [{ type: "text" as const, text: result.content[0].text }], }; } catch (error) { const message = error instanceof Error ? error.message : String(error); return { content: [{ type: "text" as const, text: JSON.stringify({ error: message }) }], isError: true, }; } } );

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/f/prompts.chat-mcp'

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