Skip to main content
Glama

open_document

Open Revit project files to enable AI-assisted modeling, editing, and management of building design elements within the Autodesk Revit environment.

Instructions

Open Document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathNoFile Path

Implementation Reference

  • Handler function that sends the 'open_document' command to the Revit client using the provided filePath parameter and returns the response or an error message.
    async (args, extra) => {
      const params = {
        filePath: args.filePath,
      };
    
      try {
        const response = await withRevitConnection(async (revitClient) => {
          return await revitClient.sendCommand('open_document', params);
        });
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `document open failed: ${error instanceof Error ? error.message : String(error)}`,
            },
          ],
        };
      }
  • Zod input schema defining an optional 'filePath' string parameter for the tool.
    {
      filePath: z.string().optional().describe('File Path'),
    },
  • Registration of the 'open_document' tool via server.tool call within the registerOpenDocumentTool function, which is dynamically invoked during tool setup.
    export function registerOpenDocumentTool(server: McpServer) {
      server.tool(
        'open_document',
        'Open Document',
        {
          filePath: z.string().optional().describe('File Path'),
        },
        async (args, extra) => {
          const params = {
            filePath: args.filePath,
          };
    
          try {
            const response = await withRevitConnection(async (revitClient) => {
              return await revitClient.sendCommand('open_document', params);
            });
    
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(response, null, 2),
                },
              ],
            };
          } catch (error) {
            return {
              content: [
                {
                  type: 'text',
                  text: `document open failed: ${error instanceof Error ? error.message : String(error)}`,
                },
              ],
            };
          }
        }
      );
    }
Behavior1/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 but provides none. It doesn't indicate whether this is a read-only operation, whether it modifies document state, what permissions are required, whether it affects other tools' operations, or what happens on success/failure. For a tool that presumably interacts with documents, this lack of behavioral information is a critical gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While technically concise with just two words, this represents under-specification rather than effective brevity. The description fails to provide the necessary information a user or agent needs to understand and use the tool correctly. Every word should earn its place, but here the minimal text doesn't fulfill the description's purpose of clarifying the tool's function.

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

Completeness1/5

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

Given the complete lack of annotations, no output schema, and a description that provides minimal information, this is inadequate for a document manipulation tool. The description doesn't explain what 'opening' entails, what happens after opening, whether the document becomes active/current, or how this interacts with sibling tools like 'get_current_document_info'. For a tool that likely changes application state, this level of documentation is insufficient.

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 schema description coverage is 100% with a single parameter 'filePath' documented as 'File Path'. The description adds no additional parameter information beyond what the schema provides. Since the schema does the heavy lifting with complete coverage, the baseline score of 3 is appropriate - the description neither compensates for gaps nor adds value beyond the structured schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

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

The description 'Open Document' is a tautology that merely restates the tool name without adding any meaningful clarification. It doesn't specify what 'open' means in this context (e.g., load into memory, display in UI, make editable) or what type of document is being opened. While the name suggests a document-related operation, the description fails to provide the specific verb+resource combination needed for clear understanding.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides absolutely no guidance about when to use this tool versus alternatives. With sibling tools like 'get_current_document_info' and various element creation tools, there's no indication whether this tool is for initial document loading, switching between documents, or another purpose. No prerequisites, exclusions, or contextual recommendations are mentioned.

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/ideook/revit-mcp'

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