Skip to main content
Glama

derivation_rollback

Roll back to a specified step in a derivation, deleting all subsequent steps. Continue from that point to explore alternative paths.

Instructions

    回滾到指定步驟

    ═══════════════════════════════════════════════════════════════════════
    ⚡ 這是「跳回某一步」的核心工具!
    ═══════════════════════════════════════════════════════════════════════

    保留指定步驟及之前的所有步驟,刪除之後的步驟。
    回滾後可以從該步驟繼續推導(走不同的路徑)。

    Args:
        to_step: 回滾到的步驟編號(1-based,該步驟會保留)
                 0 = 清空所有步驟,從頭開始

    Returns:
        回滾結果,包含:
        - 刪除了哪些步驟
        - 當前的表達式
        - 新的步驟數

    Example:
        # 假設有 16 步,發現第 11 步開始走錯方向
        derivation_rollback(to_step=10)
        → {
            "success": True,
            "rolled_back_to": 10,
            "deleted_count": 6,
            "deleted_steps": [11, 12, 13, 14, 15, 16],
            "current_expression": "CL_int*(1 - f_b)",
            "message": "Rolled back to step 10. Deleted 6 step(s)."
          }
        # 現在可以從步驟 10 的表達式繼續,走不同的推導路徑
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_stepYes
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description fully discloses the destructive behavior (deletes steps after the target, or all steps if to_step=0), the return value structure, and includes a concrete example showing the expected output. This exceeds typical transparency.

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?

The description is front-loaded with the core purpose and uses clear sections (Args, Returns, Example). It includes decorative elements and an emphatic tagline that add slightly to verbosity, but overall every section contributes value.

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?

The description covers the rollback action, parameter semantics, return values, and a worked example, making it sufficient for an agent to select and invoke correctly. Gaps include session_id handling and error cases, but these are minor given the output schema and example.

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?

The description thoroughly explains the to_step parameter (1-based, retained, 0 clears all) adding significant meaning beyond the bare integer schema. However, session_id is not mentioned at all, leaving it ambiguous.

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?

The description clearly states '回滾到指定步驟' (rollback to a specified step) and explains it retains the specified step and deletes subsequent steps, distinguishing it from sibling tools like derivation_delete_step or derivation_get_step. The core purpose is immediately clear and specific.

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 provides context for when to use: rolling back to a step to try a different derivation path, and explains the 0 value clears all steps. However, it doesn't explicitly name alternatives or exclusions, so it falls short of a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/u9401066/nsforge-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server