Skip to main content
Glama

Set the KeyShot environment

keyshot_set_environment
Destructive

Select an environment by library name or local file, optionally change brightness and rotation, and save the edited scene.

Instructions

Select an environment by library name or local file, optionally change brightness and rotation, and save the edited scene.

Input Schema

NameRequiredDescriptionDefault
rotationNoEnvironment rotation in degrees, from 0 inclusive to 360 exclusive.
overwriteNoAllow replacing an existing output file. Defaults to false. Input files can never be replaced, even when true.
scenePathYesAbsolute path to an existing KeyShot scene file to open. Input files may be outside the configured output directory.
brightnessNoPositive brightness multiplier for the active environment.
environmentNameNoEnvironment name from the KeyShot library. Cannot be combined with environmentPath.
environmentPathNoAbsolute path to a local KeyShot environment file. Cannot be combined with environmentName.
outputScenePathYesDestination path for a saved scene copy, never an input file. Existing files are rejected unless overwrite=true. Must stay inside KEYSHOT_OUTPUT_DIR unless external outputs are explicitly enabled.

Output Schema

NameRequiredDescriptionDefault
okYesTrue when the requested operation completed successfully.
dataYesOperation-specific structured result data, or null when unavailable.
errorYesHuman-readable failure reason, or null after success.
warningsYesNon-fatal conditions the user or agent should review.
errorCodeNoStable error category for common failures.
outputFilesYesAbsolute paths of images or scene files created by the operation.
suggestionsNoActionable recovery steps for the user or agent.
keyshotStdoutTailYesTruncated tail of KeyShot headless output for diagnostics.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.13.5
    • changedInput schema / properties / outputScenePath / description
      Previous value: -"Destination path for the saved KeyShot scene. The path must stay inside KEYSHOT_OUTPUT_DIR unless external outputs are explicitly enabled."New value: +"Destination path for a saved scene copy, never an input file. Existing files are rejected unless overwrite=true. Must stay inside KEYSHOT_OUTPUT_DIR unless external outputs are explicitly enabled."
    • addedInput schema / properties / overwrite
      Added value: +{
      +  "description": "Allow replacing an existing output file. Defaults to false. Input files can never be replaced, even when true.",
      +  "type": "boolean"
      +}
  2. Changed4 schema fields changedv0.13.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / required
      Previous value: -[
      -  "ok",
      -  "outputFiles",
      -  "warnings",
      -  "keyshotStdoutTail",
      -  "error"
      -]New value: +[
      +  "ok",
      +  "data",
      +  "outputFiles",
      +  "warnings",
      +  "keyshotStdoutTail",
      +  "error"
      +]
  3. Changed7 schema fields changedv0.10.0
    • addedInput schema / properties / brightness / description
      Added value: +"Positive brightness multiplier for the active environment."
    • addedInput schema / properties / environmentName / description
      Added value: +"Environment name from the KeyShot library. Cannot be combined with environmentPath."
    • addedInput schema / properties / environmentPath / description
      Added value: +"Absolute path to a local KeyShot environment file. Cannot be combined with environmentName."
    • addedInput schema / properties / outputScenePath / description
      Added value: +"Destination path for the saved KeyShot scene. The path must stay inside KEYSHOT_OUTPUT_DIR unless external outputs are explicitly enabled."
    • addedInput schema / properties / rotation
      Added value: +{
      +  "description": "Environment rotation in degrees, from 0 inclusive to 360 exclusive.",
      +  "exclusiveMaximum": 360,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / scenePath / description
      Added value: +"Absolute path to an existing KeyShot scene file to open. Input files may be outside the configured output directory."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "anyOf": [
      +        {},
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Operation-specific structured result data, or null when unavailable."
      +    },
      +    "error": {
      +      "description": "Human-readable failure reason, or null after success.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "errorCode": {
      +      "description": "Stable error category for common failures.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "keyshotStdoutTail": {
      +      "description": "Truncated tail of KeyShot headless output for diagnostics.",
      +      "type": "string"
      +    },
      +    "ok": {
      +      "description": "True when the requested operation completed successfully.",
      +      "type": "boolean"
      +    },
      +    "outputFiles": {
      +      "description": "Absolute paths of images or scene files created by the operation.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "suggestions": {
      +      "description": "Actionable recovery steps for the user or agent.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "warnings": {
      +      "description": "Non-fatal conditions the user or agent should review.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "outputFiles",
      +    "warnings",
      +    "keyshotStdoutTail",
      +    "error"
      +  ],
      +  "type": "object"
      +}
  4. First observedv0.2.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and idempotentHint=false, so the agent knows this is a non-idempotent write. The description adds only that brightness and rotation are optional. It omits important behavioral context: that the input scene is never modified and that output goes to a separate destination copy — a key reassurance given destructiveHint=true — and says nothing about overwrite behavior beyond what the schema states.

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 front-loaded sentence with three clauses and no filler. It is efficient, though packing environment selection, brightness, rotation, and saving into a single clause makes the save behavior easy to skim past.

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?

An output schema exists, so return values need not be explained. However, for a 7-parameter destructive write tool, the description omits that the source scene stays untouched, that outputScenePath must live inside the output directory, and the overwrite interaction. Adequate but not complete for the risk profile.

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 parameter meaning is already fully carried by structured data. The description reinforces only the name-or-path choice and the optional brightness/rotation, adding no format, range, or constraint detail beyond the schema. Baseline 3 applies.

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 (select an environment, by library name or local file) plus the follow-on mutations of brightness/rotation and saving. It is distinguishable from siblings like keyshot_apply_material or keyshot_set_camera. The trailing 'save the edited scene' overlaps with keyshot_save_scene without clarifying the difference, which keeps it from 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?

'By library name or local file' implies the two selection modes, but the description never states they are mutually exclusive (the schema does) nor when to prefer this tool over keyshot_save_scene despite both saving a scene. No explicit when-not guidance or prerequisites are given. Usage is inferable from the sentence but not spelled out.

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