Skip to main content
Glama

setup_environment

Idempotent

Create an isolated Python environment for a repo and install its test dependencies, enabling subsequent test runs, static analysis, and flaky test detection.

Instructions

Create the repo's isolated Python environment and install the repo plus its test deps.

Call this once per repo before run_tests, run_static_analysis or detect_flaky_tests. extras is a comma-separated list of pip extras (e.g. "test" or "test,dev"); "" installs none. Returns {ok, output (trimmed), next_steps}.

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": {
      "repo": "<repo>"
    },
    "name": "setup_environment"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYes
extrasNotest

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare idempotent, non-destructive, open-world; the description adds what the annotations cannot: it installs from the network, the call frequency contract, and the return shape {ok, output (trimmed), next_steps}. It stops short of describing failure modes, timeouts, or whether a partial install is left behind, which matters for a network-dependent setup step.

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, front-loaded with the action, then the ordering contract, then the parameter and return details. No filler or restated title.

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?

Covers purpose, prerequisite ordering, parameter format, and return keys, which is close to everything an agent needs for a two-parameter setup tool with no output schema. The one real hole is the undocumented format and expectations for the required `repo` argument.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage the description must carry parameter meaning, and it does for `extras`: comma-separated pip extras, concrete examples ("test", "test,dev"), and "" meaning none. `repo` is left entirely unexplained, so the agent gets no hint whether it is a path, a name, or an owner/repo slug.

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: "Create the repo's isolated Python environment and install the repo plus its test deps." It is immediately distinguishable from the analysis/test-running siblings, which presuppose an environment rather than build one.

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

Usage Guidelines5/5

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

Explicitly says when to call it ("once per repo") and names the three dependent tools that require it first: run_tests, run_static_analysis, detect_flaky_tests. That is a direct ordering contract, not implied usage.

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