Skip to main content
Glama
bbernstein

LacyLights MCP Server

by bbernstein

update_scene

Modify an existing lighting scene by updating its name, description, or fixture values, ensuring accurate adjustments for theatrical lighting design on the LacyLights system.

Instructions

Update an existing scene with new values

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoOptional new description for the scene
fixtureValuesNoOptional fixture values to update
nameNoOptional new name for the scene
sceneIdYesScene ID to update

Implementation Reference

  • Main handler function that parses input using Zod schema, builds update input, calls GraphQL client to update scene, and returns formatted response with fixture details.
    async updateScene(args: z.infer<typeof UpdateSceneSchema>) {
      const { sceneId, name, description, fixtureValues } = UpdateSceneSchema.parse(args);
    
      try {
        // Build the update input object with only provided fields
        const updateInput: any = {};
        if (name !== undefined) updateInput.name = name;
        if (description !== undefined) updateInput.description = description;
        if (fixtureValues !== undefined) updateInput.fixtureValues = fixtureValues;
    
        // Update the scene
        const updatedScene = await this.graphqlClient.updateScene(sceneId, updateInput);
    
        return {
          sceneId: updatedScene.id,
          scene: {
            name: updatedScene.name,
            description: updatedScene.description,
            updatedAt: updatedScene.updatedAt,
            fixtureValues: updatedScene.fixtureValues.map(fv => ({
              fixture: {
                id: fv.fixture.id,
                name: fv.fixture.name
              },
              channelValues: fv.channelValues,
              sceneOrder: fv.sceneOrder
            }))
          },
          fixturesUpdated: fixtureValues ? fixtureValues.length : 0,
          channelsUpdated: fixtureValues ? fixtureValues.reduce((total, fv) => total + (fv.channelValues?.length || 0), 0) : 0
        };
      } catch (error) {
        throw new Error(`Failed to update scene: ${error}`);
      }
    }
  • Zod schema for validating update_scene tool inputs: sceneId (required), optional name, description, and fixtureValues array with fixtureId and channelValues (0-255).
    const UpdateSceneSchema = z.object({
      sceneId: z.string(),
      name: z.string().optional(),
      description: z.string().optional(),
      fixtureValues: z.array(z.object({
        fixtureId: z.string(),
        channelValues: z.array(z.number().min(0).max(255))
      })).optional()
    });
  • src/index.ts:918-960 (registration)
    MCP tool registration in listTools response: defines name 'update_scene', description, and inputSchema matching the Zod schema.
    name: "update_scene",
    description: "Update an existing scene with new values",
    inputSchema: {
      type: "object",
      properties: {
        sceneId: {
          type: "string",
          description: "Scene ID to update",
        },
        name: {
          type: "string",
          description: "Optional new name for the scene",
        },
        description: {
          type: "string",
          description: "Optional new description for the scene",
        },
        fixtureValues: {
          type: "array",
          items: {
            type: "object",
            properties: {
              fixtureId: {
                type: "string",
                description: "Fixture ID to update",
              },
              channelValues: {
                type: "array",
                items: {
                  type: "number",
                  minimum: 0,
                  maximum: 255,
                },
                description: "Array of channel values (0-255)",
              },
            },
            required: ["fixtureId", "channelValues"],
          },
          description: "Optional fixture values to update",
        },
      },
      required: ["sceneId"],
    },
  • src/index.ts:2126-2138 (registration)
    Dispatch handler in callToolRequest that routes 'update_scene' calls to sceneTools.updateScene method.
    case "update_scene":
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              await this.sceneTools.updateScene(args as any),
              null,
              2,
            ),
          },
        ],
      };
  • GraphQL mutation executed by the handler to perform the actual scene update in the backend.
    async updateScene(id: string, input: {
      name?: string;
      description?: string;
      fixtureValues?: Array<{
        fixtureId: string;
        channelValues: number[];
      }>;
    }): Promise<Scene> {
      const mutation = `
        mutation UpdateScene($id: ID!, $input: UpdateSceneInput!) {
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is an update operation (implying mutation) but doesn't describe what happens: whether updates are partial or complete, if they're reversible, what permissions are required, or what the response looks like. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps unaddressed.

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?

The description is a single, efficient sentence that states the core purpose without any wasted words. It's front-loaded with the essential information ('Update an existing scene') and adds just enough specificity ('with new values'). Every word earns its place in this minimal but complete statement of function.

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

Completeness2/5

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

For a mutation tool with 4 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what 'updating' entails operationally, what happens to unspecified fields, whether there are side effects, or what format the response takes. The agent must rely entirely on the input schema and guess about behavior and outputs.

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 all 4 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain relationships between parameters, provide examples, or clarify edge cases. The baseline of 3 is appropriate when the schema does all the parameter documentation work.

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 clearly states the verb ('Update') and resource ('an existing scene'), making the purpose immediately understandable. It distinguishes from sibling tools like 'generate_scene' (create) and 'optimize_scene' (modify algorithmically), though it doesn't explicitly contrast with them. The description is specific about updating with 'new values' rather than just saying 'modify scene'.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'update_cue' or 'update_cue_list'. It doesn't mention prerequisites (e.g., needing an existing scene ID) or exclusions (e.g., what can't be updated). The agent must infer usage from the tool name and schema alone, with no explicit context about appropriate scenarios.

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

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bbernstein/lacylights-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server