Skip to main content
Glama

save_artifact

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.

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.5/5.0
Behavior5/5

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

Beyond readOnly/destructive annotations, it discloses non-obvious behavior: type-specific rendering pipelines (react is wrapped with React 18 + Babel + Tailwind, markdown is converted to the editor format), versioning semantics (artifact_id creates a new version while the prior one remains restorable), document attachment, and a hard 20 KB ceiling. These are exactly the traits an agent cannot infer from annotations or schema.

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-loaded with the core definition, then a trigger clause, then a scannable bulleted type table, then the size constraint. It runs long and repeats the completeness requirement ("Mandar el contenido COMPLETO" echoes the schema's "contenido COMPLETO"), and the 20 KB fallback paragraph is heavy, but every block carries decision-relevant content.

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 9-parameter mutation tool with 100% schema coverage and no output schema, the description covers everything an agent needs: when to call, payload completeness, per-type formatting, versioning risk, size limit, and the fallback path when the limit is exceeded. Nothing material is left unstated.

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 elaborating the tipo enum with per-type content requirements (full HTML, raw JSX, the <svg>…</svg>, diagram text, markdown) and by spelling out artifact_id create-vs-update and document_id association. It does not add anything about 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.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource and, critically, defines what an artifact IS (a self-contained page rendered visually, not code) rather than merely restating the name. It also states the create-vs-new-version semantics tied to artifact_id. It does not differentiate itself from mutation siblings such as append_artifact or patch_artifact, so an agent must infer which write path to choose.

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"), an explicit second use case (updating an existing artifact by passing artifact_id), and an explicit when-NOT: artifacts over 20 KB must not be sent through this tool nor through start_artifact_upload, gzip_base64, or save_artifact_from_url, with the named alternative being the Chrome extension. This is the strongest possible form of routing guidance.

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