Skip to main content
Glama
jbroll

MCP Build Environment Service

by jbroll

make

Execute make commands in isolated build environments to compile code, run tests, and manage software builds without local dependency installation.

Instructions

Run make command with specified arguments. Executes make in the root of the specified repository. If branch is specified, creates/uses a hidden worktree (.repo@branch) for isolation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoArguments to pass to make (e.g., 'clean', 'all', 'test')
repoYesRepository name (required)
branchNoGit branch name (optional). If provided, uses isolated worktree.

Implementation Reference

  • Executes the 'make' tool: extracts repo, branch, args from input; validates args; builds ['make', ...args]; runs in repo worktree via execute_in_worktree; returns formatted output.
    async def handle_make(self, args: Dict[str, Any]) -> List[TextContent]:
        """Handle make command"""
        repo = args.get("repo")
        branch = args.get("branch")
        make_args = args.get("args", "")
    
        # Validate arguments
        validate_make_args(make_args)
    
        # Build command
        cmd = ["make"]
        if make_args:
            cmd.extend(shlex.split(make_args))
    
        # Execute in appropriate worktree with locking
        result = await self.execute_in_worktree(repo, branch, cmd)
        return [TextContent(type="text", text=result)]
  • Defines the input schema for the 'make' tool, specifying required 'repo' and optional 'args', 'branch'.
        name="make",
        description="Run make command with specified arguments. "
                   "Executes make in the root of the specified repository. "
                   "If branch is specified, creates/uses a hidden worktree (.repo@branch) for isolation.",
        inputSchema={
            "type": "object",
            "properties": {
                "args": {
                    "type": "string",
                    "description": "Arguments to pass to make (e.g., 'clean', 'all', 'test')"
                },
                "repo": {
                    "type": "string",
                    "description": "Repository name (required)"
                },
                "branch": {
                    "type": "string",
                    "description": "Git branch name (optional). If provided, uses isolated worktree."
                }
            },
            "required": ["repo"]
        }
    ),
  • src/server.py:165-169 (registration)
    Registers the list_tools handler which returns the list of tools including 'make' via get_tools_list().
    @self.server.list_tools()
    async def handle_list_tools() -> List[Tool]:
        """List available MCP tools"""
        return await self.get_tools_list()
  • Validates make arguments: checks for dangerous patterns like ; | & etc., and ensures only safe characters.
    def validate_make_args(args: str) -> None:
        """
        Validate make command arguments
    
        Args:
            args: Make command arguments
    
        Raises:
            ValueError: If arguments contain dangerous patterns
        """
        if not args:
            return  # Empty args is fine (will run default target)
    
        # Check for dangerous patterns
        if contains_dangerous_pattern(args):
            raise ValueError(f"Make arguments contain dangerous patterns: {args}")
    
        # Make arguments should be targets or variable assignments
        # Allow: alphanumeric, underscore, hyphen, equals, space, slash (for paths), quotes (for values with spaces)
        if not re.match(r'^[\*a-zA-Z0-9_\-=\s/\.\'"]+$', args):
            raise ValueError(f"Make arguments contain invalid characters: {args}")
  • Dispatch in execute_tool that routes 'make' tool calls to handle_make.
    return await self.handle_make(arguments)
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does reveal important behavioral traits: it executes commands (implies mutation/execution), uses isolation via hidden worktrees when branch is specified, and operates in the repository root. However, it doesn't disclose critical aspects like error handling, output format, whether it requires specific permissions, or potential side effects beyond the isolation mechanism.

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 perfectly concise with just two sentences that each earn their place. The first sentence states the core purpose, the second explains the isolation behavior. There's zero wasted text, and the information is front-loaded with the primary function.

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

Completeness3/5

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

For a command execution tool with 3 parameters, 100% schema coverage, but no annotations and no output schema, the description is adequate but has clear gaps. It covers the basic operation and isolation behavior, but doesn't address what the tool returns, error conditions, or execution constraints. Given the complexity of running make commands, more context about output format or success/failure indicators would be helpful.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds marginal value by explaining the behavioral implication of the branch parameter ('creates/uses a hidden worktree for isolation'), but doesn't provide additional semantic context beyond what's in the schema descriptions for 'args' or 'repo'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Run make command') on a specific resource ('in the root of the specified repository'), distinguishing it from sibling tools like 'git', 'env', or 'read_file' which perform different operations. It provides a complete picture of what the tool does beyond just the name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context about when to use the branch parameter ('If branch is specified, creates/uses a hidden worktree for isolation'), which helps guide usage. However, it doesn't explicitly state when NOT to use this tool versus alternatives like running make directly or using other build tools, nor does it mention prerequisites like needing make installed.

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