Skip to main content
Glama

terminal_exec

Execute shell commands safely inside the project workspace. Enforces security policies, logs execution history, and returns stdout, stderr, exit code, and duration.

Instructions

Executes a terminal command safely scoped to the project workspace. Evaluates security policies, logs execution history, and captures stdout, stderr, exit code, and execution time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoRelative sub-directory or workspace path (must be inside project root)
commandYesThe shell command to execute
projectIdNoOptional project ID to associate command logs with
timeoutMsNoExecution timeout in milliseconds (defaults to 30000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the full burden. It adds useful behavioral context: security policy evaluation, logging, stdout/stderr/exit code/time capture, and workspace scoping. However, it doesn't disclose permission requirements, what happens on timeouts, whether commands are sandboxed, or error handling beyond capture.

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?

Two sentences, front-loaded with the core action and scoping constraint, then lists key outputs. Every phrase adds value without redundancy. No wasted words.

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?

Given no annotations and no output schema, the description covers core behavior but leaves gaps: no mention of permissions, error conditions, timeout behavior, or result format beyond listing captured fields. It's minimally complete for a tool of this complexity, but an agent would need more to predict outcomes in edge cases.

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 parameters are fully documented in the schema. The description adds no parameter-specific details (e.g., timeout behavior, cwd restrictions beyond 'inside project root', projectId association). Baseline 3 is appropriate when the schema does the heavy lifting.

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?

States a specific verb ('Executes') and resource ('terminal command') with scoping modifier ('safely scoped to the project workspace'). This distinguishes it from repo_read_file, repo_write_file, and other siblings. However, it doesn't explicitly contrast with module_run, which may also execute code, leaving some ambiguity about the primary execution mechanism.

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?

Implies use for executing shell commands within the project workspace, but doesn't specify when to choose this over module_run or other execution tools, nor does it mention prerequisites like workspace initialization. Usage context is only partially clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.