Skip to main content
Glama

workflow_diff_preview

Preview line-level differences between a workflow document and the current trunk version, showing unified-style changes and added/removed line counts before saving, ensuring safe, read-only validation.

Instructions

对比传入文档与 trunk 当前的行级差异(unified 风格 + 增删行数)——只读零副作用,落库前先预览。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actorYes操作者
data_dirNo数据根目录(缺省走 getDataDir 解析链)
workflowYes待对比 workflow 文档(与 workflow_create 同构)
workflow_idYesworkflow 标识

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly states '只读零副作用' (read-only, zero side effects) and describes the output nature (unified diff + line counts), which is strong transparency. It does not discuss edge cases like missing workflow IDs or large diffs, but the core behavior is well disclosed.

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 description is a single, information-dense sentence that front-loads the core purpose-matching behavior first, then the output format, and then the safety/usage constraint. Every phrase adds value and there is no redundant or filler content.

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 read-only diff-preview tool with fully documented parameters in the schema, the description provides the essential behavior, output format, and usage context. The only minor gap is the lack of an explicit return-value contract or error behavior, but no output schema exists, and the description's mention of unified diff and line counts gives an agent most of what it needs.

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%, so the baseline is 3. The schema already documents workflow_id, workflow, actor, and data_dir, including the note that workflow is structurally identical to workflow_create. The description adds little parameter-specific meaning beyond framing the comparison against trunk, which is acceptable given the schema handles parameter semantics.

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 states a specific action: comparing the passed-in document against the current trunk at line level, with a defined output format (unified diff style and added/deleted line counts). This clearly differentiates the tool from siblings like workflow_update or workflow_create, which persist changes rather than preview them.

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 description explicitly says '落库前先预览' (preview before persisting), giving a clear usage context. It does not explicitly name alternatives or state when not to use the tool, but the intended placement before a write operation is clear enough to guide selection.

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

Deploy Server

Other Tools