Skip to main content
Glama

browse_mode_library

Browse and filter the Mode Manager MCP library by category or search term to find specific tools and resources.

Instructions

Browse the Mode Manager MCP Library and filter by category or search term.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNo
searchNo

Implementation Reference

  • Core handler function that implements the browse_mode_library tool: fetches library data with optional filters, formats and returns a detailed list of chatmodes, instructions, categories, and installation instructions.
    def browse_mode_library( category: Annotated[Optional[str], "Optional category filter"] = None, search: Annotated[Optional[str], "Optional search term"] = None, ) -> str: """Browse the Mode Manager MCP Library and filter by category or search term.""" try: library_data = library_manager.browse_library(category=category, search=search) result = f"Library: {library_data['library_name']} (v{library_data['version']})\n" result += f"Last Updated: {library_data['last_updated']}\n" result += f"Total: {library_data['total_chatmodes']} chatmodes, {library_data['total_instructions']} instructions\n" if library_data["filters_applied"]["category"] or library_data["filters_applied"]["search"]: result += f"Filtered: {library_data['filtered_chatmodes']} chatmodes, {library_data['filtered_instructions']} instructions\n" filters = [] if library_data["filters_applied"]["category"]: filters.append(f"category: {library_data['filters_applied']['category']}") if library_data["filters_applied"]["search"]: filters.append(f"search: {library_data['filters_applied']['search']}") result += f" Filters applied: {', '.join(filters)}\n" result += "\n" chatmodes = library_data["chatmodes"] if chatmodes: result += f"CHATMODES ({len(chatmodes)} available):\n\n" for cm in chatmodes: result += f"{cm['name']} by {cm.get('author', 'Unknown')}\n" result += f" Description: {cm.get('description', 'No description')}\n" result += f" Category: {cm.get('category', 'Unknown')}\n" if cm.get("tags"): result += f" Tags: {', '.join(cm['tags'])}\n" result += f" Install as: {cm.get('install_name', cm['name'] + '.chatmode.md')}\n" result += "\n" else: result += "No chatmodes found matching your criteria.\n\n" instructions = library_data["instructions"] if instructions: result += f"INSTRUCTIONS ({len(instructions)} available):\n\n" for inst in instructions: result += f"{inst['name']} by {inst.get('author', 'Unknown')}\n" result += f" Description: {inst.get('description', 'No description')}\n" result += f" Category: {inst.get('category', 'Unknown')}\n" if inst.get("tags"): result += f" Tags: {', '.join(inst['tags'])}\n" result += f" Install as: {inst.get('install_name', inst['name'] + INSTRUCTION_FILE_EXTENSION)}\n" result += "\n" else: result += "No instructions found matching your criteria.\n\n" categories = library_data.get("categories", []) if categories: result += "AVAILABLE CATEGORIES:\n" for cat in categories: result += f" • {cat['name']} ({cat['id']}) - {cat.get('description', 'No description')}\n" result += "\n" result += "Usage: Use install_from_library('Name') to install any item.\n" return result except FileOperationError as e: return f"Error browsing library: {str(e)}" except Exception as e: return f"Unexpected error browsing library: {str(e)}"
  • Registration of the browse_mode_library tool via @app.tool decorator within register_library_tools(), including name, description, tags, detailed annotations (parameters schema and returns), and metadata.
    @app.tool( name="browse_mode_library", description="Browse the Mode Manager MCP Library and filter by category or search term.", tags={"public", "library"}, annotations={ "idempotentHint": True, "readOnlyHint": True, "title": "Browse Mode Library", "parameters": { "category": "Optional category filter to show only items from a specific category. Use list without filter to see available categories.", "search": "Optional search term to filter items by name, description, or tags.", }, "returns": "Returns a formatted list of available chatmodes and instructions from the library, with details like name, author, description, category, and installation name. Also shows available categories and usage instructions.", }, meta={"category": "library"}, )
  • Type schema for the tool parameters using Annotated types: optional category (str) and search (str), returning str.
    def browse_mode_library( category: Annotated[Optional[str], "Optional category filter"] = None, search: Annotated[Optional[str], "Optional search term"] = None, ) -> str:
  • Invocation of register_library_tools() in register_all_tools(), which performs the actual tool registrations including browse_mode_library.
    register_library_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/NiclasOlofsson/mode-manager-mcp'

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