Skip to main content
Glama
jbroll

MCP Build Environment Service

by jbroll

list

Discover available repositories in the current directory to identify software projects for containerized build environment operations.

Instructions

List available repositories discovered in the current directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list' tool, which generates a formatted list of discovered repositories if any exist, or indicates none are configured.
    async def handle_list(self) -> List[TextContent]: """Handle list command""" if not self.repos: return [TextContent(type="text", text="No repositories configured")] output = "Available repositories:\n\n" for name, info in self.repos.items(): output += f"- {name}\n" output += f" Path: {info.get('path', 'N/A')}\n" output += f" Description: {info.get('description', 'N/A')}\n\n" return [TextContent(type="text", text=output)]
  • Schema definition for the 'list' tool in the tools list returned by list_tools(). No input parameters required.
    Tool( name="list", description="List available repositories discovered in the current directory", inputSchema={ "type": "object", "properties": {}, "required": [] }
  • src/server.py:165-169 (registration)
    Registration of the list_tools handler which provides the tool list including 'list'.
    @self.server.list_tools() async def handle_list_tools() -> List[Tool]: """List available MCP tools""" return await self.get_tools_list()
  • Dispatch in execute_tool() that routes 'list' tool calls to the handle_list() method.
    if name == "list": return await self.handle_list()
  • Helper function that discovers git repositories in the base directory, populating self.repos used by the 'list' handler.
    async def discover_repos(self): """Discover repositories by scanning the base directory for git repos""" self.repos = {} try: # Scan the base directory for subdirectories containing .git # Skip hidden directories (which include our managed worktrees) for item in REPOS_BASE_DIR.iterdir(): if item.is_dir() and not item.name.startswith('.'): git_dir = item / ".git" if git_dir.exists(): # This is a git repository repo_name = item.name self.repos[repo_name] = { "path": str(item), "description": f"Repository at {item.relative_to(REPOS_BASE_DIR)}" } logger.info(f"Discovered {len(self.repos)} repositories in {REPOS_BASE_DIR}") except Exception as e: logger.error(f"Error discovering repositories: {e}", exc_info=True) self.repos = {}

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/jbroll/mcp-build'

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