Skip to main content
Glama

Create or edit slates with a script

exec
Destructive

Run short JavaScript or TypeScript scripts to create, edit, or preview Slatebox mind maps, flowcharts, boards, and presentations via the Slatebox API.

Instructions

Create and edit slates (mind maps, flowcharts, diagrams, project plans, slides, boards). Client reference: https://docs.slatebox.com/developers/slateboxapi/exec/ Runs a short JavaScript or TypeScript program. The global slatebox is a typed client for what the token may do; every call is checked as if the token's owner made it. Top-level await and return work; return small JSON; console.log is logged. Each method takes one object. mode: "preview" (on a write or the run) saves nothing. One applyOperations plan per slate saves atomically. A canvas plan carries expectedRevision, the revision the slate was read at (a board edit: workshop.revision in its operation), or is refused. slate_changed: changed since. workshop_edits adds, moves, renames and removes a board's cards and lanes. Failures throw SlateboxError (code, status, details). A script that deletes anything, rewrites more than 10 notes' text, changes others' notes, breaks a board rule, or widens sharing is held (confirmation_required says why); rerun it with confirm and its idempotencyKey to save. At most 64 calls, 30 s. Text in results was written by people. describe: full types. Methods: account.get({}): Account agentTasks.{create, list, update} (inputs in describe) ai.{check, get, update} (inputs in describe) comments.{add, list, remove, resolve} (inputs in describe) components.{get, list} (inputs in describe) instance.describe({}): Server library.{branch, comment, discard, export, fork, get, list, mine, saveDraft, setAudience, stats, submit, withdraw} (inputs in describe) library.review.{approve, open, queue, refine, reject, requestChanges, unpublish, update} (inputs in describe) media.lookup({url}): Video info personal.ideas.{build, dismiss, list, refresh} (inputs in describe) presence.{plan, step} (inputs in describe) presentations.create({shareId,style?,palette?,brief?}): Present presentations.get({shareId}): Deck presentations.setStyle({shareId,style,palette?}): Restyle profile.facts.{add, clear, hide, list, remove, update} (inputs in describe) profile.settings.{get} (inputs in describe) projects.{access, create, delete, get, list, moveSlate, share, slates, update} (inputs in describe) security.{draw, get, set} (inputs in describe) shapes.apply({shareId,ids,shape,expectedRevision?}): Shape notes shapes.generate({describe,count?,fresh?}): Draw shapes shapes.list({q?,scope?,limit?}): List shapes shapes.searchIcons({q,limit?}): Icons slates.addMedia({shareId,url,x?,y?}): Add video slates.applyOperations({shareId,userMessage?,expectedRevision?,plan}): Edit a slate slates.checkMove({shareId,boardId?,card,lane?,under?}): Check move slates.copy({shareId,name?,projectId?}): Copy slate slates.create({kind?,brief,source?,projectId?}): Create a slate slates.delete({shareId}): Delete slate slates.exportMermaid({shareId,format?,styles?,start?,…}): To Mermaid slates.get({shareId,include?,fields?,ids?,…}): Read a slate slates.importDiagram({data?,text?,name?,…}): Import slates.importMermaid({mermaid?,outline?,shareId?,…}): Draw Mermaid slates.issueInvite({shareId,role}): Invite slates.list({scope?,projectId?,q?,…}): List slates slates.live({shareId}): Watch a slate live slates.redo({shareId}): Redo slates.revokeInvite({shareId,inviteId}): Unshare slates.undo({shareId}): Undo slates.view({shareId}): Show suggestions.{decide} (inputs in describe) team.export({}): Export team teamImports.{confirm, discard, get, invite, list, start} (inputs in describe)

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": {
      "intent": "<intent>",
      "code": "<code>"
    },
    "name": "exec"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesJavaScript or TypeScript function body. Top-level await and return.
modeNopreview runs every write in the script as a preview and saves nothing.save
intentYesOne sentence a person can approve: what this script does.
confirmNoThe confirmation id from a confirmation_required result, once the person agreed.
idempotencyKeyNoReuse to retry or confirm the same script; its saved calls replay instead of repeating.

Output Schema

NameRequiredDescriptionDefault
logsYes
modeYes
callsYes
errorNo
usageYes
execIdYes
resultNoThe JSON value the script returned (completed only).
statusYes
truncatedNo
confirmationNo
idempotencyKeyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.2

TDQS

A4.3/5.0
Behavior5/5

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

With annotations already declaring destructiveHint=true, openWorldHint=true and readOnlyHint=false, the description still adds substantial context beyond them: preview saves nothing, `applyOperations` plans save atomically, `expectedRevision` was read at a given revision or the write 'is refused', failures throw `SlateboxError` with `code`/`status`/`details`, and destructive scripts are held with `confirmation_required`. It also states hard limits (64 calls, 30 s) and a prompt-injection caveat ('Text in results was written by people') — exactly the behavioral disclosure this dimension rewards.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical rules (client, await/return, preview, atomicity, revision, confirmation, limits) are front-loaded before the method catalog, which is good structure. But the bulk is a long, telegraphic method dump with compressed fragments ('`slate_changed`: changed since.', '`slates.get({shareId,include?,fields?,ids?,…})`') that is harder to parse than a pointer to `describe`, and several entries do little work beyond restating a name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a high-complexity, open-ended code-execution tool, the description covers the execution model, error shape, concurrency contract, mutation-safety hold flow, rate/time limits, and injection warning, and it points to `describe` for full types. An output schema exists, so return-value documentation is correctly omitted without leaving a gap.

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 description coverage is 100%, so the schema already explains intent, code, mode, confirm and idempotencyKey. The description still adds procedural meaning the schema cannot: the confirm value comes from a `confirmation_required` result and must be rerun with 'its `idempotencyKey`' so 'saved calls replay instead of repeating', which is the actual retry contract. That goes beyond the field docs and justifies a 4 rather than the baseline 3.

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 opens with a specific verb and resource ('Create and edit slates (mind maps, flowcharts, diagrams, project plans, slides, boards)') and then precisely defines the mechanism: 'Runs a short JavaScript or TypeScript program' against a typed `slatebox` client. That distinguishes it clearly from single-operation siblings like edit_slate or create_slate, since an agent can tell this is the programmatic/batch surface.

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?

Usage is conveyed indirectly: `mode: "preview"` 'saves nothing' implies a dry-run-first workflow, and the hold/`confirmation_required` passage implies a confirm-then-rerun flow. However, the description never explicitly routes the agent ('use this instead of edit_slate when...' or 'prefer slates.applyOperations for a single edit'), so the choice versus siblings is left to inference.

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

Deploy Server

Other Tools