Skip to main content
Glama

get_selection

Retrieve currently selected components in Sketchup for real-time 3D modeling and scene manipulation through direct integration with the SketchupMCP server.

Instructions

Get currently selected components

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_selection' MCP tool. It establishes a connection to SketchUp via socket, sends a JSON-RPC 'tools/call' request to SketchUp's 'get_selection' tool with empty arguments, and returns the JSON-encoded result or an error message.
    @mcp.tool()
    def get_selection(ctx: Context) -> str:
        """Get currently selected components"""
        try:
            sketchup = get_sketchup_connection()
            result = sketchup.send_command(
                method="tools/call",
                params={
                    "name": "get_selection",
                    "arguments": {}
                },
                request_id=ctx.request_id
            )
            return json.dumps(result)
        except Exception as e:
            return f"Error getting selection: {str(e)}"
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral information. It states what the tool does but doesn't disclose important traits like whether it's read-only (implied by 'Get' but not explicit), what format the selection data returns, error conditions, or performance characteristics.

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 directly states the tool's purpose with no wasted words. It's appropriately sized for a simple zero-parameter tool and front-loads the essential information.

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 tool with no annotations, no output schema, and zero parameters, the description is insufficiently complete. It doesn't explain what 'components' refers to in this context, what format the selection data returns, or whether this tool interacts with other sibling tools that manipulate components.

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

Parameters4/5

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

The tool has zero parameters with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't discuss parameters since none exist, which is correct for this context.

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 ('Get') and target ('currently selected components'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'create_component' or 'transform_component' beyond the obvious difference in operation type.

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 components selected first), context for usage, or comparison with other tools that might retrieve component information differently.

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