Skip to main content
Glama

ACTION_ARRAY

Manipulate array variables in automation workflows: create, append, pop, get length, join, clear, remove, and check containment, with string elements and JSON snapshot results.

Instructions

数组变量操作:建立、追加、弹出、取值、长度、拼接、清空、删除、包含。输出:array_result。value、item、index 不做 ${var} 插值;元素一律按字符串存。数组本体存回 var。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
varYes数组变量名(不要写 ${})
itemNopush/remove/contains:元素
indexNoget/remove:下标,负数从末尾数;get 默认 0,remove 不填则按 item 删除
valueNoset:按 delimiter 分隔的文本,或 JSON 数组字符串
actionYes操作类型
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
delimiterNoset/join:分隔符(默认 ,)
output_varNo结果变量名:set/push/clear/length 为长度,pop/get 为元素,remove 按下标为元素、按 item 为布尔,join 为字符串,contains 为布尔(默认 array_result)
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations supplied, the description carries significant behavioral context: it discloses that value, item, and index do not perform ${var} interpolation, elements are always stored as strings, and the array is written back to var. It also names the output variable and says results are returned as a variable snapshot JSON, though it does not describe error handling or timeout behavior beyond what the schema already provides.

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 compact and front-loads the operation list, so an agent can quickly see the tool's scope. There is minor redundancy between the output note and the final result-return sentence, plus a duplicated punctuation mark, but the wording is otherwise efficient.

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 10-parameter tool with no annotations and no output schema, the description supplies the key operational and interpolation behavior needed to call it correctly. It does not repeat all action-specific parameter mappings, but those are fully documented in the schema, so the definition is largely complete.

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 100%, so the parameter schema already documents each parameter well. The description adds meaningful semantics beyond the schema by stating that value, item, and index are not interpolated, that string parameters do support ${var} interpolation, and that array elements are stored as strings.

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 clearly states a specific resource, array variables, and enumerates operations including create, push, pop, get, length, join, clear, remove, and contains. It does not explicitly differentiate itself from related siblings such as ACTION_SET_VARIABLE or ACTION_PARSE_JSON, which keeps it below a 5.

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

Usage Guidelines2/5

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

The description identifies the domain as array variable operations but gives no explicit when-to-use or when-not-to-use guidance relative to sibling tools. It also does not state prerequisites or exclusions, leaving the agent to infer usage from the operation list.

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