search_profiles
Find relevant profiles on the Dev MCP Prompt Server to streamline AI-powered development workflows, enhancing tasks like design, setup, and debugging.
Instructions
Search for profiles
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:162-177 (handler)The switch case in the CallToolRequest handler that executes the "search_profiles" tool. It calls promptManager.searchPromptsByTag("profile"), logs the count, and returns the matching prompts as a JSON string in the response content.case "search_profiles": const profilePrompts = await this.promptManager.searchPromptsByTag( "profile" ); logger.info( `Search results for "profile" in tags: ${profilePrompts.length} prompts` ); return { content: [ { type: "text", text: JSON.stringify(profilePrompts, null, 2), }, ], };
- src/prompt-manager.ts:196-218 (helper)Core helper function searchPromptsByTag that iterates over all loaded prompts, checks if the given tag (e.g., 'profile') is included in their tags array, assigns a score of 1 if matched, and returns the matching prompts sorted by score (all have score 1 so order preserved). Called by the search_profiles handler.async searchPromptsByTag(tag: string): Promise<PromptWithScore[]> { const lowercaseQuery = tag.toLowerCase(); const results: PromptWithScore[] = []; for (const prompt of this.prompts.values()) { let score = 0; // Check tags if ( prompt.tags && prompt.tags.some((tag) => tag.toLowerCase().includes(lowercaseQuery)) ) { score += 1; } if (score > 0) { results.push({ ...prompt, searchScore: score }); } } // Sort by score (descending) return results; }