Skip to main content
Glama

Create an image library

create_media_source

Create an empty media source — a library that images are uploaded into and that a catalogue attaches under a variable. Fill it with create_media_upload_link (files on disk, if you can run curl), by giving the user uploadInAppUrl (their own photos, when you cannot), or upload_media_file (a small image you generated). Then attach it with attach_media_source.

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>",
      "llm_model": "<llm_model>"
    },
    "name": "create_media_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesDisplay name, e.g. "Product photography".
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idNoPass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, non-destructive, closed-world write, and the description reinforces that by stressing the source is created empty and must be filled and attached separately. Beyond that it adds nothing about what state is created, whether names must be unique, or what identifiers come back to feed into attach_media_source. With annotations carrying the safety profile, this is adequate but not rich.

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

Conciseness5/5

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

Two sentences, front-loaded with the core action and definition, then the follow-up workflow compressed into parallel clauses. No padding, no restatement of the title, and the alternative paths are ordered by applicability.

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 three-parameter creation tool with full schema coverage and no output schema, the description covers the essential lifecycle: create empty, populate by one of three routes, attach. The only gap is that it does not say the response yields the identifier that attach_media_source needs, which an agent must otherwise infer.

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% and the schema's own parameter text is unusually prescriptive (exact llm_model, exact conversation_id, never guess, never invent), so the description correctly does not repeat it. It does add meaning by framing the object being named ("a library that images are uploaded into"), which helps the agent understand what the name field actually labels. Slight deduction only because it never references the conversation_id requirement the agent must satisfy.

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 ("Create an empty media source") and immediately defines it in domain terms: a library images are uploaded into, attached to a catalogue under a variable. The word "empty" and the explicit follow-up tools separate it cleanly from create_media_upload_link, upload_media_file, and attach_media_source.

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 an explicit three-way routing decision for the next step based on agent capability and file origin: create_media_upload_link for files on disk "if you can run curl", uploadInAppUrl for the user's own photos "when you cannot", upload_media_file for a small generated image. It then names attach_media_source as the required follow-up, so the whole sequence is inferable without opening another definition.

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