Skip to main content
Glama

Ctx Store Cmd

ctx_store_cmd

Executes a shell command in a resource-limited sandbox, captures its output, and saves it to a Loom drawer for context storage and later search.

Instructions

Run a shell command in a sandbox, capture its output, and store it in the Loom drawer.

Requires LOOM_STORE_CMD=1 to be set (opt-in). Sandbox enforces CPU, memory, and process limits (no network isolation on Windows). Fails closed if sandbox unavailable.

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": {
      "cmd": "<cmd>"
    },
    "name": "ctx_store_cmd"
  }
}

Input Schema

NameRequiredDescriptionDefault
cmdYesshell command to execute
labelNoshort human-readable name (defaults to cmd)
session_idNological session the output belongs todefault

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare non-readOnly, openWorld and non-idempotent, and the description adds genuinely new facts: sandbox CPU/memory/process limits, no network isolation on Windows, fail-closed behavior, and the opt-in env gate. It stops short of timeout behavior, output size/truncation limits, and what exactly gets persisted, which matters for arbitrary shell execution.

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?

Three short sentences, each carrying distinct information, with the action front-loaded and the operational constraints following. No filler or restatement of the tool name.

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?

An output schema exists, so return-format explanation is correctly omitted, and the description covers the two things that would otherwise surprise an agent: the opt-in gate and fail-closed sandbox. The remaining gap is runtime expectations (timeouts, output size limits) for a tool that executes arbitrary commands.

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 the schema already documents cmd, label, and session_id, and the description adds no parameter-level meaning beyond it. It does not explain how session_id affects retrieval or whether label collides/overwrites, so it earns only the baseline.

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 description names a specific verb chain and resource: run a shell command in a sandbox, capture output, store it in the Loom drawer. That distinguishes it from ctx_store (raw storage) and ctx_store_file (file ingestion) implicitly, but it never names those siblings explicitly, so the differentiation is inferential rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a real prerequisite (LOOM_STORE_CMD=1 opt-in) and an environmental condition (fails closed if sandbox unavailable), which tell an agent when the call will fail. However, it never says when to prefer this over ctx_store or ctx_store_file, or when capturing command output is the wrong choice, so alternative selection is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.