Skip to main content
Glama

填充文本槽

xiumi_fill_text

Replaces a specified text slot in a Xiumi component with new text, supporting line breaks via component ID and zero-based slot index.

Instructions

把某个组件内第 slotIndex 个文本槽替换为指定文字(支持 \n 换行)。文本槽编号从 0 开始,顺序与组件内可见文字一致。

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": {
      "compId": "<compId>",
      "slotIndex": "<slotIndex>",
      "text": "<text>"
    },
    "name": "xiumi_fill_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes要写入的文字
compIdYes组件 ID(tn-uuid),来自 xiumi_insert_template 或 xiumi_get_comps
slotIndexYes文本槽序号,从 0 开始

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden, and it does disclose two non-obvious traits: zero-based slot numbering and that slot order follows visible text order, plus \n newline support. It omits what happens on an out-of-range slotIndex, whether the change is persisted immediately or requires xiumi_save, and any return/error signal.

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?

A single compact sentence front-loads the operation and target, with the parenthetical newline note and the numbering rule appended efficiently. No redundant restatement of the tool name or title.

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 3-required-parameter mutation with no annotations and no output schema, the description covers the slot-addressing model well but leaves gaps on failure modes, persistence/save workflow, and what the call returns. Adequate to invoke, not fully self-sufficient.

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 coverage is 100%, so the baseline is 3, but the description adds genuine meaning beyond the schema by explaining that slot indices map to the visible text order within the component — something the schema only states as '从 0 开始'. It also confirms the text parameter accepts newlines, which the schema does not mention.

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 states a specific verb (替换/填充) and resource (组件内的第 slotIndex 个文本槽) with scope limited to a single component. It implicitly separates itself from image-slot siblings like xiumi_set_image by naming 文本槽, though it never explicitly contrasts with any sibling tool.

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 only implied: the word 替换 signals an existing component must already exist, and the schema notes compId comes from xiumi_insert_template or xiumi_get_comps. There is no explicit statement of when to use this versus other setters, nor any preconditions such as login or ordering relative to xiumi_save.

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