Skip to main content
Glama

Create folder

fs_mkdir
Idempotent

Use this when the user asks to create a folder in an approved project, including any missing folders above it. Succeeds without change when the folder already exists. Changes files on the computer. Needs the sessionId from execution_session_open and a new operationId; each call is metered as one execution. A short result is returned inline within about two seconds; otherwise keep the returned IDs for operation_status and operation_output and do not resend the call.

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": {
      "sessionId": "<sessionId>",
      "operationId": "<operationId>",
      "path": "<path>"
    },
    "name": "fs_mkdir"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFolder path relative to the selected project root (or the workspace root without a project target)
sessionIdYesexecutionSessionId returned by execution_session_open
deadlineAtNoOptional UTC admission deadline at most 60 seconds ahead (queue start timeout, NOT process execution lifetime)
operationIdYesA new random UUID v4 for this call; reuse it only to retry this same call
idempotencyKeyNoOptional retry key, 8-128 chars of [A-Za-z0-9._:-]; defaults to operationId
efficiencyProfileNoOptional, unverified label of the client's model, recorded as display metadata in the device owner's local activity statistics. Omit when unknown. Never send credentials or conversation content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, and the description corroborates this ("Succeeds without change when the folder already exists"). It then adds behavior the annotations cannot convey: it mutates the filesystem, each call is metered as one execution, results usually return inline within about two seconds, and on a deferred result the caller must reuse the returned IDs via operation_status/operation_output rather than re-invoking.

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?

Five short sentences ordered from trigger to side effect to prerequisites to result handling, with no filler. The latency/fallback sentence is dense but each clause carries operational consequence, so nothing is wasted.

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 mutating filesystem tool with no output schema and six parameters, the description covers the important unknowns: recursion, idempotence, session/operation prerequisites, metering, and the async escape hatch. The only gap is that "a short result" is not described in substance, though the schema and the referenced operation_output tool cover that.

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?

Schema description coverage is 100%, so every parameter including deadlineAt, idempotencyKey, and efficiencyProfile is already documented at the field level. The description restates the sessionId provenance and the need for a new operationId, which maps to what the schema already says, and adds no new meaning for path resolution or the retry key. This is the expected baseline when the schema carries the load.

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?

States a specific verb and resource ("create a folder in an approved project") and adds the recursive behavior ("including any missing folders above it"), which is the key semantic difference from a plain single-level mkdir. It never names a sibling alternative, but the purpose is unambiguous enough that an agent would not confuse it with fs_write or fs_delete.

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?

The first sentence gives an explicit trigger ("Use this when the user asks to create a folder in an approved project") and the second covers the already-exists case, so the agent knows the call is safe to repeat. It does not state exclusion conditions, such as what to do when the path already names a file, but the positive context is clear.

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.