Skip to main content
Glama

rehub_plan

Generate versioned executable task graphs for scenarios or object-and-mode workflows, with step capabilities, fallbacks, constraints, and local replanning; plans persist for execution tracking.

Instructions

生成可执行任务图(版本化):(a) 按场景 scenario;(b) 按对象+模式 objectType+mode;(c) 只传 taskId 查看已有任务。每步带 stepId / capability / 副作用标记 / 后端可用性 / 回退候选 / 期望证据;支持局部重规划(fromStep)与约束(maxSteps/maxRetries/budgetMs)。计划会落盘为任务,后续 rehub_exec 传 taskId+stepId 记录状态。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "rehub_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
goalNo用户最终要什么产出(可选)
modeNo链路模式(用法 b)
targetNo目标路径/URL
taskIdNo已有任务 id:补计划/局部重规划/查看任务
optionsNo链路参数:procedure/className/methodName/cdpEndpoint/targetId/package/device/workdir/process/query/pid 等
subtypeNo对象子类(用法 b,可选)
fromStepNo局部重规划的起点(step-N 或序号),之前的步骤保留状态
scenarioNo场景 id(用法 a)
objectTypeNo对象类别(用法 b):web/app/software/ai-automation
constraintsNo约束:authorization/maxSteps/maxRetries/budgetMs/allowInstall/readOnlyFirst
changeReasonNo重规划原因(记录到 planHistory)
desiredOutputNo期望交付物:report/ui-prototype/api-doc/code-structure 等
resolveFallbacksNo首选后端不可用时是否自动选等效能力(默认 true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.3/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 load and does so well: it discloses that plans are versioned, persisted to disk as a task, that each step carries stepId/capability/side-effect flag/backend availability/fallbacks/expected evidence, and that fromStep replanning preserves prior step state. Gaps remain on mutation safety (permissions needed to write a plan, whether an existing plan is overwritten) and on what the taskId-only view returns.

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 action, then structured with (a)/(b)/(c) markers and semicolon-separated clauses; every clause conveys distinct information. It is dense — the middle sentence packs six per-step fields into one enumeration — but nothing is redundant.

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 13-parameter, nested-object tool with no annotations and no output schema, the description covers the three entry paths, the shape of the returned step graph, persistence, and the follow-on rehub_exec contract — enough to invoke correctly. Residual gaps are the read-only viewing behavior and the plan-overwrite semantics.

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 baseline is 3, but the description adds real meaning: it maps scenario→mode (a), objectType+mode→mode (b), and taskId→read/view, and it explains fromStep as 'prior steps retain status'. It also names the constraint keys (maxSteps/maxRetries/budgetMs) inline. It does not clarify subtype, goal, desiredOutput, or changeReason beyond the schema text.

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 artifact — generate a versioned executable task graph — and then enumerates its three invocation shapes (scenario / objectType+mode / taskId look-up). It also names the downstream sibling rehub_exec and the handoff contract (taskId+stepId), so an agent can distinguish planning from execution without opening the 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?

The (a)/(b)/(c) enumeration effectively tells the agent which parameter combination selects which behavior, including the read-only 'view existing task' case via taskId alone. It also states the persistence-then-execute flow. What it lacks is explicit guidance against sibling alternatives such as rehub_scenarios or rehub_route, or any 'do not use this when…' exclusion.

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