Skip to main content
Glama
using76
by using76

bulc_get_spatial_context

Read-only

Retrieve the current spatial layout including rooms, walls, levels, and coordinates to place building elements relative to existing objects in BULC Building Designer projects.

Instructions

Get the current spatial layout of the project including all rooms, walls, levels, and their exact coordinates. IMPORTANT: Call this first when you need to place elements relative to existing objects (e.g., 'next to the living room', 'above the kitchen'). Returns bounds, room positions, wall positions, and level information. Use this to calculate coordinates before calling create functions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNoFilter by floor level index. 0 = ground floor. Omit to get all levels.

Implementation Reference

  • Handler case in handleContextTool function that validates input arguments using GetSpatialContextSchema and sends the 'get_spatial_context' command to the BULC client.
    case "bulc_get_spatial_context": {
      const validated = GetSpatialContextSchema.parse(args);
      result = await client.sendCommand({
        action: "get_spatial_context",
        params: validated,
      });
      break;
    }
  • Zod schema for input validation: optional 'level' parameter as integer.
    const GetSpatialContextSchema = z.object({
      level: z.number().int().optional(),
    });
  • Tool definition object including name, description, input schema, and annotations, exported as part of contextTools array.
    {
      name: "bulc_get_spatial_context",
      description:
        "Get the current spatial layout of the project including all rooms, walls, levels, and their exact coordinates. " +
        "IMPORTANT: Call this first when you need to place elements relative to existing objects (e.g., 'next to the living room', 'above the kitchen'). " +
        "Returns bounds, room positions, wall positions, and level information. " +
        "Use this to calculate coordinates before calling create functions.",
      inputSchema: {
        type: "object" as const,
        properties: {
          level: {
            type: "integer",
            description: "Filter by floor level index. 0 = ground floor. Omit to get all levels.",
          },
        },
      },
      annotations: {
        readOnlyHint: true,
        destructiveHint: false,
      },
    },
  • src/index.ts:151-162 (registration)
    Routing logic in main server CallToolRequest handler that directs 'bulc_get_spatial_context' calls to the handleContextTool function.
    if (
      name === "bulc_get_spatial_context" ||
      name === "bulc_get_home_info" ||
      name === "bulc_list_levels" ||
      name === "bulc_create_level" ||
      name === "bulc_set_current_level" ||
      name === "bulc_undo" ||
      name === "bulc_redo" ||
      name === "bulc_save"
    ) {
      return await handleContextTool(name, safeArgs);
    }
  • src/index.ts:40-41 (registration)
    Inclusion of contextTools (containing bulc_get_spatial_context) into the complete allTools list provided to the MCP server's ListToolsRequest.
    const allTools = [
      ...contextTools,      // 8 tools: spatial context, home info, levels, undo/redo, save
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, indicating a safe read operation. The description adds valuable context about the tool's role in spatial calculations and as a prerequisite for placement operations, though it doesn't detail rate limits or authentication needs.

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 front-loaded with the core purpose, followed by important usage instructions and return details. Every sentence adds value without redundancy, making it efficient and well-structured.

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

Completeness5/5

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

Given the tool's complexity (spatial layout retrieval), the description is complete: it explains the purpose, when to use it, what it returns, and its role in workflows. With annotations covering safety and schema covering parameters, no critical gaps remain.

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%, with the parameter 'level' fully documented in the schema. The description doesn't add any parameter-specific information beyond what the schema provides, so the baseline score of 3 is appropriate.

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 clearly states the specific action ('Get the current spatial layout') and resource ('project including all rooms, walls, levels, and their exact coordinates'), distinguishing it from siblings like 'bulc_list_rooms' or 'bulc_list_walls' by providing comprehensive spatial context rather than just listings.

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?

Explicit guidance is provided: 'Call this first when you need to place elements relative to existing objects' with concrete examples ('next to the living room', 'above the kitchen'), and it specifies an alternative purpose ('Use this to calculate coordinates before calling create functions').

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/using76/BULC_MCP'

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