Skip to main content
Glama
vscode-copilot-telegram

vscode-copilot-telegram

by weslylaboy

run_command

Runs shell commands in the workspace only after Telegram approval, returning the decision, exit code, and output; denied commands do not execute and should not be retried unchanged.

Instructions

Run a shell command in the workspace after the user approves it on Telegram.

Returns decision (approved, auto-approved, denied, denied-timeout, denied-error, blocked, rejected), exit_code (null if not run), and output (combined stdout/stderr, truncated). If denied, the command did not run: do not retry it in another form; adjust your plan or ask_user.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "command": "<command>",
      "reason": "<reason>"
    },
    "name": "run_command"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory, absolute or relative to the workspace root. Must be inside the workspace.
reasonYesOne sentence on why this command is needed.
commandYesThe exact shell command to run.
timeout_sNoSeconds to wait for approval (default 600). No answer means denied.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations at all, the description carries the full behavioral burden and does substantial work: it discloses that execution is user-gated, enumerates the possible decision outcomes, states exit_code is null when not run, notes output is combined and truncated, and forbids retrying after a denial. Gaps remain around side effects, sandboxing, and whether approval semantics differ per decision value, but this is well above the bar for an unannotated tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The approval gate is front-loaded, the return-value list is compact, and the denial rule is stated as a direct instruction. It is efficient overall, with only mild redundancy in restating return fields that the output schema already covers.

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

Completeness4/5

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

For an unannotated, potentially destructive tool this is fairly complete: approval flow, denial semantics, and output truncation are all covered. Since an output schema exists, the enumerated return values are a bonus rather than a requirement, and the remaining gap is the absence of any statement about sandbox or side-effect scope beyond the cwd constraint.

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 cwd, reason, command, and timeout_s are already documented, including the workspace-root constraint and the 600-second default. The description adds no parameter-level detail beyond what the schema provides, so the baseline of 3 applies.

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 opens with a specific verb and resource ('Run a shell command in the workspace') plus the defining constraint that execution is gated on Telegram approval. That approval gate cleanly separates it from ask_user and notify without needing to enumerate them.

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?

It gives explicit when-not guidance for the denied case: 'do not retry it in another form; adjust your plan or ask_user,' which names the alternative and the condition that selects it. It does not cover broader routing questions, such as when to notify the user instead of blocking on approval, but the critical exclusion is present.

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

Deploy Server

Other Tools