Skip to main content
Glama

sb_media_upload

Upload an image from a local path, URL, or photo search to the site media library and return its URL for use in sb_set. Use query and pick to add one or several real photographs.

Instructions

Put an image into the media library and get its URL back, ready for sb_set. Takes a local path, a URL, or a SEARCH — query returns real photographs with their own descriptions, and pick uploads the one you chose, or several at once to stock a site you just built. The only way to add an image.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sb_media_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoFetched, then uploaded
nameNo
pathNoA file on this machine
pickNoThe id of the search result to upload — or several ids, which stocks a site in one call
pathsNoSeveral files; one failing does not stop the rest
queryNoSearch real photographs; read the descriptions, then pick
dry_runNo
site_idNo
folder_idNo
orientationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.98.3
    • addedInput schema / properties / paths
      Added value: +{
      +  "description": "Several files; one failing does not stop the rest",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed3 schema fields changedv0.32.0
    • addedInput schema / properties / pick / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "items": {
      +      "type": "integer"
      +    },
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / pick / description
      Previous value: -"The id of the search result to upload"New value: +"The id of the search result to upload — or several ids, which stocks a site in one call"
    • removedInput schema / properties / pick / type
      Removed value: -"integer"
  3. Changed3 schema fields changedv0.28.0
    • addedInput schema / properties / orientation
      Added value: +{
      +  "enum": [
      +    "landscape",
      +    "portrait",
      +    "square"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / pick
      Added value: +{
      +  "description": "The id of the search result to upload",
      +  "type": "integer"
      +}
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "Search real photographs; read the descriptions, then pick",
      +  "type": "string"
      +}
  4. Changed1 schema field changedv0.12.0
    • removedInput schema / required
      Removed value: -[
      -  "site_id"
      -]
  5. First observedv0.1.4

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare this a non-read-only, non-destructive write; the description adds genuinely useful behavior — that a URL is returned and is directly usable by sb_set, and that bulk picks stock a site in one call. It says nothing about permissions/auth, duplicate handling on re-upload, or what the response looks like when several files are uploaded (single URL vs list).

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 value, then the search workflow, then a differentiation tagline; four short sentences with little waste. The search/pick mechanics are dense but each sentence carries information.

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

Completeness3/5

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

With 10 parameters, no output schema, and 50% coverage, the description should close more gaps than it does — notably what `dry_run`, `site_id`, and `folder_id` do, and whether calling with no arguments is an error. The return-value hint partially compensates for the missing output schema, but key behavioral surface remains undocumented.

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?

At 50% schema coverage, the description usefully explains the non-obvious `query`/`pick` pairing and the path-vs-URL input modes that the schema only gestures at. However, four parameters — `dry_run`, `site_id`, `folder_id`, and `orientation` — get no explanation in either the description or the schema, and the description never states that some combination of inputs is required despite zero required params.

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?

"Put an image into the media library and get its URL back" gives a concrete verb, resource, and outcome, and "the only way to add an image" separates it from the listing sibling sb_media_list. The search-then-pick mode is also named up front, so the agent knows this tool both searches and writes.

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?

It spells out the intended workflow: use `query` to search real photographs, then `pick` the id(s), or pass a local path/URL directly, plus the bulk-stocking scenario. It does not explicitly say when not to use it (e.g. use sb_media_list to view existing assets), so it falls short of full routing guidance.

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