Skip to main content
Glama

generate_ai_bom

Generates an AI Bill of Materials in CycloneDX ML-BOM or SPDX 3.0 format, including all required field categories for compliance submission.

Instructions

Generate an AI-BOM in CycloneDX ML-BOM format (or SPDX 3.0) with all 10 required field categories. Provides the skeleton for compliance submission.

Behavior: This tool generates structured output without modifying external systems. Output is deterministic for identical inputs. No side effects. Free tier: 10/day rate limit. Pro tier: unlimited. No authentication required for basic usage.

When to use: Use this tool when you need structured analysis or classification of inputs against established frameworks or standards.

When NOT to use: Not suitable for real-time production decision-making without human review of results.

Args: model_name (str): The model name to analyze or process. model_version (str): The model version to analyze or process. organisation (str): The organisation to analyze or process. licence (str): The licence to analyze or process. architecture (str): The architecture to analyze or process. parameter_count (str): The parameter count to analyze or process. training_datasets (str): The training datasets to analyze or process. format (str): The format to analyze or process. api_key (str): The api key to analyze or process.

Behavioral Transparency: - Side Effects: This tool is read-only and produces no side effects. It does not modify any external state, databases, or files. All output is computed in-memory and returned directly to the caller. - Authentication: No authentication required for basic usage. Pro/Enterprise tiers require a valid MEOK API key passed via the MEOK_API_KEY environment variable. - Rate Limits: Free tier: 10 calls/day. Pro tier: unlimited. Rate limit headers are included in responses (X-RateLimit-Remaining, X-RateLimit-Reset). - Error Handling: Returns structured error objects with 'error' key on failure. Never raises unhandled exceptions. Invalid inputs return descriptive validation errors. - Idempotency: Fully idempotent — calling with the same inputs always produces the same output. Safe to retry on timeout or transient failure. - Data Privacy: No input data is stored, logged, or transmitted to external services. All processing happens locally within the MCP server process.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_nameYes
model_versionNo1.0.0
organisationNoMEOK AI Labs
licenceNoApache-2.0
architectureNoTransformer
parameter_countNounknown
training_datasetsNo
formatNocyclonedx
api_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • server.py:93-93 (registration)
    Tool registration via @mcp.tool() decorator on FastMCP instance.
    @mcp.tool()
  • Function signature with typed parameters defining the input schema for generate_ai_bom.
    def generate_ai_bom(
        model_name: str,
        model_version: str = "1.0.0",
        organisation: str = "MEOK AI Labs",
        licence: str = "Apache-2.0",
        architecture: str = "Transformer",
        parameter_count: str = "unknown",
        training_datasets: str = "",
        format: str = "cyclonedx",
        api_key: str = "",
  • Handler logic: docstring (104-147), access control & rate limiting (148-152), SPDX 3.0 generation (159-183), CycloneDX 1.6 generation (184-223), and final JSON response (225-242).
    ) -> str:
        """Generate an AI-BOM in CycloneDX ML-BOM format (or SPDX 3.0) with all 10 required
        field categories. Provides the skeleton for compliance submission.
    
        Behavior:
            This tool generates structured output without modifying external systems.
            Output is deterministic for identical inputs. No side effects.
            Free tier: 10/day rate limit. Pro tier: unlimited.
            No authentication required for basic usage.
    
        When to use:
            Use this tool when you need structured analysis or classification
            of inputs against established frameworks or standards.
    
        When NOT to use:
            Not suitable for real-time production decision-making without
            human review of results.
    
        Args:
            model_name (str): The model name to analyze or process.
            model_version (str): The model version to analyze or process.
            organisation (str): The organisation to analyze or process.
            licence (str): The licence to analyze or process.
            architecture (str): The architecture to analyze or process.
            parameter_count (str): The parameter count to analyze or process.
            training_datasets (str): The training datasets to analyze or process.
            format (str): The format to analyze or process.
            api_key (str): The api key to analyze or process.
    
        Behavioral Transparency:
            - Side Effects: This tool is read-only and produces no side effects. It does not modify
              any external state, databases, or files. All output is computed in-memory and returned
              directly to the caller.
            - Authentication: No authentication required for basic usage. Pro/Enterprise tiers
              require a valid MEOK API key passed via the MEOK_API_KEY environment variable.
            - Rate Limits: Free tier: 10 calls/day. Pro tier: unlimited. Rate limit headers are
              included in responses (X-RateLimit-Remaining, X-RateLimit-Reset).
            - Error Handling: Returns structured error objects with 'error' key on failure.
              Never raises unhandled exceptions. Invalid inputs return descriptive validation errors.
            - Idempotency: Fully idempotent — calling with the same inputs always produces the
              same output. Safe to retry on timeout or transient failure.
            - Data Privacy: No input data is stored, logged, or transmitted to external services.
              All processing happens locally within the MCP server process.
        """
        allowed, msg, tier = check_access(api_key)
        if not allowed:
            return json.dumps({"error": msg, "upgrade_url": STRIPE_199})
        if err := _rl(tier):
            return json.dumps({"error": err, "upgrade_url": STRIPE_199})
    
        now = datetime.now(timezone.utc).isoformat()
        datasets = [d.strip() for d in training_datasets.split(",") if d.strip()]
        if not datasets:
            datasets = ["UNKNOWN — populate training dataset sources"]
    
        if format.lower() == "spdx":
            doc = {
                "spdxVersion": "SPDX-3.0.1",
                "dataLicense": "CC0-1.0",
                "SPDXID": f"SPDXRef-AIBOM-{hashlib.sha1(model_name.encode()).hexdigest()[:8]}",
                "name": f"AI-BOM for {model_name} v{model_version}",
                "created": now,
                "creators": [f"Organization: {organisation}", "Tool: MEOK AI Labs ai-bom-mcp"],
                "ai_package": {
                    "SPDXID": f"SPDXRef-Package-{model_name}",
                    "name": model_name,
                    "version": model_version,
                    "supplier": f"Organization: {organisation}",
                    "licenseDeclared": licence,
                    "primaryPackagePurpose": "AI-MODEL",
                    "ai_profile": {
                        "architecture": architecture,
                        "parameterCount": parameter_count,
                        "trainingData": datasets,
                        "evaluationResults": "POPULATE — run bench + bias tests",
                        "intendedUses": "POPULATE — list explicit allowed use cases",
                        "prohibitedUses": "POPULATE — list prohibited use cases",
                    },
                },
            }
        else:  # cyclonedx (default)
            doc = {
                "bomFormat": "CycloneDX",
                "specVersion": "1.6",
                "version": 1,
                "metadata": {
                    "timestamp": now,
                    "tools": [{"vendor": "MEOK AI Labs", "name": "ai-bom-mcp"}],
                    "component": {
                        "bom-ref": f"urn:meok:aibom:{model_name}@{model_version}",
                        "type": "machine-learning-model",
                        "name": model_name,
                        "version": model_version,
                        "supplier": {"name": organisation},
                        "licenses": [{"license": {"id": licence}}],
                        "modelCard": {
                            "modelParameters": {
                                "approach": {"type": architecture},
                                "datasets": [{"ref": d} for d in datasets],
                                "inputs": [{"format": "text"}],
                                "outputs": [{"format": "text"}],
                            },
                            "considerations": {
                                "users": ["POPULATE"],
                                "useCases": ["POPULATE"],
                                "technicalLimitations": ["POPULATE"],
                                "performanceTradeoffs": ["POPULATE"],
                                "ethicalConsiderations": [{"name": "bias", "mitigationStrategies": "POPULATE"}],
                                "fairnessAssessments": [{"groupAtRisk": "POPULATE", "mitigationStrategy": "POPULATE"}],
                                "environmentalConsiderations": {"properties": [{"name": "training_compute_flops", "value": "POPULATE"}]},
                            },
                        },
                    },
                },
                "components": [],
                "properties": [
                    {"name": "aibom:parameter_count", "value": parameter_count},
                    {"name": "aibom:meok_generated", "value": now},
                ],
            }
    
        return json.dumps({
            "format": format,
            "ai_bom_document": doc,
            "legal_basis": [
                "US EO 14028 + OMB M-22-18 — federal SBOM/AI-BOM requirements",
                "EU AI Act Article 11 + Annex IV — technical documentation for high-risk AI",
                "NIST AI RMF 1.0 — Govern/Map/Measure/Manage functions",
                "ENISA AI Cybersecurity Report 2024",
            ],
            "populate_next": [
                "Training data provenance + copyright status (Annex IV mandatory)",
                "Bias testing results against protected characteristics",
                "Red team / adversarial robustness findings",
                "Incident reporting contact + escalation path",
                "Export control classification (e.g. ITAR if applicable)",
            ],
            "upsell": f"Enterprise auto-scans your training data for provenance + generates signed AI-BOM to submit to federal procurement: {STRIPE_1499}" if tier != "enterprise" else None,
        }, indent=2)
  • check_access helper used to validate API key and determine tier.
    def check_access(api_key: str = ""):
        return _shared_check_access(api_key)
  • _rl helper used for rate limiting free tier to 10 calls/day.
    def _rl(tier: str = "free") -> Optional[str]:
        if tier in ("pro", "professional", "enterprise"):
            return None
        now = datetime.now(timezone.utc)
        cutoff = now - timedelta(days=1)
        _usage["anonymous"] = [t for t in _usage["anonymous"] if t > cutoff]
        if len(_usage["anonymous"]) >= FREE_DAILY_LIMIT:
            return f"Free tier limit ({FREE_DAILY_LIMIT}/day). Unlock unlimited generation + signed AI-BOM export for Pro £199/mo: {STRIPE_199}"
        _usage["anonymous"].append(now)
        return None
Behavior5/5

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

With no annotations, the description fully covers behavior: read-only, deterministic, no side effects, authentication, rate limits, error handling, idempotency, and data privacy.

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?

Well-organized with clear sections and front-loaded purpose, though the 'Args' block is somewhat redundant given schema titles.

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 complexity (9 params, no schema descriptions) and presence of output schema, the description covers usage, behavior, and output format adequately, but parameter semantics remain weak.

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

Parameters2/5

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

Schema description coverage is 0%, but the 'Args' section only repeats parameter names with generic 'to analyze or process' phrasing, adding minimal meaning. Some descriptions may be misleading (e.g., api_key).

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 it generates an AI-BOM in CycloneDX ML-BOM or SPDX 3.0 format for compliance, distinguishing it from siblings like audit_ai_bom_completeness.

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

Usage Guidelines5/5

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

Explicit 'When to use' and 'When NOT to use' sections provide clear guidance, including exclusion for real-time decisions without human review.

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/CSOAI-ORG/ai-bom-mcp'

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