Skip to main content
Glama

List the media library

list_media
Read-onlyIdempotent

The images and videos already in this workspace’s library. An id from here is what a block’s mediaIds references.

If nothing here fits and the file is somewhere on the web, upload_media_from_url adds it and answers with an id you can use immediately. What you cannot do is send the bytes themselves — tool arguments are JSON — so a file that exists only on the user’s own machine is theirs to upload in the app.

Every url is short-lived and minted fresh per call. Key anything durable off id.

Newest first, a page at a time. Pass the nextCursor you got back as cursor to continue; hasMore: false is how you know to stop. Never guess a cursor.

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": "list_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoPage size. Clamped to 100; asking for more is not an error.
cursorNoThe `nextCursor` from the previous page. Opaque: a value we did not issue is rejected rather than silently restarting at page one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "The `nextCursor` from the previous page. Opaque: a value we did not issue is rejected rather than silently restarting at page one.",
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Page size. Clamped to 100; asking for more is not an error.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only cover read-only/idempotent; the description adds genuinely necessary behavior: URLs are short-lived and minted per call, so durable keys must use `id`; results are newest-first and paged; a bad cursor is rejected rather than restarting. That is exactly the context annotations cannot carry.

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?

Four short paragraphs, each doing distinct work: identity/relational meaning, alternative path, URL lifetime warning, pagination protocol. No sentence is redundant and the most consequential warning is unambiguous.

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?

There is no output schema, so the description must describe returns — and it does: `id`, short-lived `url`, `nextCursor`, `hasMore`. For a two-parameter read-only list tool, nothing an agent needs to call it correctly is missing.

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 the baseline is 3, but the description adds operational meaning: pass the returned `nextCursor` as `cursor`, and `hasMore: false` is the stop signal. That links the two parameters into a protocol, not just types.

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?

The opening sentence names the resource precisely — images and videos already in this workspace's library — and adds the key relational fact that its `id` is what a block's `mediaIds` references, which distinguishes it from upload_media_from_url. It stops short of a verb-first phrasing, leaving the 'list' action to the title.

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 names upload_media_from_url as the route for web-hosted files and clearly excludes local-machine bytes ('tool arguments are JSON'), so the agent knows two boundary cases. It does not spell out the positive trigger (fetch ids before composing a block), only implies it.

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