Skip to main content
Glama

davinci_project_diff

Compare two DaVinci projects to detect changes in files, settings, input files, and ECUC parameters. Identify renames, exclude generated output, and get replay commands for input file updates.

Instructions

比较两个 DaVinci 工程,输出文件、设置、输入文件与 ECUC 四类差异(只读)。

left 是基准,right 是目标。文件按相对路径对齐、SHA-256 判内容变化, 同哈希异路径识别为重命名;生成目录默认排除并单独汇总——生成物是配置的 派生结果,几千个 .c/.h 会淹没真正的变更。

输入文件(DBC/CDD/LDF/FIBEX/ODX/ECU Extract/DDM JSON)单列在 inputs: 先看设置里的显式引用(high),再看 Input/ 布局(medium),最后按扩展名 兜底(low)。输入文件的变更不能用 ECUC 赋值回放,replay 里给出 CFG5 DVCfgCmd -u --input 或 CFG6 project update -c 的命令清单。

ECUC 语义对比依赖 py-armodel:未安装或解析失败时返回 ecuc.available=false 与原因,文件级/设置级结论不受影响。

Args: left: 基准工程:目录、.dvjson、.dcf 或 .dpa。 right: 目标工程,类型同 left。 include_generated: 是否把生成目录内的差异计入主表(默认 false,单独汇总)。 settings: 是否做设置文件键值级对比(Settings/*.json、根 .dvjson、.dpa 内 JSON)。 inputs: 是否对比输入文件并生成命令行回放计划。 ecuc: 是否做 ECUC 参数级语义对比。 release: py-armodel 解析用的 AUTOSAR release(仅影响解析规则)。 max_changes: 每类明细最多返回多少条;计数不受影响。 max_files: 单侧最多扫描多少个文件。 allow_outside: 允许读取 DAVINCI_MCP_ROOTS 之外的工程(只读)。 active_root: ECUC 模型路径根,默认 /ActiveEcuC(官方 mdfModel 示例的写法)。 cli_path: DaVinci 命令行可执行文件路径;缺省用 DVCfgCmd / dvcfg-b 名称。 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"
  }
}

Input Schema

NameRequiredDescriptionDefault
ecucNo
leftYes
rightYes
inputsNo
releaseNoR21-11
cli_pathNo
settingsNo
max_filesNo
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?

With no annotations, the description carries the full burden and does it well: it declares the operation read-only, discloses the alignment algorithm (relative path + SHA-256, same-hash-different-path = rename), states that generated outputs are excluded from the main table and summarized separately with a rationale, and documents graceful degradation (ecuc.available=false) when py-armodel is absent. It also notes that file/settings conclusions survive parse failure and that allow_outside bypasses DAVINCI_MCP_ROOTS. What it does not describe is the shape of the returned report or how truncated detail (max_changes) is signalled to the caller.

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?

Purpose and read-only status are front-loaded, then semantics, then a scannable Args list — good information hierarchy with no filler sentences. It is on the long side, and a few clauses (e.g. the re-statement of default values already in the schema) could be trimmed, but each paragraph carries substantive content.

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 13-parameter, diff-producing tool with no annotations and no output schema, the description covers behavior, degradation, and every parameter's meaning. The remaining gap is the return contract: the caller learns that ecuc.available and a 'replay' command list exist but not the overall report structure, ordering, or how per-category truncation is surfaced.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% — the schema provides only bare titles and defaults — yet the Args section gives every one of the 13 parameters real meaning: left/right accepted forms (目录、.dvjson、.dcf、.dpa), what include_generated/settings/inputs/ecuc actually switch on and off, that release only affects py-armodel parsing rules, that max_changes truncates detail but not counts, that allow_outside is a read-scope gate, and the fallback resolution order for cli_path and bsw_package. This is the description doing the schema's job and then some.

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?

Opens with a specific verb and resource ('比较两个 DaVinci 工程') and enumerates the four output categories (文件、设置、输入文件、ECUC), plus the read-only marker. It is clearly distinguishable in substance, but it never names or contrasts with the obvious siblings davinci_ecuc_diff or davinci_project_diff_script, so the agent must infer which one to pick when only ECUC is of interest.

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?

Gives a clear operating contract: 'left 是基准, right 是目标', explains why generated directories are excluded by default, and explains the high/medium/low confidence ordering for input-file detection. What is missing is any exclusion or alternative routing (e.g. when to use davinci_ecuc_diff instead), so it is context-rich but not a when/when-not rule set.

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