Skip to main content
Glama

davinci_script_api

Look up DaVinci Groovy Automation API capabilities, symbols, and script usage before writing scripts, confirming real method signatures and resolving references instead of guessing.

Instructions

查 Groovy Automation API 能做什么;写脚本前先用它,不要凭记忆猜 API。

两种数据来源:

  • source="jar"(推荐):查本机 DaVinci 安装目录里 JAR 反射出的真实类型与方法, 能回答「这个方法到底存不存在、参数是什么」。需先 davinci_api_index。

  • source="builtin":查随包内置的文档目录,约 50 条,每条都标了官方出处。

source="auto"(默认):有 JAR 索引就用它,没有则退回内置目录,并在 note 里说明。

Args: query: 关键字检索,中英文均可,例如 "校验结果"、"validation result"。 domain: 内置目录的能力域:task / model / validation / result / generation / transaction / variant / logging;JAR 模式下等价于关键字。 symbol: 查单个符号。JAR 模式支持 类#方法,例如 "IValidationResultUI#isId"、"EValidationSeverityType"、"ScriptApi"。 script: 传脚本路径,核对它用到的符号;JAR 模式下会给出 resolved / unresolved。 limit: 检索返回条数上限,默认 8。 source: auto / jar / builtin,默认 auto。

不传参数时返回能力地图(JAR 模式给包概览,内置模式给能力域)。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "davinci_script_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
queryNo
domainNo
scriptNo
sourceNoauto
symbolNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose non-obvious behavior: the auto-fallback path and the explanatory `note` it emits, the prerequisite JAR index, the no-argument capability-map return, and that script mode yields resolved/unresolved symbols. It never explicitly says the tool is read-only and gives no error behavior when the JAR index is missing, which keeps it from a 5.

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 the "don't guess" rule are front-loaded, followed by source modes and a bulleted Args block, so it scans well. The Args section is long but every entry adds semantics the schema lacks; only minor trimming of repeated defaults would improve it.

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 six-parameter, no-annotation, no-output-schema lookup tool, the description covers mode semantics, prerequisites, fallback behavior, and the shape of results at a high level (capability map, note, resolved/unresolved). It stops short of describing the actual result fields or failure modes when the JAR index is unavailable.

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 description coverage is 0%, yet all six parameters are explained in the description: query accepts Chinese or English with examples, domain enumerates the built-in capability domains and notes it degrades to a keyword in JAR mode, symbol documents the `类#方法` syntax with samples, script is a path to be checked, limit defaults to 8, and source lists its three values. This fully compensates for the bare schema.

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 verb and resource: look up what the Groovy Automation API can do, via two concrete data sources (JAR reflection vs. bundled docs). It further distinguishes its own modes (query, domain, symbol, script verification, no-arg capability map), so an agent can tell exactly what this tool returns and how it differs from a guess.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit ordering guidance is given: use this before writing a script, do not guess the API from memory. It also states the prerequisite (jar mode requires davinci_api_index first), which source is recommended ("jar" 推荐), and what auto does when the index is absent. That is when-to-use plus mode selection plus fallback, not left to inference.

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