Skip to main content
Glama

workdir_set

Sets the HPC working directory for the current session so SLURM job submission uses the intended absolute path. Provide an absolute HPC path to guard submissions against wrong locations.

Instructions

Set HPC working directory for this window (used by slurm_submit guard)

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": {
      "path": "<path>"
    },
    "name": "workdir_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path on HPC (e.g. /home/user/project)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses that the setting is window-scoped and that it feeds a slurm_submit guard, but says nothing about path validation, whether a nonexistent directory is rejected, error behavior, or whether other tools (ssh_exec, terminal_exec) are affected.

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?

One sentence with the verb and scope front-loaded; the parenthetical simultaneously conveys the consumer of the value. No filler, though it is terse enough that a few more words of constraint would have paid for themselves.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple single-parameter state mutation with no output schema, the definition covers what the tool sets and its scope. It omits validation semantics and the blast radius on other session tools, which an agent would want before repointing the working directory.

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 coverage is 100% with a single required 'path' parameter already documented as an absolute HPC path with an example. The description adds only the window-scoping semantics, not per-parameter meaning, so the schema does the heavy lifting.

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 ('Set HPC working directory') and adds scope ('for this window'), which distinguishes it from a global config change and implicitly from the sibling workdir_get. It does not explicitly name the getter counterpart, so a 4 rather than a 5.

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?

The parenthetical '(used by slurm_submit guard)' hints at the motivating use case, implying you set this before submitting jobs. However, there is no explicit when-to-use instruction, no precondition (e.g. must connect first), and no statement of what happens if the working directory is unset.

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