Skip to main content
Glama
playcanvas

PlayCanvas Editor MCP Server

Official
by playcanvas

focus_viewport

Idempotent

Frame the editor camera on specified entities, using a preset or custom view, to prepare for viewport capture and inspection.

Instructions

Frame the editor camera on the given entities, optionally from a preset view (top/front/etc.) or a custom yaw/pitch. Useful before capture_viewport. Returns { focused: }. When NOT to use: to move an in-scene camera entity (use modify_entities on its transform).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYesEntity resource_ids to frame
yawNoCustom horizontal angle (degrees); ignored if view is set
viewNoPreset camera orientation
pitchNoCustom vertical angle (degrees); ignored if view is set
Behavior4/5

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

Annotations already establish that the tool is non-read-only, idempotent, and non-destructive. The description adds useful behavioral context by clarifying that it affects the editor viewport camera rather than scene entities and by revealing the return shape '{ focused: <count> }'. It does not contradict the annotations.

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 four short sentences, each contributing a distinct piece of information: the action, the use case, the return value, and the exclusion. It is front-loaded and contains no filler.

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?

Even though there is no output schema, the description explicitly states the return value. It also provides a positive workflow hint and an explicit mis-use exclusion, which is enough for a simple viewport framing tool. The only minor gap is not directly differentiating from the sibling focus_camera, but the 'editor camera' phrasing resolves most ambiguity.

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 input schema already provides 100% parameter coverage with descriptions, so the baseline is 3. The description paraphrases the schema's 'view' and 'yaw/pitch' concepts without adding new constraints or behavioral details. It does not need to compensate for missing schema documentation.

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?

The description states a specific verb ('Frame'), a clear resource ('editor camera'), and the target ('given entities'), while also covering optional preset views and custom yaw/pitch. It distinguishes itself from capture_viewport and in-scene camera movement by naming the editor camera as the object being affected.

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?

The description gives a concrete workflow context with 'Useful before capture_viewport' and explicitly names an alternative for a common mis-use case: moving an in-scene camera entity via modify_entities. This is strong routing guidance that helps an agent select the correct tool.

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

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