Skip to main content
Glama

恢复未知构建占用

cocos_build_recover
Destructive

Releases a stuck build job only after you confirm the original build has stopped; preserves unknown results and artifacts, and refuses when the recorded process is still alive without killing it.

Instructions

仅在用户确认原构建已经停止后使用。保留未知结果与产物,只解除任务占用;记录 PID 仍存活时拒绝,不杀进程。

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": {
      "projectId": "<projectId>",
      "jobId": "<jobId>",
      "confirmedStopped": "<confirmedStopped>"
    },
    "name": "cocos_build_recover"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobIdYes
projectIdYes
confirmedStoppedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.1

TDQS

A4/5.0
Behavior4/5

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

The annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds real behavioral context beyond them: artifacts and unknown results are preserved, only the occupancy is released, no process is killed, and the call is refused while the PID is alive. That refusal condition is an important operational trait not encoded anywhere in the schema or annotations.

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 short clauses, precondition front-loaded ahead of the effect and the refusal rule. Every phrase carries distinct information with no repetition of the title or name.

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 three-parameter mutation with no output schema, the definition covers when to call, what is and is not destroyed, and the failure condition. It stops short of describing what a successful recovery returns or what state the job ends in, which an agent would want before calling.

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 0% for three required parameters, so the description must carry the load. It does explain the meaning of confirmedStopped through the 'only after the user confirms' precondition, but jobId and projectId are left entirely to their names, and no format or identity semantics (e.g., what jobId refers to) are supplied.

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 states a specific effect: releasing the task occupation held by an unknown-outcome build while preserving its results and artifacts. It implicitly separates itself from a cancel/kill operation ('does not kill the process'), though it never names cocos_build_cancel explicitly as the contrasting sibling.

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?

There is an explicit precondition in 'use only after the user confirms the original build has stopped,' reinforced by the refusal rule when the recorded PID is still alive. It lacks an explicit alternative path (e.g., use cocos_build_cancel when the process is still running), so the routing guidance is clear but not complete.

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