Skip to main content
Glama
Off Shoring MCP

Off Shoring MCP

Append turn

append_turn

Saves one explicit dialogue turn—speaker, exact text, and canon status—to a story with revision checks and idempotency to prevent duplicate appends.

Instructions

Save one explicit turn: the speaker, the exact text, and a status. This writes saved fiction and is the only way dialogue enters the store. idempotency_key is required, so retrying the same call cannot duplicate the turn (reusing a key with different arguments is refused). expected_revision must match the current story revision. status=completed means settled canon; draft, cancelled and failed are stored but are not canon. The tool confirms the stored turn id and new revision.

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": {
      "story_id": "<story_id>",
      "speaker": "<speaker>",
      "text": "<text>",
      "idempotency_key": "<idempotency_key>",
      "expected_revision": "<expected_revision>"
    },
    "name": "append_turn"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
statusNocompleted
speakerYes
story_idYes
branch_idNo
parent_turn_idNo
idempotency_keyYes
expected_revisionYes

Output Schema

NameRequiredDescriptionDefault
okNo
turnYes
revisionYesNew story revision after this write.
story_idYes
branch_idYes
idempotent_replayNoTrue when this result was replayed from an earlier identical call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does well: it discloses write semantics, retry safety ('retrying the same call cannot duplicate the turn'), key-reuse refusal, optimistic-concurrency failure via expected_revision, and which statuses count as canon. It omits what happens with branch_id/parent_turn_id and whether the write is reversible.

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?

Front-loaded with what is written, then idempotency, then concurrency, then status semantics. Every sentence carries distinct information; no restatement of the name or title.

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?

An output schema exists, so return detail is optional, yet the description still notes it confirms the turn id and revision. For an 8-parameter mutation with no annotations, the remaining gap is the branching parameters, which are neither described nor explained.

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 0%, so the description must compensate, and it explains the semantics of speaker, text, status (with per-value meaning for canon vs non-canon), idempotency_key, and expected_revision. branch_id and parent_turn_id, two of the more consequential parameters, get no meaning at all.

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?

States a specific verb and resource ('Save one explicit turn') and lists the payload it captures. 'This writes saved fiction and is the only way dialogue enters the store' distinguishes it from read-only siblings such as read_turns and get_story_context.

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?

Explains the required preconditions for a successful call: an idempotency_key and an expected_revision matching current story revision. It does not name an alternative for branching scenarios, and branch_id/parent_turn_id have no stated usage conditions, so it falls short of full when/when-not guidance.

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