Skip to main content
Glama

list_files_in_media_source

Read-only

List files and folders at a specific path within a media source, one page at a time. Returns names, urls, mimeTypes, and whether each entry is a folder. Use path "/" for root level. Entries are paged folders-first under a single cursor: at most 100 per call by default (500 max), and when "hasMore" is true you call again with the returned "nextOffset". "totalFolders"/"totalFiles" always report the full counts at the path. Use this to browse the folder structure of a 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": {
      "documentId": "<documentId>",
      "variable": "<variable>",
      "path": "<path>",
      "llm_model": "<llm_model>"
    },
    "name": "list_files_in_media_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesThe folder path to list (e.g. "/" for root, "/products/" for a subfolder). Must start and end with "/".
limitNoMaximum entrys to return (default 100, hard max 500)
offsetNo0-based index of the first entry to return (default 0)
variableYesThe variable name of the media source (e.g. "cupboards")
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.
documentIdYesThe catalogue's id. Call list_documents first if you do not have one.
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
Behavior4/5

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

Annotations already declare readOnly, non-destructive, closed-world, so the safety profile is covered; the description adds genuinely useful behavior: folders-first ordering under a single cursor, 100 default / 500 hard max, and that 'totalFolders'/'totalFiles' always report full counts rather than page counts. That last detail is the kind of non-obvious trait that prevents misreading the response, though nothing covers error cases for a bad path.

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 purpose, then paging mechanics, then the browsing tie-in, with no filler sentences. It is dense with quoted field names, which is efficient but borders on cramped for the amount of contract detail packed into five sentences.

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?

With no output schema, the description carries the return contract itself and does so: names, urls, mimeTypes, folder flag, hasMore, nextOffset, and both totals. For a paged browse tool that is everything an agent needs to call it repeatedly and interpret results correctly.

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%, so the baseline is 3; the description earns above that by linking limit/offset to the response-side contract (hasMore true means call again with the returned nextOffset), which is meaning the schema's 'offset' field alone does not convey. It does not expand on documentId, variable, or the analytics-only llm_model, but those are already self-documenting in the schema.

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?

The description opens with a specific verb+resource+scope: 'List files and folders at a specific path within a media source.' It closes with a differentiation cue ('Use this to browse the folder structure'), which separates browsing from the sibling find_file/find_folder lookups without needing their schemas.

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 says explicitly when to use it ('browse the folder structure of a media source') and how to start ('Use path "/" for root level'), plus the pagination loop condition. It stops short of naming when NOT to use it, e.g. that find_file_in_media_source is the right call when you already know a filename.

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