Skip to main content
Glama

get_levels

Retrieve all floor levels from a Revit model to access building elevation data and structural information for design analysis and documentation.

Instructions

获取 Revit 模型中的所有楼层

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:160-167 (registration)
    Registration of the "get_levels" MCP tool in ListToolsRequestSchema, defining its name, description, and empty input schema.
    {
      name: "get_levels",
      description: "获取 Revit 模型中的所有楼层",
      inputSchema: {
        type: "object",
        properties: {}
      }
    }, {
  • Input schema for the get_levels tool (no parameters required).
    inputSchema: {
      type: "object",
      properties: {}
    }
  • The handler function in RevitService that executes the get_levels tool logic by delegating to RevitSocketClient.getLevels().
    async getLevels(): Promise<any[]> {
      try {
        return await this.client.getLevels();
      } catch (error) {
        console.error('[RevitService] 获取楼层失败,使用模拟数据:', error);
        throw error; // 不使用模拟数据,直接抛出错误
      }
    }
  • Supporting utility in RevitSocketClient that sends the 'get_levels' command to the Revit plugin via socket and returns the levels.
    public async getLevels(sortByElevation: boolean = true): Promise<any[]> {
      const response = await this.sendRequest<any[]>('get_levels', {  });
      return response;
    }

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/PiggyAndrew/revit_mcp'

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