Skip to main content
Glama

get_ids_info

Retrieve the current IDS document structure including title, author, and specifications to understand buildingSMART Information Delivery Specification requirements.

Instructions

Get current session's IDS document structure.

Uses current session automatically - no session_id parameter needed!

Args: ctx: FastMCP Context (auto-injected)

Returns: { "title": "...", "author": "...", "specification_count": 3, "specifications": [...] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler function that retrieves and summarizes the current session's IDS document structure, including title, author, specs count and list with facets info.
    async def get_ids_info(ctx: Context) -> Dict[str, Any]:
        """
        Get current session's IDS document structure.
    
        Uses current session automatically - no session_id parameter needed!
    
        Args:
            ctx: FastMCP Context (auto-injected)
    
        Returns:
            {
                "title": "...",
                "author": "...",
                "specification_count": 3,
                "specifications": [...]
            }
        """
        try:
            # Get IDS from session
            ids_obj = await get_or_create_session(ctx)
    
            # Build specification summary
            spec_list = []
            for spec in ids_obj.specifications:
                spec_list.append({
                    "identifier": getattr(spec, 'identifier', None),
                    "name": spec.name,
                    "ifc_versions": spec.ifcVersion if hasattr(spec, 'ifcVersion') else [],
                    "applicability_facets": len(spec.applicability) if hasattr(spec, 'applicability') else 0,
                    "requirement_facets": len(spec.requirements) if hasattr(spec, 'requirements') else 0
                })
    
            return {
                "title": ids_obj.info.get("title"),
                "author": ids_obj.info.get("author"),
                "version": ids_obj.info.get("version"),
                "description": ids_obj.info.get("description"),
                "specification_count": len(ids_obj.specifications),
                "specifications": spec_list
            }
    
        except Exception as e:
            await ctx.error(f"Failed to get IDS info: {str(e)}")
            raise ToolError(f"Failed to get IDS info: {str(e)}")
  • Registers the get_ids_info tool with the FastMCP server instance.
    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