Skip to main content
Glama

Toolbox: the workspace's saved code

toolbox

The workspace's Toolbox: code and animations saved by earlier builds, for reuse.

  • BEFORE writing a helper (chart layout, counters, text effects, easing, a data transform) or a scene the team has made before: toolbox({action: "find", query: ""}), then get the best match and use it.

  • Using an item: JS helper -> require("toolbox/") in run_script; Python helper -> a first line "# use: " in run_code; page JS/CSS -> get returns its API, and get with include_code: true returns the code to copy into the site as is (don't retype it); an animation -> animation.place({animation, project_id, clip_index}).

  • AFTER writing something another video could use: toolbox({action: "save", name, code | animation, summary, tags, usage}). The language is detected. Saving a name again adds a version; old versions stay, so nothing built on them changes. A save that reads like existing items lists them (similar): use or improve one of those instead of keeping a near-copy.

  • Saving, removing and protecting need an editor or admin; a protected item changes only for its owners or an admin.

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": {
      "action": "<action>"
    },
    "name": "toolbox"
  }
}

Input Schema

NameRequiredDescriptionDefault
revNoget: a version other than the latest.
codeNosave: the helper's source. JS for run_script is a CommonJS module (module.exports = {...}).
kindNofind: only code or only animations.
nameNoget/save/remove: the item's name, lowercase-with-dashes ('bar-layout'). get takes 'name@3' for a version.
tagsNosave: a few search words.
entryNosave: the page of a multi-page animation.
limitNofind: how many (default 10).
queryNofind: what you are about to build, in words ('bar chart race', 'logo intro').
usageNosave: how to call it -- its functions and arguments, an example.
actionYesfind: search the workspace's saved code and animations. get: one item's code. save: add an item (or a new version of a name). remove: take a name out. protect: only its owners or a workspace admin may change it from then on (protected: false lifts it).
ownersNoprotect: the user ids who may change it (default: you).
dry_runNosave: say what would happen, change nothing.
summaryNosave: what it does and when to reach for it (find searches this). Required.
languageNofind: only this language. save: only to correct the detected one (js = run_script, python = run_code, page = JS/CSS a page copies).
animationNosave: an animation of the project to keep (a COPY goes to the workspace library).
protectedNoprotect: true (default) to protect, false to lift it.
element_idNosave: the animation element to keep instead.
project_idNosave of an animation: its project.
include_codeNoget: also return a page item's code (left out by default: copy it into the site with it, don't read it).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: re-saving a name creates a version and leaves old versions intact, permission requirements for save/remove/protect, owner/admin-only mutation of protected items, and that saves resembling existing items return a 'similar' list. Annotations only say readOnly=false, destructive=false, idempotent=false; the description supplies the actual mutation semantics. Capped at 4 only because the interaction between remove and destructiveHint=false (whether removal is reversible) is not spelled out.

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-loads the identity of the resource, then organizes guidance into before/use/after/permissions bullets, with zero filler sentences. It is dense — a couple of bullets pack three distinct rules — but every line carries operational information.

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 19-parameter, five-action tool with no output schema, the description covers the lifecycle (search, retrieve, save, version, protect), permissions, and what get returns ('its API'), which is what an agent needs to call it correctly. The only shortfall is that remove and dry_run outcomes are not described beyond the schema.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3; the description earns above that by explaining name@3 version syntax via 'get takes name@3', that language is auto-detected on save and the parameter only overrides it, and that include_code is the path to copying a page item into a site. These are workflow-level meanings the schema descriptions alone imply but don't connect.

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 the specific resource (the workspace's saved code and animations from earlier builds) and enumerates the five actions (find, get, save, remove, protect) with a one-line gloss on each. An agent can immediately tell this apart from run_script or run_code, which execute rather than store.

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?

Gives explicit when-to-use triggers ('BEFORE writing a helper...', 'AFTER writing something another video could use') plus concrete per-language invocation paths (require("toolbox/<name>") in run_script, '# use: <name>' in run_code, animation.place for animations). It also names a genuine alternative behavior: prefer improving a returned 'similar' item over saving a near-copy.

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.