Skip to main content
Glama

Create or update episode outlines

upsert_episodes

Creates episodes (no id, number required) or updates them (id + expected_version): title, summary, goal, hook, cliffhanger, connect_back, beat skeleton, target length, paywall gate, overrides. Outline many episodes per call (up to 50). Scripts are written with write_episode_script.

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": {
      "drama_id": "<drama_id>",
      "episodes": "<episodes>"
    },
    "name": "upsert_episodes"
  }
}

Input Schema

NameRequiredDescriptionDefault
drama_idYesThe drama id (drm_…), from list_dramas or create_drama.
episodesYesEpisodes to create or update, matched by number: title, summary, hook, cliffhanger.

Output Schema

NameRequiredDescriptionDefault
episodesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare the write, non-idempotent, non-destructive, closed-world profile, so the bar is lower; the description still adds real behavior — batch ceiling of 50, matching by episode number, and the expected_version concurrency token that implies conflict handling. It does not say what happens on a version mismatch or whether omitted fields are cleared, which keeps it out of 5 territory.

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-loaded with the create/update rule, then the payload scope, then the batch limit and sibling routing. The middle field enumeration (title, summary, goal, hook, cliffhanger, connect_back...) is somewhat redundant with a fully documented schema, but it is compact and reads as a single efficient line.

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?

With an output schema present and 100% schema coverage, the description only needs to cover mode selection, scale, and sibling boundaries — all of which it does. The remaining gap is conflict/failure behavior for expected_version and whether episodes omitted from the array are left untouched, neither of which the agent can infer.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents drama_id, the episode fields, and the per-field meanings like music_cues levels and is_paywall_gate. The description adds genuine semantics by mapping id/number/expected_version presence to create-vs-update mode and stating the 50-episode cap, but the enumerated field list largely restates the schema. Baseline 3 fits.

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?

Names a specific verb+resource and splits the two modes precisely: create when there is no id (number required), update when id plus expected_version are supplied. The trailing pointer to write_episode_script separates outline authoring from script writing, so an agent can tell it apart from its nearest sibling.

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?

The create-vs-update condition is stated explicitly and the script-writing case is routed to write_episode_script, which is the main ambiguity an agent would face here. It stops short of naming when not to use it (e.g. drama-level or scene-level edits belonging to update_drama/update_scene), so it is clear context without full exclusions.

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.