Skip to main content
Glama
JonathanChan-geek

autoshop

il_patch_copy

Clone a read-only PLC project into a new directory, apply a unique text patch to a specified .IL file, and quarantine stale build artifacts while verifying the source file hash to prevent concurrent edits.

Instructions

在不改动源工程的前提下,生成打了唯一匹配文本补丁的新工程副本,并把失效缓存/陈旧产物移入隔离区。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
destYes新工程目录(必须不存在)
fileYes要修改的 .IL basename
projectYes源工程目录(只读)
new_textYes替换后的文本(LF)
old_textYes必须唯一匹配的原文(LF)
quarantineNo是否隔离派生表
expected_sha256Yes源文件当前 SHA256(防并发改动)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses that the source project is not modified and that invalid caches/stale artifacts are moved to quarantine. It does not describe failure modes, return semantics, permission requirements, or behavior when old_text is not unique or expected_sha256 mismatches.

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 one dense sentence with no filler; the key constraint, action, and side effect are all present. The long Chinese clause chain makes it slightly less scannable than separate short sentences, but it earns its length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter tool with no output schema and no annotations, the description covers the high-level outcome and a key side effect, and the schema covers parameter details. It omits expected return values, failure behavior, and how quarantine relates to the quarantine parameter, leaving it minimally adequate but not fully complete.

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 description reinforces concepts like 'unique match' and quarantine, but it does not add meaning beyond the parameter schema, which already documents old_text uniqueness, dest non-existence, and expected_sha256 concurrency protection.

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 concrete operation: generate a new project copy with a unique-matching text patch applied, without modifying the source project, and quarantine stale/invalid artifacts. This is specific about verb and resource, though it does not explicitly name or differentiate sibling tools like ld_to_il_copy or native_compile_copy.

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 phrase '在不改动源工程的前提下' implies the tool is intended for scenarios where the source must remain untouched while a patched copy is produced. However, it gives no explicit when-to-use/when-not-to-use guidance and does not compare against sibling copy/patch tools, so an agent must infer the appropriate selection context.

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