Skip to main content
Glama

stata_set_workdir

Sets the Stata working directory for a project, routing outputs to /stata_output and running Stata commands from that folder. Use it when specifying or correcting the project folder.

Instructions

Set the project folder. Outputs then go to /stata_output and Stata cds there.

Use when the user names a project folder, or if the detected folder is wrong.

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": "stata_set_workdir"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/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, but it does disclose real behavioral consequences: output location becomes <path>/stata_output and the Stata session's working directory changes. It omits what happens with a nonexistent or relative path, whether the output directory is created, and whether previously set paths are replaced—meaningful gaps for a stateful session mutation.

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?

Two short sentences with zero padding; the effect is front-loaded before the usage guidance. Every clause carries information.

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 values need not be described, and the core side effects are covered. Completeness would be higher if it addressed path validity and whether the output folder is auto-created.

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 0% and the single 'path' parameter is undocumented in the schema. The description partially compensates by showing path is a folder whose subfolder receives output, but it does not say whether absolute or relative paths are acceptable or how they are resolved.

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?

States a specific verb and resource ('Set the project folder') and immediately specifies the concrete effects: outputs are directed to <path>/stata_output and Stata changes its working directory. This is distinguishable from every sibling (run, do, data, results) without opening any schema.

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?

Gives explicit trigger conditions: 'Use when the user names a project folder, or if the detected folder is wrong.' That covers both the positive case and a correction case, though it names no alternative tool or when-not condition.

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