Skip to main content
Glama
tenzir

Tenzir MCP Server

Official
by tenzir

List OCSF versions

ocsf_get_versions
Read-onlyIdempotent

Lists available OCSF schema versions to help users select appropriate versions for cybersecurity data mapping and understand schema evolution.

Instructions

List all bundled OCSF schema versions.

Use this tool to:

  • See which OCSF schema versions are available

  • Choose a specific version for your mapping work

  • Understand schema evolution across versions

Typically you'll want to use ocsf_get_latest_version instead to get the most recent stable version automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main asynchronous handler function for the 'ocsf_get_versions' tool. It calls the helper to list versions and formats the output as both markdown list and structured JSON.
    async def ocsf_get_versions() -> ToolResult:
        """List all bundled OCSF schema versions.
    
        Use this tool to:
        - See which OCSF schema versions are available
        - Choose a specific version for your mapping work
        - Understand schema evolution across versions
    
        Typically you'll want to use `ocsf_get_latest_version` instead to get
        the most recent stable version automatically."""
        versions = list_ocsf_versions()
        return ToolResult(
            content="\n".join([f"- {v}" for v in versions]),  # Markdown list
            structured_content={"versions": versions},  # JSON array
        )
  • The @mcp.tool decorator that registers the tool with name 'ocsf_get_versions', tags, and annotations for MCP server integration.
    @mcp.tool(
        name="ocsf_get_versions",
        tags={"ocsf"},
        annotations={
            "title": "List OCSF versions",
            "readOnlyHint": True,
            "idempotentHint": True,
            "openWorldHint": False,
        },
    )
  • Helper function that scans the bundled OCSF data directory for JSON schema files, extracts version numbers from filenames, sorts them, and returns the list of available versions.
    def list_ocsf_versions() -> list[str]:
        """
        Get all available OCSF schema versions.
        """
        # Get the OCSF data directory
        ocsf_files = files("tenzir_mcp.data.ocsf")
    
        # Extract version numbers from JSON filenames
        versions = []
        for file_path in ocsf_files.iterdir():
            if file_path.name.endswith(".json"):
                # Remove .json extension to get version
                version = file_path.name[:-5]
                versions.append(version)
    
        # Sort versions (simple string sort works for semantic versions)
        versions.sort()
        return versions
Behavior4/5

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

Annotations already provide readOnlyHint=true, openWorldHint=false, and idempotentHint=true. The description adds valuable context about what 'bundled' means and the purpose of version listing for mapping work and schema evolution understanding. It doesn't contradict annotations and enhances the agent's understanding beyond the structured hints.

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

Conciseness5/5

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

The description is perfectly structured: a clear opening statement followed by bulleted use cases and an explicit alternative recommendation. Every sentence adds value with zero redundancy, making it easy for an agent to parse and understand quickly.

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?

For a parameterless tool with comprehensive annotations (readOnly, not openWorld, idempotent) but no output schema, the description provides excellent context about what the tool does and when to use it. The only minor gap is not explicitly describing the return format, but given the tool's simplicity and clear annotations, this is acceptable.

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?

With 0 parameters and 100% schema description coverage, the baseline would be 4. The description appropriately doesn't discuss parameters since none exist, and instead focuses on the tool's purpose and usage context, which is the correct approach for a parameterless tool.

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 ('List all bundled OCSF schema versions') with the resource ('OCSF schema versions'). It distinguishes from sibling tools by specifying it's about 'bundled' versions rather than individual classes/objects, and explicitly mentions the alternative `ocsf_get_latest_version` for differentiation.

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?

The description provides explicit guidance on when to use this tool ('to see which versions are available', 'choose a specific version for mapping work', 'understand schema evolution') and when to use an alternative ('Typically you'll want to use `ocsf_get_latest_version` instead'). This gives clear context for selection among 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/tenzir/mcp'

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