Skip to main content
Glama
playcanvas

PlayCanvas Editor MCP Server

Official
by playcanvas

modify_scene_settings

Adjust scene settings such as physics, lighting, and fog in PlayCanvas Editor. Customize gravity, fog type, lightmap resolution, and more to optimize 3D web application environments.

Instructions

Modify the scene settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
settingsYesScene settings.

Implementation Reference

  • Registration of the 'modify_scene_settings' MCP tool, including input schema reference and handler function that proxies to WSS.
    mcp.tool(
        'modify_scene_settings',
        'Modify the scene settings',
        {
            settings: SceneSettingsSchema
        },
        ({ settings }) => {
            return wss.call('scene:settings:modify', settings);
        }
    );
  • Handler function for the tool; receives settings and calls wss.call('scene:settings:modify', settings).
    ({ settings }) => {
        return wss.call('scene:settings:modify', settings);
    }
  • Zod schema definition for SceneSettingsSchema, used as input for the modify_scene_settings tool.
    import { z } from 'zod';
    
    import { AssetIdSchema, RgbSchema, Vec3Schema } from './common';
    
    const PhysicsSchema = z.object({
        gravity: Vec3Schema.optional().describe('An array of 3 numbers that represents the gravity force. Default: [0, -9.8, 0]')
    }).describe('Physics related settings for the scene.');
    
    const RenderSchema = z.object({
        fog: z.enum(['none', 'linear', 'exp', 'exp2']).optional().describe('The type of fog used in the scene. Can be one of `pc.FOG_NONE`, `pc.FOG_LINEAR`, `pc.FOG_EXP`, `pc.FOG_EXP2`. Default: `none`.'),
        fog_start: z.number().min(0).optional().describe('The distance from the viewpoint where linear fog begins. This property is only valid if the fog property is set to `pc.FOG_LINEAR`. Default: 1.0.'),
        fog_end: z.number().min(0).optional().describe('The distance from the viewpoint where linear fog reaches its maximum. This property is only valid if the fog property is set to `pc.FOG_LINEAR`. Default: 1000.0.'),
        fog_density: z.number().min(0).optional().describe('The density of the fog. This property is only valid if the fog property is set to `pc.FOG_EXP` or `pc.FOG_EXP2`. Default: 0.01.'),
        fog_color: RgbSchema.optional().describe('An array of 3 numbers representing the color of the fog. Default: [0.0, 0.0, 0.0].'),
        global_ambient: RgbSchema.optional().describe('An array of 3 numbers representing the color of the scene\'s ambient light. Default: [0.2, 0.2, 0.2].'),
        gamma_correction: z.union([
            z.literal(0).describe('GAMMA_NONE'),
            z.literal(1).describe('GAMMA_SRGB')
        ]).optional().describe('The gamma correction to apply when rendering the scene. Default: 1 (GAMMA_SRGB).'),
        lightmapSizeMultiplier: z.number().optional().describe('The lightmap resolution multiplier. Default: 16.'),
        lightmapMaxResolution: z.number().optional().describe('The maximum lightmap resolution. Default: 2048.'),
        lightmapMode: z.union([
            z.literal(0).describe('BAKE_COLOR'),
            z.literal(1).describe('BAKE_COLORDIR')
        ]).optional().describe('The lightmap baking mode. Default: 1 (BAKE_COLORDIR).'),
        tonemapping: z.number().optional().describe('The tonemapping transform to apply when writing fragments to the frame buffer. Default: 0.'),
        exposure: z.number().optional().describe('The exposure value tweaks the overall brightness of the scene. Default: 1.0.'),
        skybox: AssetIdSchema.optional().describe('The `id` of the cubemap texture to be used as the scene\'s skybox. Default: null.'),
        skyType: z.enum(['infinite', 'box', 'dome']).optional().describe('Type of skybox projection. Default: `infinite`.'),
        skyMeshPosition: Vec3Schema.optional().describe('An array of 3 numbers representing the position of the sky mesh. Default: [0.0, 0.0, 0.0].'),
        skyMeshRotation: Vec3Schema.optional().describe('An array of 3 numbers representing the rotation of the sky mesh. Default: [0.0, 0.0, 0.0].'),
        skyMeshScale: Vec3Schema.optional().describe('An array of 3 numbers representing the scale of the sky mesh. Default: [100.0, 100.0, 100.0].'),
        skyCenter: Vec3Schema.optional().describe('An array of 3 numbers representing the center of the sky mesh. Default: [0.0, 0.1, 0.0].'),
        skyboxIntensity: z.number().optional().describe('Multiplier for skybox intensity. Default: 1.'),
        skyboxMip: z.number().int().min(0).max(5).optional().describe('The mip level of the skybox to be displayed. Only valid for prefiltered cubemap skyboxes. Default: 0.'),
        skyboxRotation: Vec3Schema.optional().describe('An array of 3 numbers representing the rotation of the skybox. Default: [0, 0, 0].'),
        lightmapFilterEnabled: z.boolean().optional().describe('Enable filtering of lightmaps. Default: false.'),
        lightmapFilterRange: z.number().optional().describe('A range parameter of the bilateral filter. Default: 10.'),
        lightmapFilterSmoothness: z.number().optional().describe('A spatial parameter of the bilateral filter. Default: 0.2.'),
        ambientBake: z.boolean().optional().describe('Enable baking the ambient lighting into lightmaps. Default: false.'),
        ambientBakeNumSamples: z.number().optional().describe('Number of samples to use when baking ambient. Default: 1.'),
        ambientBakeSpherePart: z.number().optional().describe('How much of the sphere to include when baking ambient. Default: 0.4.'),
        ambientBakeOcclusionBrightness: z.number().optional().describe('Specifies the ambient occlusion brightness. Typical range is -1 to 1. Default: 0.'),
        ambientBakeOcclusionContrast: z.number().optional().describe('Specifies the ambient occlusion contrast. Typical range is -1 to 1. Default: 0.'),
        clusteredLightingEnabled: z.boolean().optional().describe('Enable the clustered lighting. Default: true.'),
        lightingCells: Vec3Schema.optional().describe('Number of cells along each world-space axis the space containing lights is subdivided into. Default: [10, 3, 10].'),
        lightingMaxLightsPerCell: z.number().optional().describe('Maximum number of lights a cell can store. Default: 255.'),
        lightingCookieAtlasResolution: z.number().optional().describe('Resolution of the atlas texture storing all non-directional cookie textures. Default: 2048.'),
        lightingShadowAtlasResolution: z.number().optional().describe('Resolution of the atlas texture storing all non-directional shadow textures. Default: 2048.'),
        lightingShadowType: z.union([
            z.literal(0).describe('SHADOW_PCF3_32F'),
            z.literal(4).describe('SHADOW_PCF5_32F'),
            z.literal(5).describe('SHADOW_PCF1_32F')
        ]).optional().describe('The type of shadow filtering used by all shadows. Default: 0 (SHADOW_PCF3_32F).'),
        lightingCookiesEnabled: z.boolean().optional().describe('Cluster lights support cookies. Default: false.'),
        lightingAreaLightsEnabled: z.boolean().optional().describe('Cluster lights support area lights. Default: false.'),
        lightingShadowsEnabled: z.boolean().optional().describe('Cluster lights support shadows. Default: true.')
    }).describe('Render related settings for the scene.');
    
    const SceneSettingsSchema = z.object({
        physics: PhysicsSchema.optional(),
        render: RenderSchema.optional()
    }).describe('Scene settings.');
    
    export { SceneSettingsSchema };
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Modify' implies a mutation operation, but the description fails to disclose critical behavioral traits: it does not state whether this requires specific permissions, whether changes are reversible, what happens to unspecified settings (partial updates vs. overwrites), or any side effects like performance impacts. For a mutation tool with zero annotation coverage, this is a severe gap.

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 extremely concise—a single three-word phrase—with zero wasted words. It is front-loaded and efficiently states the core action. While brevity can indicate under-specification, here it reflects structural efficiency without redundancy.

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?

Given the tool's complexity (mutating scene settings with many nested parameters) and the absence of annotations and output schema, the description is incomplete. It does not explain what 'scene settings' encompass, the scope of modification, or the return behavior. The rich input schema helps, but the description fails to provide necessary context for safe and effective use, especially for a mutation tool.

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?

The description adds no parameter information beyond what the input schema provides. However, schema description coverage is 100%, with detailed descriptions for all nested properties (e.g., gravity, ambientBake, fog). According to the rules, when schema coverage is high (>80%), the baseline score is 3 even with no param info in the description. The description does not compensate but doesn't need to, as the schema is comprehensive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Modify the scene settings' is a tautology that essentially restates the tool name. It provides a generic verb ('modify') and resource ('scene settings') but lacks specificity about what scene settings are or what modification entails. Compared to sibling tools like 'query_scene_settings' (which likely reads settings) and 'modify_entities' (which modifies entities rather than settings), it fails to clearly differentiate its purpose beyond the obvious.

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

Usage Guidelines1/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. It does not mention prerequisites (e.g., needing an existing scene), exclusions, or comparisons to siblings like 'query_scene_settings' (for reading) or 'modify_entities' (for entity-level changes). Without any usage context, an agent must infer when this tool is appropriate, which is insufficient.

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/playcanvas/editor-mcp-server'

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