Skip to main content
Glama

Sort a folder's files

workspace_files_sort

Sorts the files sitting directly in a folder into its subfolders, making a subfolder when two or more belong together; with folderId: null, files loose at the top go into the best folder anywhere. The same reading that files uploads on arrival: it runs in the background, and Home shows what moved, why, and an undo for each. Reads up to 60 files a call. Use it when someone asks to tidy or organize a folder; to put specific things somewhere, use workspace_folders_file. May return needs_confirmation.

Input Schema

NameRequiredDescriptionDefault
folderIdYesThe folder to sort; null sorts what's loose at the top.
workspaceNoWorkspace slug, for tokens without a default.
approvalIdNoApproval id from a prior needs_confirmation envelope.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false) it discloses that the operation is asynchronous/background, that Home shows what moved and why, that every move has an undo, that it reads up to 60 files per call, and that it may return needs_confirmation. The undo guarantee is exactly the context needed to reconcile a file-moving mutation with destructiveHint=false.

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 behavior, then scope, then operational notes, then routing — good ordering with no filler sentences. The clause 'The same reading that files uploads on arrival' is slightly cryptic and costs a small deduction.

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 3-parameter mutation tool with no output schema, the description covers async execution, undo, batch limits, and the confirmation flow, which is close to complete. It does not say what happens when no file qualifies for grouping (no-op vs. partial sort), a minor remaining gap.

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 a real nuance the schema lacks: with folderId null the loose top-level files go to the best folder 'anywhere', not just within a subtree. approvalId is left to the schema, so it is not a full 5.

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 names a specific verb and resource (sorts files directly inside a folder into subfolders) and describes the mechanism — creating a subfolder when two or more files belong together. It also distinguishes the null-folderId variant, so an agent can tell exactly what the tool does without opening the schema.

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?

It gives an explicit trigger ('when someone asks to tidy or organize a folder') and an explicit alternative with its selection condition ('to put specific things somewhere, use workspace_folders_file'). This is the when-to-use / when-not-to-use / alternative pattern done fully.

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