Skip to main content
Glama

davinci_project_diff_script

Generates Groovy or command-line replay scripts from differences between two DaVinci projects, with dry-run verification and read-only checks before applying ECUC parameter changes.

Instructions

把两个工程的差异渲染成「Groovy + 命令行」两套回放脚本。

mode="replay":把 ECUC 差异写成 Groovy 可执行脚本。默认 dryRun=true—— 逐条用 mdfModel(AsrPath) 确认路径可解析,但不改工程;确认后传 --dryRun=false 才在 transaction 内写入 ECUC 标量参数。 mode="verify":只读核对脚本,--failOnDiff=true 可让失配直接失败。 mode="cli":只渲染输入文件的命令行回放脚本(CFG5 -u --input / CFG6 project update -c),不生成 Groovy。

三种模式都会在 input_replay 里返回输入文件差异的回放计划。输入文件的 变更不写成 Groovy:派生配置由 DaVinci 重新导入输入后重算,直接改参数 会在下次 update 时被覆盖。

新增/删除参数、容器移动、设置与文件差异不会生成写入代码,统一记入 manual / fileChanges / settingChanges;输入文件的新增/删除也进人工清单。 不传 out_path 时直接返回脚本文本;传了会写文件,必须 confirm=true。

Args: left: 基准工程;right: 目标工程。 mode: replay(默认)、verify 或 cli。 out_path: 输出路径;.groovy 给 Groovy,.cmd/.bat/.sh/.json 给 CLI 回放。 confirm: 写文件前必须显式确认。 task_name: Groovy 任务名,默认按 mode 取 ProjectDiffReplay / ProjectDiffVerify。 include_generated: 是否把生成物差异也写进脚本的数据表(默认 false)。 settings: 是否包含设置键值差异(只打印,不自动应用)。 inputs: 是否包含输入文件对比与 CLI 回放计划。 ecuc: 是否做 ECUC 语义对比。 release: py-armodel 解析用的 AUTOSAR release。 max_changes: 每条数据表最多包含多少条明细。 allow_outside: 允许读取 DAVINCI_MCP_ROOTS 之外的工程(只读)。 active_root: ECUC 模型路径根,默认 /ActiveEcuC。 cli_path: DaVinci 命令行可执行文件路径;缺省用 DVCfgCmd / dvcfg-b。 cli_style: CLI 脚本格式 cmd / sh / json;缺省按 out_path 扩展名推断。 bsw_package: CFG6 project update 需要的 BSW 包目录;缺省从工程设置里找。

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": {
      "left": "<left>",
      "right": "<right>"
    },
    "name": "davinci_project_diff_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
ecucNo
leftYes
modeNoreplay
rightYes
inputsNo
confirmNo
releaseNoR21-11
cli_pathNo
out_pathNo
settingsNo
cli_styleNo
task_nameNo
active_rootNo/ActiveEcuC
bsw_packageNo
max_changesNo
allow_outsideNo
include_generatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does so well: dryRun defaults to true, writes happen only with --dryRun=false inside a transaction, verify mode is read-only with --failOnDiff, and out_path requires confirm=true. It also warns that directly edited derived parameters get overwritten by the next update. Missing only permission/root constraints beyond allow_outside.

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-loads the mode breakdown, then the argument list, which is the right order for a 17-parameter tool. The statement that input-file changes are not written as Groovy is made twice, and a couple of Args entries are near-tautological, but nothing is badly padded.

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

Completeness5/5

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

For a 17-parameter tool with no annotations and no output schema, the description covers modes, transaction and confirm semantics, artifact handling, and even names return keys (input_replay, manual, fileChanges, settingChanges) along with which diffs land where. An agent has enough to call it correctly.

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 0% (titles only, no descriptions), so the Args block is the sole parameter documentation and it covers all 17 parameters with real semantics: default task names per mode, extension-based cli_style inference, default /ActiveEcuC root, DAVINCI_MCP_ROOTS scope for allow_outside, and max_changes limiting per-table rows. This compensates well for the empty schema, though a few entries merely restate the field name.

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?

States a concrete verb and resource: renders the diff of two projects into 'Groovy + command-line' replay scripts. The word 'script' separates it from the plain diff siblings such as davinci_project_diff / davinci_ecuc_diff, though no sibling is named explicitly.

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?

Enumerates the three modes with their distinct purposes: replay writes ECUC scalars inside a transaction, verify is read-only, and cli emits only command-line playback. It also explains why input-file changes are deliberately not written as Groovy, which is genuine when-and-why guidance. It stops short of saying when to reach for this tool over the plain diff tool.

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