Skip to main content
Glama

Edit Agent draft

agent_draft_edit
DestructiveIdempotent

Edits the saved draft at expected_revision with a client-generated request_key.

Identical replay with that key recovers a lost response. A stale new request fails; agent_draft_read provides current values for a revised edit. Empty list replacement clears it; omitted fields stay unchanged. This never publishes or changes a channel.

Input Schema

NameRequiredDescriptionDefault
editYesDraft field changes and expected_revision from agent_draft_read; omitted fields stay unchanged.
agent_idYesAgent ID from agents_list or agent_create.
request_keyYesClient-generated request UUID; identical retries retain this key.

Output Schema

NameRequiredDescriptionDefault
draftYes
effectYes
agent_idYes
replayedYes
request_keyYes
workspace_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / $defs / ConversationPolicy / description
      Previous value: -"Conversation-level rules, stored as JSONB on ``bot_configs.conversation_policy``.\n\nStored legacy keys, such as the retired Agent-wide ``mode``, are ignored on read.\nWho answers first is each channel's ``reply_mode``."New value: +"Conversation-level rules, stored as JSONB on ``bot_configs.conversation_policy``.\n\nWho answers first is each channel's ``reply_mode``."
  2. Changed3 schema fields changed
    • addedInput schema / properties / agent_id / description
      Added value: +"Agent ID from agents_list or agent_create."
    • addedInput schema / properties / edit / description
      Added value: +"Draft field changes and expected_revision from agent_draft_read; omitted fields stay unchanged."
    • addedInput schema / properties / request_key / description
      Added value: +"Client-generated request UUID; identical retries retain this key."
  3. Changed1 schema field changed
    • addedInput schema / $defs / AgentDraftEdit / properties / avatar_url
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 500,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "URL from agent_avatar_upload; null returns to the default avatar.",
      +  "title": "Avatar Url"
      +}
  4. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations give readOnly=false, destructive=true, idempotent=true, but the description adds substantive behavior beyond those hints: identical replay with the same request_key recovers a lost response, stale revisions are rejected, empty list replacement clears a list, omitted fields stay unchanged, and the edit does not auto-publish. These are exactly the failure modes and partial-update semantics an agent needs and cannot infer from hints alone.

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?

Five short sentences, each carrying distinct information: identity/concurrency, replay recovery, stale failure plus alternative, list-clearing/omission semantics, and effect boundary. The most important constraint (expected_revision) is front-loaded, and nothing is wasted or repeated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a nested-object, 3-required-parameter mutation with an output schema, the description covers the hard parts: optimistic concurrency, idempotent retry via request_key, partial-update versus clear semantics, and the fact that changes stay in draft. Return values are handled by the output schema, so nothing material is missing.

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 earns credit by explaining request_key's replay semantics, expected_revision's staleness contract, and the critical partial-update rule that explicit empty replacement clears while omissions preserve. That said, request_key is separately described in the schema, so some of this is reinforcement rather than pure addition.

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 verb and resource ("Edits the saved draft") scoped to expected_revision, and the closing line "never publishes or changes a channel" draws a hard boundary against sibling tools like publication_publish and channel_settings_edit. An agent can distinguish this from agent_draft_read or agent_create without opening any 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?

Explicitly routes the failure case: "A stale new request fails; agent_draft_read provides current values for a revised edit." It also implies when-not (not for publishing, not for channel changes). However it never states the positive trigger for choosing this tool (e.g. "use after agent_draft_read to apply field changes"), leaving the general when-to-use implicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources