Skip to main content
Glama

Save an edit session to the library

save_to_library

Save the sprite from a SpriteForge edit session (from open_editor, open_sprite_in_editor, or an edit link the user pasted) into the user's library. A session opened from a library sprite updates that sprite (its previous version is kept in its history) unless as_new is true; any other session becomes a new sprite in project_id (default: the most recently used project). Saving the same session again updates the sprite it created.

Input Schema

NameRequiredDescriptionDefault
nameNoName for a new sprite (default: the session's name).
as_newNoSave as a new sprite even if the session came from a library sprite.
project_idNoProject for a new sprite (default: the most recently used project).
session_idYesThe session_id, or an edit link containing ?s=<id>.

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 a non-read-only, non-destructive, non-idempotent write, and the description adds real substance beyond them: library-origin sessions update in place with the prior version retained in history, other sessions create new sprites, and repeat saves update rather than duplicate. It omits permissions/auth requirements and what the call returns.

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 dense sentences, front-loaded with the action and scope, then the branching rules. No filler, though the parenthetical listing of session sources and defaults makes it slightly heavy for a four-parameter tool.

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?

Covers the mutation semantics, overwrite/history behavior, and defaulting rules needed to call it correctly. With no output schema, the description does not say what comes back (e.g. the sprite id) or how the saved sprite is named, which leaves a small gap.

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 100%, so all four parameters are already documented. The description adds only the behavioral interaction (as_new overrides library-origin update; project_id defaults to the most recently used project), which largely restates the schema's default text.

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?

Specific verb+resource: save the sprite from a SpriteForge edit session into the user's library. It names the session origins (open_editor, open_sprite_in_editor, pasted edit link), which distinguishes it from save_art / upload_sprite without needing those schemas.

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?

Clearly states when this applies (any session, with the library-origin case spelled out) and how as_new overrides that. It does not name sibling alternatives such as save_art or upload_sprite, so the agent must infer which tool handles non-session artwork.

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.

Resources