Skip to main content
Glama

ACTION_TEXT_OPERATION

Process text by replacing, slicing, splitting, changing case, trimming whitespace, or joining strings, then return the result as text_output for workflow use.

Instructions

文本处理:替换、截取、拆分、大小写、去空白、拼接。输出:text_output。split 的结果是用换行连接的一个字符串,不是数组;要真正的数组用 ACTION_ARRAY(action=set)。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
endNosubstring:结束下标(不含),默认到末尾
newNoreplace:替换成的文字,支持 ${var}(也认:replace_with)
oldNoreplace:要被替换的文字,支持 ${var}(也认:search)
textNoappend/prepend:要拼接的文字,支持 ${var}
inputNo输入:变量名(取其值)或字面文本(支持 ${var})(也认:source_var)
startNosubstring:起始下标(含)(默认 0)
actionYes操作类型(也认:operation)
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
delimiterNosplit:分隔符(默认 ,)
output_varNo结果变量名(默认 text_output)
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and discloses several non-obvious traits: split returns a newline-joined string rather than an array, string parameters accept ${var} interpolation, and results come back as a variable snapshot JSON with the default output name text_output. It does not explain how errors interact with on_error or the node timeout, leaving that to the schema.

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 operation list, then the output contract, then the caveats, which is the right order for scanning. It is dense but nearly every clause carries information; the doubled '。。' punctuation and the slightly redundant 'output: text_output' / 'results returned as variable snapshot JSON' pairing are minor blemishes.

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?

There is no output schema, so the description must cover return behavior, and it does: named result variable, snapshot JSON shape, and the surprising string-vs-array split result. Combined with a fully documented 12-parameter schema, an agent has enough to call this correctly; only error-path semantics are left implicit.

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 baseline is 3, but the description adds meaning the schema does not: all string parameters support ${var} interpolation and the result variable defaults to text_output. It adds nothing about start/end indexing beyond what the schema already documents, so it sits just above baseline.

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?

Opens with a specific resource (text) and enumerates the exact operations (replace, substring, split, case conversion, trim, concat) that map onto the action enum. It also explicitly distinguishes itself from ACTION_ARRAY for the array-producing case, so an agent can separate the two without reading either schema.

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 an explicit routing rule for the one ambiguous case: if a real array is wanted rather than a newline-joined string, use ACTION_ARRAY (action=set). It does not cover when to prefer ACTION_PARSE_JSON, ACTION_SET_VARIABLE, or ACTION_ASSERT for related string work, so the guidance is clear but not exhaustive.

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