Skip to main content
Glama

davinci_script_lint

Statically checks Groovy automation scripts for missing code blocks, unbalanced brackets, unknown task types, and unsafe calls, then optionally loads the project to verify compilation.

Instructions

静态检查 Groovy 脚本;compile_check=true 时再让 DaVinci 真正加载一次。

静态规则覆盖:scriptTask 缺失、code 块缺失、括号不配对、任务类型未知、 System.exit、起线程、静态可变字段、删除文件等。

Args: script: 脚本路径。 project: compile_check 时必填,DaVinci 需要先加载工程。 bsw_package: BSW 包目录。 compile_check: 是否调用 automation list 做编译检查。

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": {
      "script": "<script>"
    },
    "name": "davinci_script_lint"
  }
}

Input Schema

NameRequiredDescriptionDefault
scriptYes
projectNo
bsw_packageNo
compile_checkNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose meaningful traits beyond the name: the static rule set (missing scriptTask, unbalanced brackets, System.exit, thread creation, static mutable fields, file deletion, etc.) and that compile_check triggers an actual DaVinci load via automation list. It does not say what the tool returns on success/failure, how findings are reported, or whether the real load has side effects on the project.

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 core behavior is front-loaded in the first line, followed by a compact rule list and a clean Args block. Every section maps to something an agent needs; there is no filler.

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

Completeness2/5

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

For a tool with no annotations and no output schema, the description should describe what the lint returns (findings structure, failure signaling) and any side effects of the real compile load. It covers parameters and checked rules well but leaves the agent guessing about output and error behavior, which is a significant gap for a diagnostic tool.

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 description coverage is 0% (bare titles only), so the description must compensate, and it does: it documents all four parameters, including the conditional requirement that project is mandatory for compile_check and that compile_check invokes automation list. The only weak entry is bsw_package, which merely restates its name as 'BSW package directory'.

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 first line gives a specific verb and resource in Chinese: static checking of Groovy scripts, with an optional real load by DaVinci when compile_check=true. That distinguishes it from siblings like davinci_script_run or davinci_script_read, though it never names an alternative explicitly.

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?

Usage is implied rather than stated: you lint a script, and you set compile_check to additionally have DaVinci load it. There is one useful prerequisite (project is required when compile_check is true), but no explicit when-to-use / when-not-to-use guidance or comparison to sibling validation tools such as davinci_script_run.

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