Skip to main content
Glama
talentedmrweb

Local Dev Bridge MCP

run_command

Execute shell commands in your project directory to run npm install, git operations, tests, and other development tasks directly from Claude Desktop.

Instructions

Execute a shell command in the projects directory. Use for running npm install, git commands, tests, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesShell command to execute
cwdNoWorking directory (relative to projects directory or absolute)

Implementation Reference

  • The main handler function for the 'run_command' tool. It resolves the working directory, executes the shell command using execAsync, captures stdout and stderr, and returns the output in the MCP response format.
    async runCommand(command, cwd) {
      const resolvedCwd = cwd ? this.resolvePath(cwd) : PROJECTS_DIR;
      const { stdout, stderr } = await execAsync(command, { cwd: resolvedCwd });
      
      let output = '';
      if (stdout) output += `Output:\n${stdout}\n`;
      if (stderr) output += `Errors:\n${stderr}\n`;
      
      return {
        content: [
          {
            type: 'text',
            text: output || 'Command executed successfully (no output)',
          },
        ],
      };
    }
  • Input schema definition for the 'run_command' tool, specifying 'command' as required string and 'cwd' as optional string.
    inputSchema: {
      type: 'object',
      properties: {
        command: {
          type: 'string',
          description: 'Shell command to execute',
        },
        cwd: {
          type: 'string',
          description: 'Working directory (relative to projects directory or absolute)',
        },
      },
      required: ['command'],
    },
  • index.js:115-132 (registration)
    Registration of the 'run_command' tool in the tools array passed to server.setTools(), including name, description, and schema.
    {
      name: 'run_command',
      description: 'Execute a shell command in the projects directory. Use for running npm install, git commands, tests, etc.',
      inputSchema: {
        type: 'object',
        properties: {
          command: {
            type: 'string',
            description: 'Shell command to execute',
          },
          cwd: {
            type: 'string',
            description: 'Working directory (relative to projects directory or absolute)',
          },
        },
        required: ['command'],
      },
    },
  • index.js:175-176 (registration)
    Request handler switch case that routes 'run_command' calls to the runCommand method.
    case 'run_command':
      return await this.runCommand(args.command, args.cwd);
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 of behavioral disclosure. It mentions executing shell commands but fails to disclose critical behavioral traits: it does not warn about potential destructive effects (e.g., commands that delete files), security implications (e.g., requiring specific permissions), or operational constraints (e.g., rate limits or timeouts). The description is vague on what happens during execution, leaving gaps in transparency for a tool that interacts with the system.

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 highly concise and well-structured, consisting of two sentences that efficiently convey the core purpose and usage examples. Every sentence adds value: the first defines the action and context, and the second provides practical applications without redundancy. It is front-loaded with the main functionality, making it easy to understand quickly.

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 the complexity of executing shell commands (which can have significant side effects), the lack of annotations, and no output schema, the description is incomplete. It does not address key contextual aspects such as error handling, output format, security warnings, or limitations. For a tool with potential system-wide impact, more detail is needed to ensure safe and effective use, making it inadequate for its intended purpose.

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?

The input schema has 100% description coverage, with clear documentation for both parameters ('command' and 'cwd'). The description adds minimal value beyond the schema by implying the context ('in the projects directory') and providing usage examples, but does not elaborate on parameter semantics, such as specific formats or constraints for the 'command' string or how 'cwd' interacts with the projects directory. Baseline 3 is appropriate as the schema handles most of the parameter documentation.

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 tool's purpose: 'Execute a shell command in the projects directory.' It specifies the verb ('Execute') and resource ('shell command'), and provides examples of typical use cases ('running npm install, git commands, tests, etc.'). However, it doesn't explicitly differentiate from sibling tools like 'list_directory' or 'search_files' in terms of when to use one over the other for command execution versus file operations.

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

Usage Guidelines3/5

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

The description implies usage by providing examples ('Use for running npm install, git commands, tests, etc.'), which gives some context for when to apply this tool. However, it lacks explicit guidance on when to use this versus alternatives (e.g., 'edit_file' for editing vs. 'run_command' for execution), and does not specify exclusions or prerequisites, such as needing appropriate permissions or avoiding destructive commands.

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/talentedmrweb/local-dev-bridge-mcp'

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