Skip to main content
Glama
johnhenry

mallory-grapher

by johnhenry

session_snapshot

Serialize a session's portable state (free-cell values and define-specs) to reconstruct an equivalent session on resume, excluding computed-cell cache.

Instructions

Serialize a session's portable state (issue #6): current free-cell values plus define-specs. Does NOT include computed-cell cache -- those re-derive from define() on resume. Hand the returned document to session_resume, possibly on a different math-grapher process, to reconstruct an equivalent session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.0.1

TDQS

A4.1/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 burden and does well: it discloses that the computed-cell cache is deliberately omitted because cells re-derive from define() on resume, and that the output is a portable document usable in another process. It does not discuss side effects or failure modes, but for a serialize operation the key behavioral fact (what state is and isn't captured) is disclosed.

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?

Three front-loaded sentences that each add substance: what is serialized, what is not, and how to consume it. The parenthetical '(issue #6)' is the one piece of noise that does not help an agent decide or invoke, slightly undercutting otherwise tight prose.

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?

There is no output schema or annotation set, yet the description explains what the returned document contains and what the caller should do with it, which covers the important return-value concern. The only real gap is parameter origin/format for sessionId, which leaves the definition slightly short of fully self-contained.

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 coverage is 0% for the single sessionId parameter, so the description would need to compensate and largely does not — it never says where sessionId comes from (presumably session_open) or what form it takes. The session-centric framing implies the parameter's meaning, which is the minimum viable level given the coverage gap.

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 (serialize) and resource (a session's portable state), then enumerates exactly what is included (free-cell values, define-specs) and excluded (computed-cell cache). It also names the counterpart sibling session_resume, so an agent can distinguish it from session_get_cell or session_list without opening a 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 tells the agent what to do with the result: hand the document to session_resume, possibly across a different math-grapher process. That is a clear use context (session transfer/portability), though it does not state when NOT to use this tool or contrast with a sibling alternative beyond session_resume.

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