Skip to main content
Glama

studio_apply_commands

Applies atomic, validated edits to an authoritative Studio document, accepting command batches or RP/1 fragments with revision checks and undo support.

Instructions

提交同一权威文档的原子修改。commands或rp1片段二选一;rp1需要sourceMode:insert/update和pageId,显式字段增量更新、省略内容保留,支持行列号诊断。editNodes按role/within批量改稿;精确参数用studio_describe按需发现。强校验版本、幂等、WAL与撤销。

Input Schema

NameRequiredDescriptionDefault
rp1NoRP/1节点片段;用#id稳定命名,精确语法见studio_describe(topic:rp1)
urlNo
portNo
actorNo
indexNo
labelNo
pageIdNo
sourceNo
verboseNo
clientIdNo
commandsNo
maxBytesNo
parentIdNo
documentIdNo
includeDocNo
projectDirNo
sourceModeNo
selectionIdNo
baseRevisionYes
includeSceneNo
idempotencyKeyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.5

TDQS

A3.6/5.0
Behavior4/5

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

Beyond the annotations, it discloses that updates are incremental on explicit fields with omitted content preserved, that row/column diagnostics are returned, and that the tool enforces version validation, idempotency, WAL, and undo. Notably it explains why the destructiveHint=false annotation is credible — deletions are covered by WAL and undo — which is exactly the context annotations alone cannot convey.

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 text is compact and front-loaded: the core operation comes first, then mode selection, then the rp1 requirements, then behavioral guarantees. It is dense and heavily abbreviated, but each clause carries information rather than padding.

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 tool with 21 parameters, a 20-plus value command enum, nested objects, and no output schema, the description covers mode selection and behavioral guarantees but leaves most parameters undocumented and offers no sense of what a successful response contains. The pointer to studio_describe(topic:rp1) mitigates this but pushes essential detail out of the definition.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 5% across 21 parameters, so the description bears most of the burden and mostly does not carry it. It explains rp1, sourceMode, pageId, and the editNodes role/within addressing, but baseRevision, idempotencyKey, maxBytes, documentId, projectDir, selectionId, index, label, and the remaining optional fields go unexplained in both schema and description.

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: it submits atomic modifications to a single authoritative document, and it distinguishes the two input modes (commands array vs. rp1 fragment). It does not name sibling tools like studio_merge_document or studio_undo to sharpen the boundary, so it stops short of full differentiation.

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?

It gives an explicit either/or rule — commands or rp1, never both — and states the prerequisites rp1 carries (sourceMode insert/update plus pageId). It also routes the agent to studio_describe for exact parameters, which is real guidance, but it never says when to prefer this tool over the other document-mutating siblings.

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

Deploy Server

Other Tools