Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MOLI_BINNoEnables moli_fetch.
CODEMODE_ROOTNoBase dir for relative fs paths (default: home).
CODEMODE_DEBUGNoSet to 1 to forward pooled-server stderr.
CODEMODE_CONFIGNoPath to the MCP config file to use (equivalent to the --config <path> option).
CODEMODE_TIMEOUT_MSNoSandbox wall-clock limit (default 120000).120000
CLOUDFLARE_API_TOKENNoEnables the cf_* Cloudflare functions.
CLOUDFLARE_ACCOUNT_IDNoEnables the cf_* Cloudflare functions.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
codeA

Execute one JavaScript program that achieves the whole goal. This replaces chains of separate tool calls: one call here does the work of N, and intermediate data never enters your context.

Available: type ShellInput = { cmd: string; cwd?: string; timeout_ms?: number; } type ShellOutput = unknown type FsReadInput = { path: string; } type FsReadOutput = unknown type FsWriteInput = { path: string; content: string; } type FsWriteOutput = unknown type FsAppendInput = { path: string; content: string; } type FsAppendOutput = unknown type FsExistsInput = { path: string; } type FsExistsOutput = unknown type FsStatInput = { path: string; } type FsStatOutput = unknown type FsListInput = { dir?: string; } type FsListOutput = unknown type FsGlobInput = { pattern: string; cwd?: string; limit?: number; } type FsGlobOutput = unknown type FsGrepInput = { pattern: string; cwd?: string; include?: string; limit?: number; ignore_case?: boolean; } type FsGrepOutput = unknown type FsRemoveInput = { path: string; } type FsRemoveOutput = unknown type FsMkdirInput = { path: string; } type FsMkdirOutput = unknown type HttpInput = { url: string; method?: string; headers?: { [key: string]: string; }; body?: string; timeout_ms?: number; } type HttpOutput = unknown type HttpJsonInput = { url: string; method?: string; headers?: { [key: string]: string; }; body?: string; timeout_ms?: number; } type HttpJsonOutput = unknown

declare const codemode: { /** * Run a PowerShell (Windows) or POSIX shell command. Returns {code,stdout,stderr,ms}. */ shell: (input: ShellInput) => Promise;

/**
 * Read a UTF-8 text file. Relative paths resolve under the sandbox ROOT.
 */
fs_read: (input: FsReadInput) => Promise<FsReadOutput>;

/**
 * Write a file (creates parent dirs).
 */
fs_write: (input: FsWriteInput) => Promise<FsWriteOutput>;

/**
 * Append to a file.
 */
fs_append: (input: FsAppendInput) => Promise<FsAppendOutput>;

/**
 * True if the path exists.
 */
fs_exists: (input: FsExistsInput) => Promise<FsExistsOutput>;

/**
 * Size / dir / mtime.
 */
fs_stat: (input: FsStatInput) => Promise<FsStatOutput>;

/**
 * List a directory.
 */
fs_list: (input: FsListInput) => Promise<FsListOutput>;

/**
 * Glob files under cwd (forward slashes, *, ?). Skips node_modules/.git/dist.
 */
fs_glob: (input: FsGlobInput) => Promise<FsGlobOutput>;

/**
 * Regex search under cwd. Returns ["file:line: text"].
 */
fs_grep: (input: FsGrepInput) => Promise<FsGrepOutput>;

/**
 * Delete a file or directory tree.
 */
fs_remove: (input: FsRemoveInput) => Promise<FsRemoveOutput>;

/**
 * Create a directory tree.
 */
fs_mkdir: (input: FsMkdirInput) => Promise<FsMkdirOutput>;

/**
 * HTTP request. Returns {status, ok, headers, text, ms}.
 */
http: (input: HttpInput) => Promise<HttpOutput>;

/**
 * HTTP request parsed as JSON. Returns {status, ok, json}.
 */
http_json: (input: HttpJsonInput) => Promise<HttpJsonOutput>;

}

Rules:

  • Write an async arrow function that returns the final value. Do NOT use TypeScript syntax.

  • Use forward slashes in paths. A backslash inside a JS string is an escape ("\p" becomes "p") and silently corrupts the path.

  • Return a small JSON-able summary. Anything you do not return is discarded, which is the point: filter and aggregate inside the code, not in the conversation.

  • console.log output is captured host-side but is NOT returned — collect progress in an array and return it.

  • Loop freely: many files, many URLs, many tool calls per execution.

  • Default timeout 120s (CODEMODE_TIMEOUT_MS). Errors throw; catch them inside the code if you want to continue.

Example: async () => { const r = await codemode.shell({ cmd: "...", cwd: "...", timeout_ms: 0 }); return r; }

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.4/5.0

Scored across 1 tool

Disambiguation4/5

There is only one MCP tool, so an agent cannot misselect between tools. The only ambiguity is inside the exposed runtime API, where `shell` can do everything the `fs_*` methods and even `http` (via curl) can do, so multiple paths exist for the same task.

Naming Consistency4/5

With a single tool there is no cross-tool pattern to violate, and the embedded API uses predictable snake_case with `fs_`/`http` prefixes for most methods. The outliers are bare names like `shell` and `http`/`http_json`, which break the prefix convention slightly but remain obvious.

Tool Count4/5

A single entry point is the deliberate design of a code-mode server, and it is far from trivial—it encapsulates shell, filesystem, and HTTP capability. The tradeoff is that all functionality is compressed behind one untyped-looking call, so per-capability discovery relies entirely on reading the description.

Completeness4/5

The surface covers the full file lifecycle (write/read/append/exists/stat/list/glob/grep/mkdir/remove) plus shell and HTTP, with `shell` acting as a universal escape hatch for anything missing. Minor gaps exist for rename/copy, binary file handling, and line-level edits, all of which must be hand-rolled via read+write or shell.

Maintenance

ActivityMaintained
ResponsivenessNo issues