Skip to main content
Glama

swebsy_upload_asset

Upload a local image, font, video, audio, or PDF to a Swebsy site, returning an assetId, src, and usage snippet. The only way to add your own imagery to image, video, or audio components.

Instructions

Upload a local image, font, video, audio or PDF file into the open site and return its assetId, src and a usage snippet. Images go in the asset library for image components, video for video components (attributes.src), audio for audio, PDFs as a link href; fonts are stored for update_settings fonts.custom. This is the ONLY way to get your own imagery (screenshots, logos, textures, mockups) into a site — an image with an empty src gets a random stock photo instead. Reads the file from the agent's own filesystem, so pass a path you can see (for example a screenshot you just captured). The asset is stored in the project and travels with static export and project JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the file on the agent's machine. Images: .png, .jpg, .jpeg, .webp, .gif, .avif, .svg. Fonts (for `update_settings` fonts.custom, pass the returned assetId): .woff2, .woff, .ttf, .otf. Video: .mp4, .m4v, .webm, .mov, .ogv. Audio: .mp3, .m4a, .wav, .ogg. Documents: .pdf. Max 10 MB (the hosting per-file cap) — re-encode larger files first (for video: H.264 .mp4, 1080p or less, `-movflags +faststart`). Prefer .svg for logos and other flat vector art so it stays crisp at any size; uploaded SVG is sanitized (scripts and external references are stripped).
filenameNoOptional display name in the asset library. Defaults to the file's own basename.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.10.0
    • changedInput schema / properties / path / description
      Previous value: -"Absolute path to the file on the agent's machine. Images: .png, .jpg, .jpeg, .webp, .gif, .avif, .svg. Fonts (for `update_settings` fonts.custom, pass the returned assetId): .woff2, .woff, .ttf, .otf. Max 10 MB — re-encode larger files first. Prefer .svg for logos and other flat vector art so it stays crisp at any size; uploaded SVG is sanitized (scripts and external references are stripped)."New value: +"Absolute path to the file on the agent's machine. Images: .png, .jpg, .jpeg, .webp, .gif, .avif, .svg. Fonts (for `update_settings` fonts.custom, pass the returned assetId): .woff2, .woff, .ttf, .otf. Video: .mp4, .m4v, .webm, .mov, .ogv. Audio: .mp3, .m4a, .wav, .ogg. Documents: .pdf. Max 10 MB (the hosting per-file cap) — re-encode larger files first (for video: H.264 .mp4, 1080p or less, `-movflags +faststart`). Prefer .svg for logos and other flat vector art so it stays crisp at any size; uploaded SVG is sanitized (scripts and external references are stripped)."
  2. Changed1 schema field changedv0.9.0
    • changedInput schema / properties / path / description
      Previous value: -"Absolute path to the image on the agent's machine. Allowed types: .png, .jpg, .jpeg, .webp, .gif, .avif, .svg. Max 10 MB — re-encode larger files first. Prefer .svg for logos and other flat vector art so it stays crisp at any size; uploaded SVG is sanitized (scripts and external references are stripped)."New value: +"Absolute path to the file on the agent's machine. Images: .png, .jpg, .jpeg, .webp, .gif, .avif, .svg. Fonts (for `update_settings` fonts.custom, pass the returned assetId): .woff2, .woff, .ttf, .otf. Max 10 MB — re-encode larger files first. Prefer .svg for logos and other flat vector art so it stays crisp at any size; uploaded SVG is sanitized (scripts and external references are stripped)."
  3. First observedv0.8.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the return values (assetId, src, usage snippet), that SVG is sanitized (scripts and external refs stripped), and that assets persist with static export and project JSON. It omits permission/auth requirements, but the mutation and return surface are well covered.

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 action and return values, then the component-mapping and fallback rationale. Dense but each sentence earns its place; the multi-clause type mapping is the only mild sprawl.

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?

With no output schema, the description correctly explains what comes back (assetId, src, usage). Combined with 100% schema coverage it is nearly complete; only permission/host constraints remain unstated.

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 description coverage is 100%, so the format lists, size cap, and filename default are already documented in the schema. The description adds only the 'path on the agent's own filesystem, pass a path you can see' framing, which is useful but marginal — baseline 3 applies.

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 (upload) and resource (local file into the open site) and immediately enumerates the supported media types. It clearly distinguishes itself from siblings like swebsy_list_assets and swebsy_delete_asset by describing the ingest-and-return-assetId workflow.

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?

Gives concrete routing: images for `image` components, video for `video` (`attributes.src`), audio, PDFs as link href, fonts for `update_settings` fonts.custom. It also states this is the ONLY way to get custom imagery and that empty src falls back to stock. It stops short of explicitly contrasting with sibling asset tools, but the when-to-use context is strong.

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