Skip to main content
Glama
jbroll

MCP Build Environment Service

by jbroll

list

Lists available repositories discovered in the current directory to help identify project environments for building, testing, and managing software.

Instructions

List available repositories discovered in the current directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that implements the logic for the 'list' tool, formatting and returning a list of discovered repositories.
    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)]
  • The schema definition for the 'list' tool, specifying no input parameters are required.
    Tool(
        name="list",
        description="List available repositories discovered in the current directory",
        inputSchema={
            "type": "object",
            "properties": {},
            "required": []
        }
  • src/server.py:453-455 (registration)
    Dispatch/registration logic in the central execute_tool method that handles calls to the 'list' tool by invoking handle_list.
    if name == "list":
        return await self.handle_list()
    elif name == "make":
  • src/server.py:165-169 (registration)
    Registration of the list_tools handler which returns the list of available tools including 'list'.
    @self.server.list_tools()
    async def handle_list_tools() -> List[Tool]:
        """List available MCP tools"""
        return await self.get_tools_list()
  • Helper function that discovers and populates the self.repos dictionary used by the 'list' tool 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 = {}
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions 'available repositories discovered', hinting at a read-only operation, but fails to disclose critical behaviors like what constitutes 'available', whether it's recursive, error handling, or output format. For a tool with zero annotation coverage, this is insufficient.

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 without any wasted words. It's appropriately sized for a simple tool with no parameters.

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

Completeness2/5

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

Given no annotations, no output schema, and a simple tool with 0 parameters, the description is too minimal. It lacks details on behavior (e.g., discovery mechanism, output format) and doesn't help differentiate from sibling tools, making it incomplete for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a high baseline score for not adding unnecessary information.

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 ('List') and resource ('available repositories'), specifying they are 'discovered in the current directory'. This provides a specific verb+resource combination, though it doesn't explicitly differentiate from sibling tools like 'ls' or 'git' which might also list items.

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?

The description provides minimal guidance by implying usage when repositories are in the current directory, but it offers no explicit when-to-use rules, alternatives (e.g., vs. 'ls' or 'git'), or exclusions. This leaves the agent with little context for tool selection among siblings.

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

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