Skip to main content
Glama

add_classification_facet

Add classification facets to IDS specifications to categorize requirements by systems like Uniclass or OmniClass for standardized compliance.

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the add_classification_facet tool, creating and appending a Classification facet to the specified IDS specification section using IfcTester library.
    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)}")
  • Registers the add_classification_facet tool with the FastMCP server instance.
    mcp_server.tool(facets.add_classification_facet)
  • Imports the facets module containing the add_classification_facet tool.
    from ids_mcp_server.tools import document, specification, facets, validation, restrictions
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states the action is 'Add' (implying mutation) and shows a return format, but doesn't disclose permissions needed, whether changes are reversible, error conditions, or side effects. For a mutation tool with zero annotation coverage, this is insufficient.

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

Conciseness4/5

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

The description is efficiently structured with a purpose statement followed by Args and Returns sections. Every sentence earns its place, though the 'ctx: FastMCP Context (auto-injected)' note could be omitted as it's implementation detail not needed for tool selection.

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

Completeness4/5

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

Given the mutation nature (no annotations), 5 parameters with 0% schema coverage, and presence of an output schema, the description does well by explaining all parameters and showing a return example. However, it lacks context about when this operation is valid or what happens on failure, leaving some gaps for a mutation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description compensates well by explaining all 5 parameters in the Args section with clear meanings (e.g., 'location: "applicability" or "requirements"', 'cardinality: "required", "optional", or "prohibited"'). It adds significant value beyond the bare schema, though it doesn't explain format details like what a 'specification identifier' entails.

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

Purpose5/5

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

The description clearly states the specific action ('Add a classification facet') and target resource ('to a specification'), distinguishing it from sibling tools like add_attribute_facet or add_material_facet by specifying the facet type. The verb+resource combination is precise and unambiguous.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like add_entity_facet or add_property_facet. The description mentions the tool's function but doesn't indicate appropriate contexts, prerequisites, or exclusions relative to sibling tools.

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

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