Skip to main content
Glama

session_start

Starts a persistent cloud environment for repeated command execution, retaining build state and workspace files so iterative builds and tests avoid repeated setup.

Instructions

开启一个常驻云端环境,之后可以反复在同一个环境里执行命令(session_run),环境(Gradle daemon、增量编译状态、工作区文件)在会话期间一直保留。实测本项目:同一个环境里第一次编译约 290 秒,之后再次编译约 1-2 秒。会话上限受 GitHub 单个 job 限制(最多 6 小时),job 结束后环境销毁。

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": "session_start"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNo分支/标签/SHA,默认仓库默认分支
repoYes目标仓库 owner/name
setupNo会话开始前执行一次的安装/准备命令
shellNo解释器,默认 bash
runnerNorunner 标签,默认 ubuntu-latest
cjkFontsNo安装中日韩字体(约 146 秒)。**做离屏渲染截图时几乎必须开**:runner 自带 53 个字体里没有一个 CJK 字面,否则截图里的中文全是方块 □。
emulatorNo在本会话里启动一台 Android 模拟器,之后就能 adb install / am start / logcat / 截图。实测启动约 80 秒(安装镜像 37s + 开机 39s)。不传则不启模拟器。
idleSecondsNo空闲多久后自动结束会话,默认 900 秒。
workspaceDirNo本地 git 工作区。提供后会把未提交改动和未推送提交作为补丁带进会话。
timeoutMinutesNo会话最长存活分钟数,默认 120。GitHub 硬上限 360(6 小时)。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the critical lifecycle facts: what persists (Gradle daemon, incremental build state, workspace files), the hard 6-hour GitHub job ceiling, and that the environment is destroyed when the job ends. It omits auth/prerequisite requirements and the cost/quota implications of spinning up a runner, which keeps it below a 5.

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?

Front-loaded with the core purpose, followed by the persistence rationale and the lifetime limit. Every sentence carries decision-relevant information, though the inline performance benchmarking is slightly verbose relative to what an agent strictly needs.

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 10-parameter tool with a nested emulator object, no annotations, and no output schema, the description covers lifecycle well but never says what the call returns — notably whether a session identifier is produced that later session_run calls must reference. That is a meaningful gap for a tool whose whole point is establishing state for subsequent calls.

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%, including rich per-parameter notes on cjkFonts, emulator startup timings, and timeoutMinutes, so the schema does the heavy lifting. The description body itself adds no meaning about individual parameters beyond what the schema already states, which is the baseline-3 case.

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?

States a specific verb and resource ('开启一个常驻云端环境') and immediately scopes what that environment is for by naming the sibling session_run as the follow-up command executor. An agent can distinguish this from session_run, session_status, or run without opening a schema.

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?

Gives clear context: use this when you need repeated command execution in the same stateful environment, backed by concrete cost/benefit data (first compile ~290s, subsequent ~1-2s). It stops short of explicit exclusions — it never says when NOT to use it (e.g. for a single one-off command, use run) and does not mention prepare_workspace as an alternative for workspace setup.

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