get_ids_info
Retrieve the current session's IDS document structure including title, author, and specifications for buildingSMART Information Delivery Specification management.
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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The core handler function implementing the get_ids_info tool logic. Retrieves the IDS object from the session and returns a structured summary including title, author, and specifications list.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)}")
- src/ids_mcp_server/server.py:23-27 (registration)Registration of the get_ids_info tool (and related document tools) to 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)
- Docstring defining the tool's input arguments and output schema for automatic schema generation in FastMCP.""" 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": [...] } """