Skip to main content
Glama

transform_component

Adjust a component's position, rotation, or scale in Sketchup using the SketchupMCP server. Simplify 3D model manipulation by directly modifying component properties.

Instructions

Transform a component's position, rotation, or scale

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
positionNo
rotationNo
scaleNo

Implementation Reference

  • The handler function for the 'transform_component' MCP tool. It connects to the Sketchup extension via a socket, prepares arguments for position, rotation, or scale, and sends a JSON-RPC 'tools/call' request to Sketchup's corresponding tool. Includes error handling and logging.
    @mcp.tool()
    def transform_component(
        ctx: Context,
        id: str,
        position: List[float] = None,
        rotation: List[float] = None,
        scale: List[float] = None
    ) -> str:
        """Transform a component's position, rotation, or scale"""
        try:
            sketchup = get_sketchup_connection()
            arguments = {"id": id}
            if position is not None:
                arguments["position"] = position
            if rotation is not None:
                arguments["rotation"] = rotation
            if scale is not None:
                arguments["scale"] = scale
                
            result = sketchup.send_command(
                method="tools/call",
                params={
                    "name": "transform_component",
                    "arguments": arguments
                },
                request_id=ctx.request_id
            )
            return json.dumps(result)
        except Exception as e:
            return f"Error transforming component: {str(e)}"
  • The @mcp.tool() decorator registers the transform_component function as an MCP tool, automatically using the function name as the tool name.
    @mcp.tool()
  • The function signature defines the input schema with type hints: required 'id' (str), optional 'position', 'rotation', 'scale' as lists of floats, returning a JSON string.
    def transform_component(
        ctx: Context,
        id: str,
        position: List[float] = None,
        rotation: List[float] = None,
        scale: List[float] = None
    ) -> str:
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a mutation operation ('Transform') but fails to specify critical details such as required permissions, whether changes are reversible, potential side effects, or response format. This is inadequate for a tool that modifies data.

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 front-loads the core action and resources without any wasted words. It's appropriately sized for the tool's complexity, making it easy to parse quickly.

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 mutation nature, 4 parameters with 0% schema coverage, and no output schema or annotations, the description is incomplete. It lacks details on behavior, parameter usage, and expected outcomes, which are essential for safe and effective tool invocation in this context.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It lists the updatable fields (position, rotation, scale) and implies an 'id' parameter, but doesn't explain their formats (e.g., arrays as vectors), constraints, or interactions. This adds minimal value beyond the schema's property names.

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 action ('Transform') and the resource ('a component's position, rotation, or scale'), making the purpose immediately understandable. However, it doesn't differentiate this tool from potential siblings like 'create_component' or 'delete_component' beyond the transformation aspect, which prevents a perfect score.

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. It doesn't mention prerequisites (e.g., needing an existing component), exclusions, or comparisons to sibling tools like 'create_component' or 'set_material', leaving the agent without contextual usage cues.

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/BearNetwork-BRNKC/SketchUp-MCP'

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