Skip to main content
Glama

add_classification_facet

Add classification facets to building specifications to categorize and organize requirements by classification systems and codes.

Instructions

Add a classification facet to a specification.

Args: spec_id: Specification identifier location: "applicability" or "requirements" classification_value: Classification code or pattern ctx: FastMCP Context (auto-injected) classification_system: Classification system name or URI cardinality: "required", "optional", or "prohibited"

Returns: {"status": "added", "facet_type": "classification", "spec_id": "S1"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spec_idYes
locationYes
classification_valueYes
classification_systemNo
cardinalityNorequired

Implementation Reference

  • Handler function implementing the core logic for adding a classification facet to an IDS specification using IfcTester's ids.Classification.
    async def add_classification_facet( spec_id: str, location: str, classification_value: str, ctx: Context, classification_system: Optional[str] = None, cardinality: str = "required" ) -> Dict[str, Any]: """ Add a classification facet to a specification. Args: spec_id: Specification identifier location: "applicability" or "requirements" classification_value: Classification code or pattern ctx: FastMCP Context (auto-injected) classification_system: Classification system name or URI cardinality: "required", "optional", or "prohibited" Returns: {"status": "added", "facet_type": "classification", "spec_id": "S1"} """ try: ids_obj = await get_or_create_session(ctx) spec = _find_specification(ids_obj, spec_id) await ctx.info(f"Adding classification facet: {classification_value} to {spec_id}") # Create classification facet using IfcTester classification = ids.Classification( value=classification_value, system=classification_system, cardinality=cardinality if location == "requirements" else None ) # Add to appropriate section if location == "applicability": spec.applicability.append(classification) elif location == "requirements": spec.requirements.append(classification) else: raise ToolError(f"Invalid location: {location}") await ctx.info(f"Classification facet added: {classification_value}") return { "status": "added", "facet_type": "classification", "spec_id": spec_id } except ToolError: raise except Exception as e: await ctx.error(f"Failed to add classification facet: {str(e)}") raise ToolError(f"Failed to add classification facet: {str(e)}")
  • Registration of the add_classification_facet tool in the FastMCP server.
    mcp_server.tool(facets.add_classification_facet)

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