Skip to main content
Glama

Validate a branching story graph

validate_story_graph
Read-onlyIdempotent

Validate branching-story JSON scene graphs by checking schema, missing choice targets, unreachable scenes, dead-end loops, and invalid guard predicates, returning issue codes and pass/fail results.

Instructions

Validate a branching-story-kit JSON scene graph. Checks the schema, detects missing choice targets, unreachable scenes, dead-end loops and invalid guard predicates, and returns structured diagnostics with issue codes, stats and a pass/fail verdict.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "validate_story_graph"
  }
}

Input Schema

NameRequiredDescriptionDefault
storyNoA branching-story-kit v1 story graph: {id?, title?, startScene (or legacy start), initialState?, scenes}. Scenes map id -> {title, body, ending?, choices?}. Choices carry label, next (or href), optional requires {key: minimum} and optional effects {key: value | {op: set|add|append|delete, value}}.
scenesNoAlternative to `story`: the scenes map.
startSceneNoAlternative to `story`: the start scene id.
initialStateNoAlternative to `story`: the initial state vector.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish readOnlyHint, idempotentHint, destructiveHint=false and a closed-world scope, so the safety profile is covered. The description adds genuine behavioral context beyond that: it enumerates the five classes of issues detected and states that output is structured diagnostics with issue codes, stats and a verdict, implying all issues are collected rather than failing fast. It stops short of saying what happens with malformed JSON or whether it throws versus returning a failed verdict.

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 core action is front-loaded in the first clause and the check list plus return summary follow in one dense sentence with no filler. It is slightly run-on, packing five issue classes into a comma series, but no sentence is wasted.

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?

For a read-only validator with full schema coverage and an output schema (so return values needn't be explained), the description covers what is examined and the shape of the result. The only meaningful gap is failure semantics on unparseable input and what a partial pass looks like, which keeps it from a 5.

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% and every parameter is documented, including the alternate calling forms (full `story` object versus decomposed `scenes`/`startScene`/`initialState`). The description adds no additional meaning about those parameters or how the two input shapes interact, so the baseline of 3 applies.

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 opens with a specific verb and resource ("Validate a branching-story-kit JSON scene graph") and then enumerates exactly what is checked: schema, missing choice targets, unreachable scenes, dead-end loops, invalid guard predicates. This is far more informative than a tautology, but it never explicitly contrasts itself with siblings like step_story_state or detect_state_drift, so differentiation is inferred from the verb rather than stated.

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?

No sentence says when to reach for this tool versus query_ai_story_benchmark or detect_state_drift, nor does it state prerequisites (e.g. run after authoring a story, before stepping state). Use is only implied by the word "validate" and the mention of a pass/fail verdict, which suggests a pre-flight check.

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