Skip to main content
Glama

save_artifact

Destructive

Guarda en Secondbrain un artefacto (artifact) generado por vos: una página autocontenida que el usuario va a poder VER RENDERIZADA, no leer como código.

Usar cuando el usuario diga "guardá esto en Secondbrain", "guardame el artifact", "dejalo en mi workspace" o equivalente, y también cuando pida ACTUALIZAR uno que ya guardaste (pasando artifact_id).

Mandar el contenido COMPLETO, no un fragmento ni un resumen: es lo que se va a renderizar.
  · tipo "html"     → el HTML entero del artifact (lo más común)
  · tipo "react"    → el JSX tal cual; acá se envuelve con React 18 + Babel + Tailwind
  · tipo "svg"      → el <svg>…</svg>
  · tipo "mermaid"  → el texto del diagrama
  · tipo "markdown" → markdown, que se convierte al formato del editor

Con artifact_id crea una VERSIÓN nueva del mismo artefacto (la anterior queda guardada y se puede restaurar); sin artifact_id crea uno nuevo. Con document_id queda colgado de ese documento.

**Sólo artefactos LIVIANOS: hasta 20 KB.** ANTES de llamar, medí cuánto pesa. Si pasa de 20 KB NO lo intentes —ni por esta tool ni por start_artifact_upload, gzip_base64 o save_artifact_from_url: con los pesados esos caminos fallan—. Decile al usuario que lo guarde con la extensión de Chrome de Secondbrain (con la conversación abierta en Chrome: ícono de Secondbrain → pestaña «Artefactos» → «Sincronizar»), que lo copia tal cual sin pasar por el modelo.

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": {
      "name": "<name>",
      "content": "<content>"
    },
    "name": "save_artifact"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesNombre del artefacto, como lo va a ver el usuario en la lista
notaNoQué cambió en esta versión, en una línea. Se muestra en el historial.
tipoNoQué es el contenido (default: html)
origenNoQué modelo sos. Sólo se usa si no se puede deducir del cliente MCP.
contentYesEl contenido COMPLETO del artefacto (o el base64 del gzip, si encoding='gzip_base64')
encodingNoCómo viene `content`. 'gzip_base64' = la salida de `gzip -c archivo | base64`, que pesa ~7 veces menos en tokens.
artifact_idNoPara ACTUALIZAR uno existente: su id. Omitir para crear uno nuevo.
document_idNoDocumento del que cuelga el artefacto
workspace_idNoUUID del workspace, o su nombre tal como lo dice el usuario ('Acme', 'el personal'). Omitir si el token ya tiene workspace fijo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior3/5

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

Annotations declare destructiveHint=true and idempotentHint=false, and the description supplies important counter-context: a call with artifact_id creates a NEW version while the previous one 'queda guardada y se puede restaurar', plus per-type wrapping behavior (React 18 + Babel + Tailwind) and a hard 20 KB ceiling. That is genuinely additive beyond the annotations. However it never states the side effects an agent most needs to reason about — what happens on size-limit rejection, whether content is stored verbatim, permission/auth requirements — and the restorable-previous-version claim sits uneasily beside destructiveHint=true, which the description never reconciles.

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 purpose, then triggers, then content rules, then the hard size constraint — a sensible priority order with a scannable bulleted type list. It is longer than average and repeats the size idea three times (20 KB, 'no lo intentes', the fallback), but each repetition guards against a distinct failure mode.

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 9-parameter mutation tool with no output schema, this covers the decisive questions: what to send, how to update, how to size, and where to go when too large. The notable gap is the return value — an agent updating an artifact later would want to know whether the new artifact_id comes back, which is not mentioned.

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, but the description adds real meaning: it explains the expected content shape per `tipo` value (full HTML, raw JSX, bare <svg>, diagram text, markdown conversion), and the create-vs-version distinction for artifact_id versus document_id. It does not add anything for `nota`, `origen`, `workspace_id`, or `encoding` beyond what the schema already says.

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 and resource ('Guarda en Secondbrain un artefacto') and immediately defines what an artifact is ('una página autocontenida que el usuario va a poder VER RENDERIZADA, no leer como código'), which prevents the common confusion with plain documents. It is clearly distinguishable from save_artifact_from_url and append_artifact.

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 trigger phrases ('guardá esto en Secondbrain', 'dejalo en mi workspace'), covers the update case via artifact_id, and adds an explicit when-NOT-to-use rule: over 20 KB this tool must not be attempted, nor should start_artifact_upload, gzip_base64, or save_artifact_from_url, with a named fallback (the Chrome extension). Rival paths are named and ruled out rather than left to inference.

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