Skip to main content
Glama

create_ids

Create IDS documents for buildingSMART compliance by specifying title, author, version, and purpose details. Automatically tracks sessions for document management.

Instructions

Create a new IDS document for this session.

Session is automatically tracked by FastMCP - no session_id parameter needed!

Args: title: Document title (required) ctx: FastMCP Context (auto-injected) author: Author email or name version: Version string date: Date in YYYY-MM-DD format description: Document description copyright: Copyright notice milestone: Project milestone purpose: Purpose of this IDS

Returns: { "status": "created", "session_id": "auto-generated-by-fastmcp", "title": "..." }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
authorNo
versionNo
dateNo
descriptionNo
copyrightNo
milestoneNo
purposeNo

Implementation Reference

  • Implementation of the create_ids tool handler. Creates an IDS document using ifctester library, stores it in session storage, and returns status.
    async def create_ids(
        title: str,
        ctx: Context,
        author: Optional[str] = None,
        version: Optional[str] = None,
        date: Optional[str] = None,
        description: Optional[str] = None,
        copyright: Optional[str] = None,
        milestone: Optional[str] = None,
        purpose: Optional[str] = None
    ) -> Dict[str, Any]:
        """
        Create a new IDS document for this session.
    
        Session is automatically tracked by FastMCP - no session_id parameter needed!
    
        Args:
            title: Document title (required)
            ctx: FastMCP Context (auto-injected)
            author: Author email or name
            version: Version string
            date: Date in YYYY-MM-DD format
            description: Document description
            copyright: Copyright notice
            milestone: Project milestone
            purpose: Purpose of this IDS
    
        Returns:
            {
                "status": "created",
                "session_id": "auto-generated-by-fastmcp",
                "title": "..."
            }
        """
        try:
            await ctx.info(f"Creating IDS: {title}")
    
            # Create new IDS using IfcTester
            ids_obj = ids.Ids(
                title=title,
                author=author,
                version=version,
                date=date,
                description=description,
                copyright=copyright,
                milestone=milestone,
                purpose=purpose
            )
    
            # Store in session
            storage = get_session_storage()
            session_id = ctx.session_id
    
            from ids_mcp_server.session.models import SessionData
            session_data = SessionData(session_id=session_id)
            session_data.ids_obj = ids_obj
            session_data.set_ids_title(title)
            storage.set(session_id, session_data)
    
            await ctx.info(f"IDS created successfully for session {session_id}")
    
            return {
                "status": "created",
                "session_id": session_id,
                "title": title
            }
    
        except Exception as e:
            await ctx.error(f"Failed to create IDS: {str(e)}")
            raise ToolError(f"Failed to create IDS: {str(e)}")
  • Registration of document management tools including create_ids on the FastMCP server instance.
    # Register document management tools
    mcp_server.tool(document.create_ids)
    mcp_server.tool(document.load_ids)
    mcp_server.tool(document.export_ids)
    mcp_server.tool(document.get_ids_info)

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/vinnividivicci/ifc-ids-mcp'

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