Skip to main content
Glama

prepare_workspace

Publishes uncommitted local workspace changes to a dedicated build branch for remote builds, uploading only changed files; use dryRun to preview file lists and byte counts before publishing.

Instructions

把本地工作区的未提交改动发布到目标仓库的专用构建分支(不建快照 commit 之外的东西,也不动你的分支)。只上传改动文件:其余内容由 GitHub 用 base_tree 在服务端拼接。dryRun=true 可先看会传哪些文件、多少字节,再决定是否真要发布。

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>",
      "dir": "<dir>"
    },
    "name": "prepare_workspace"
  }
}

Input Schema

NameRequiredDescriptionDefault
dirYes本地 git 工作区目录
repoYes目标仓库 owner/name
branchNo构建分支名,默认 build-runner
dryRunNo只统计不上传,默认 false
baseRefNo本地改动所基于的分支/标签/SHA,默认 main
messageNo快照 commit 的说明

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

No annotations exist, so the description carries the full load, and it does so well: it discloses that only changed files are uploaded, that GitHub assembles the rest server-side via base_tree, that a snapshot commit is created, and that the user's branch is untouched. These are exactly the mutation-safety facts an agent needs. It omits permission/auth requirements and what the response contains, which keeps it at a 4.

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 core action and its boundaries come first, followed by the server-side upload mechanics and then the dryRun option. Every sentence adds a distinct fact, and the parenthetical asides are short and informative rather than padding.

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 a six-parameter mutation tool with no annotations and no output schema, the description covers the important behavior: what is uploaded, what is created, what is left alone, and how to preview. The main remaining gap is what a successful call returns (branch name, commit SHA, URL), which the agent must discover at runtime.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so a baseline of 3 applies, but the description adds real meaning on top: it explains what dryRun actually yields (which files and how many bytes) and introduces the base_tree server-side assembly behavior that the schema does not mention. The other parameters (repo, dir, branch, baseRef, message) are left to the already-complete schema.

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 specific verb and resource: it publishes local uncommitted workspace changes to a dedicated build branch in the target repo. It also states the scope boundaries (it creates only a snapshot commit and does not touch the user's branch), so an agent can tell it is a publish step, not a status/reset step. It does not explicitly name which sibling to use instead, which keeps this at a 4 rather than 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 Guidelines3/5

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

The description gives one concrete usage rule: set dryRun=true to preview the files and byte count before deciding whether to publish. It does not say when to choose this tool over workspace_status, workspace_reset, or release, so the agent has to infer the workflow position. The dryRun advice is helpful but partial.

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