Skip to main content
Glama

get_families

Retrieve all families from a Revit model, with optional filtering by category or name to find specific components.

Instructions

获取 Revit 模型中的所有族

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryIdNo族类别 ID(可选)
nameNo族名称过滤(可选)

Implementation Reference

  • Core implementation of the get_families tool: sends the 'get_families' command with empty arguments to the Revit socket server via sendRequest.
    public async getFamilies(): Promise<any[]> {
      const response = await this.sendRequest<any[]>('get_families', {});
      return response;
    }
  • Helper method in RevitService that delegates getFamilies call to the RevitSocketClient instance.
    async getFamilies(): Promise<any[]> {
      try {
        return await this.client.getFamilies();
      } catch (error) {
        console.error('[RevitService] 获取族失败:', error);
        throw error;
      }
    }
  • Dynamic handler in MCP CallToolRequestSchema that converts tool name 'get_families' to 'getFamilies' and invokes it on RevitService with arguments.
    const toolName = request.params.name;
    
    // 将工具名称转换为 camelCase 方法名
    const methodName = toolName.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());
    
    // 检查 RevitService 是否有对应的方法
    if (typeof (this.revitService as any)[methodName] !== 'function') {
      throw new McpError(
        ErrorCode.MethodNotFound,
        `未知工具: ${toolName}`
      );
    }
    
    try {
      // 动态调用对应的方法
      const result = await (this.revitService as any)[methodName](request.params.arguments || {});
      //const result = '';
  • src/index.ts:124-139 (registration)
    Registration of the 'get_families' tool in the MCP ListToolsRequestSchema response, including description and input schema (note: arguments not passed to implementation).
      name: "get_families",
      description: "获取 Revit 模型中的所有族",
      inputSchema: {
        type: "object",
        properties: {
          categoryId: {
            type: "string",
            description: "族类别 ID(可选)"
          },
          name: {
            type: "string",
            description: "族名称过滤(可选)"
          }
        }
      }
    }, {
  • Input schema definition for the get_families tool, specifying optional categoryId and name parameters.
    inputSchema: {
      type: "object",
      properties: {
        categoryId: {
          type: "string",
          description: "族类别 ID(可选)"
        },
        name: {
          type: "string",
          description: "族名称过滤(可选)"
        }
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves families but doesn't describe any behavioral traits like whether it's read-only, if it requires specific permissions, how it handles large datasets (e.g., pagination), or what the return format looks like. For a retrieval tool with zero annotation coverage, this is inadequate.

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 in Chinese that directly states the tool's purpose without any unnecessary words. It's front-loaded and appropriately sized, making it easy for an agent to parse quickly. Every part of the sentence earns its place.

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 complexity (retrieving data with optional filters), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like safety, performance, or return values, which are crucial for an agent to use the tool effectively. The description should provide more context to compensate for these gaps.

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 has 100% description coverage, with both parameters ('categoryId' and 'name') documented as optional filters. The description doesn't add any meaning beyond what the schema provides—it doesn't explain how these filters work or their impact. Since the schema does the heavy lifting, 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.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '获取 Revit 模型中的所有族' translates to 'Get all families in the Revit model.' It specifies the verb ('get') and resource ('families in Revit model'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_categories' or 'get_elements,' which is why it doesn't reach a score of 5.

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 any prerequisites, exclusions, or comparisons to sibling tools such as 'get_categories' or 'get_elements,' leaving the agent without context for tool selection. This lack of usage instructions is a significant gap.

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

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