Skip to main content
Glama

party_get_prefetch

Retrieve pre-generated narrative variants for combat turns to accelerate storytelling. Uses cached content when available to reduce main-model calls, providing instant refined narratives for D&D campaigns.

Instructions

Retrieve a pre-generated narrative variant for a combat turn.

If the prefetch engine has a cached variant for this turn, returns a refined narrative instantly (no main-model call needed). On cache miss, falls back to full generation with the main model.

Call this right after party_thinking, before writing your own narrative. If 'cached' is true in the response, use 'narrative' as your starting point and adjust only the details that differ from actual game state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
turn_idYesTurn identifier — use the same format as the observer: 'round_{N}_{character_name}', e.g. 'round_3_Aria'
outcomeYesActual combat outcome: 'hit', 'miss', or 'critical'
rollNoThe actual attack roll value
damageNoDamage dealt (for hit/critical)
target_hpNoTarget's remaining HP after damage
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively explains the tool's dual behavior: returning cached narratives when available and falling back to full generation on cache misses. It also describes the response structure ('cached' field, 'narrative' field) and how to interpret them. However, it doesn't mention potential rate limits, authentication needs, or error conditions.

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?

The description is efficiently structured with four sentences that each serve a distinct purpose: stating the tool's function, explaining cache behavior, providing usage timing, and explaining response handling. There's no wasted text, and the most critical information (what the tool does) comes first.

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 tool with 5 parameters, 100% schema coverage, but no annotations or output schema, the description does an excellent job explaining the tool's purpose, behavior, and usage context. It effectively compensates for the lack of structured behavioral annotations by describing the cache mechanism and response interpretation. The main gap is the absence of output schema documentation, but the description partially addresses this by explaining key response fields.

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?

The schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema descriptions. It mentions 'turn' and 'outcome' generally but doesn't provide additional context about parameter usage or relationships. This meets the baseline expectation when schema coverage is complete.

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?

The description clearly states the tool's purpose: 'Retrieve a pre-generated narrative variant for a combat turn.' It specifies the verb ('retrieve'), resource ('pre-generated narrative variant'), and context ('combat turn'), distinguishing it from sibling tools like party_thinking or combat_action. The description goes beyond the tool name to explain what it actually does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: 'Call this right after party_thinking, before writing your own narrative.' It also explains what to do with the response ('If 'cached' is true in the response, use 'narrative' as your starting point...'). This gives clear temporal and contextual instructions that help the agent choose this tool appropriately.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Polloinfilzato/dm20-protocol'

If you have feedback or need assistance with the MCP directory API, please join our Discord server