Skip to main content
Glama

run

Execute commands on GitHub Actions against a specified repository, branch, and runner, returning real stdout/stderr and exit code so builds and tests can be verified without a local toolchain.

Instructions

在云端 GitHub Actions 上执行一条命令,并把 stdout/stderr 和真实退出码原样返回。用于本机没有构建环境(无 JDK/Android SDK/Xcode/特定运行时)时做自检:它检出指定仓库的指定分支,在那里跑你的命令,效果等同于本地有环境。默认等待执行完成并返回结果。

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": {
      "repo": "<repo>"
    },
    "name": "run"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNo分支、标签或完整 commit SHA。不填用仓库默认分支。
repoYes目标仓库,owner/name 或完整 GitHub URL。AI 工作区所在仓库。
waitNo是否等待执行完成,默认 true。长构建可设 false 先拿 runId 再轮询。
cacheNo依赖缓存,默认 auto(自动识别 pnpm/npm/gradle/cargo 等)。
setupNo主命令前执行的准备命令(装依赖等),失败即终止。
shellNo解释器,默认 bash。Windows 目标用 pwsh,脚本用 python。
runnerNorunner 标签,默认 ubuntu-latest。可选 windows-latest、macos-latest、macos-14 等。
commandNo要执行的命令,可多行。例如 "pnpm install && pnpm build" 或 "gradle assembleDebug"。需要跑多条独立命令时优先用 commands —— 那样它们共享同一个热构建环境。
releaseNo在同一 job 内追加打包发版:命令成功后直接打包并发布 Release,**不需要再跑一次构建**。既省掉一次完整编译,也保证发出去的包就是刚刚验证过的那个。
commandsNo要顺序执行的命令列表,全部在**同一个 job** 内完成。这比多次调用 run 快得多:Gradle 的守护进程和增量状态会被复用。实测本项目冷编译约 231 秒,同一 job 内第二次编译仅约 1 秒。每条命令的输出单独标注,前面失败会继续跑后面的(便于一次看到所有问题),最终只要有失败就整体判失败。空行和以 # 开头的行会被忽略。
maxWaitMsNo最长等待毫秒数,默认 30 分钟。超时不取消任务。
fetchDepthNogit 抓取深度,默认 1(快);需要 git 历史时设 0。
workspaceDirNo本地 git 工作区目录。设置后进入「快照模式」:把该目录**未提交的改动和未推送的提交**做成补丁,云端签出你自己的分支后应用补丁再构建。目标仓库不会多出任何分支。
artifactPathsNo需要作为产物上传的路径,逗号或换行分隔。构建产物、测试报告放这里。
maxOutputCharsNo返回输出截断长度,默认 24000 字符。
timeoutMinutesNo单条命令的硬超时(分钟),默认 30,上限 120。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/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 discloses useful behavior — cloud execution, checkout of the specified repo/ref, output returned verbatim with the true exit code, and that it waits by default — but says nothing about authentication/permissions, cost or concurrency limits, or what state persists between calls. Those gaps matter for a remote execution tool with write-side effects on a real repo.

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?

Three sentences, front-loaded with the action and the return contract, followed by the use case. The middle sentence is long but every clause contributes the checkout/execution model. No filler or restatement of the title.

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 16-parameter tool with a nested release object and no output schema, the description covers the core invocation and return values but omits whole capability areas the schema exposes: multi-command batching in one job, snapshot mode from a local workspace, artifact upload, and inline release publishing. An agent reading only the description would underestimate what the tool can do.

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% and every one of the 16 parameters is documented in-schema, so the baseline is 3. The description only adds meaning for the wait default and the checkout semantics tied to repo/ref; it says nothing about commands vs command, workspaceDir snapshot mode, release packaging, or artifact upload, all of which remain schema-only.

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 gives a concrete verb and resource — running a command on a cloud GitHub Actions runner — and is explicit about what it returns (stdout/stderr plus the real exit code). The checkout-then-run mechanic is spelled out. It does not name a sibling to distinguish itself from, so it stops short of a 5.

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 states the selecting condition clearly: use this when the local machine has no build environment (no JDK/Android SDK/Xcode/specific runtime) and you want a self-check. There is no when-not guidance and no named alternative among session_run, prepare_workspace, or release, so it is clear context without exclusions.

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