Skip to main content
Glama

list_baselines

List all built-in and user-imported compliance baselines for VMware vSphere hardening, covering CIS, DISA STIG, vSphere SCG, China DJCP 2.0, and PCI-DSS frameworks.

Instructions

[READ] List built-in and user-imported compliance baselines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual tool handler: decorated with @vmware_tool(risk_level='low'), it calls list_builtins() and load_builtin() from the baselines.loader module to build a list of baseline dicts with id, name, version, applies_to, and rule_count.
    @vmware_tool(risk_level="low")
    def list_baselines() -> list[dict]:
        """List built-in and user-imported baselines.
    
        Returns: list of {id, name, version, applies_to, rule_count}.
        """
        from vmware_harden.baselines.loader import list_builtins, load_builtin
    
        out: list[dict] = []
        for name in list_builtins():
            try:
                b = load_builtin(name)
                out.append(
                    {
                        "id": b.id,
                        "name": b.name,
                        "version": b.version,
                        "applies_to": list(b.applies_to),
                        "rule_count": len(b.rules),
                    }
                )
            except Exception as e:
                out.append({"id": name, "error": f"failed to load: {e}"})
        return out
  • Registration of the tool on the FastMCP server via @server.tool(name='list_baselines'), wrapping the implementation from vmware_harden.mcp.tools.
    @server.tool(name="list_baselines")
    def _list_baselines_impl() -> list[dict]:
        """[READ] List built-in and user-imported compliance baselines."""
        return t.list_baselines()
  • list_builtins() helper used by the handler: discovers baseline YAML files in both the user directory and the package builtin directory.
    def list_builtins() -> list[str]:
        """Return sorted names of all discoverable baselines.
    
        Includes both user dir (~/.vmware-harden/baselines) and package
        built-in directory; deduplicated by stem (user wins on collision).
        """
        names: set[str] = set()
        for base in (USER_DIR, BUILTIN_DIR):
            if not base.exists():
                continue
            for p in base.glob("*.yaml"):
                names.add(p.stem)
        return sorted(names)
  • load_builtin(name) helper used by the handler: resolves and loads a baseline YAML by name.
    def load_builtin(name: str) -> Baseline:
        """Load a baseline by name (without `.yaml` suffix).
    
        Searches user dir (~/.vmware-harden/baselines) first, then the
        package's built-in directory.
        """
        return load_baseline(_resolve_baseline_path(name))
  • Baseline Pydantic model that defines the schema for baseline data (id, name, version, applies_to, rules).
    class Baseline(BaseModel):
        """A complete baseline of compliance rules."""
    
        model_config = ConfigDict(extra="forbid")
    
        id: str
        name: str
        version: str
        source: str | None = None
        extends: str | None = None
        applies_to: list[NodeType]
        rules: list[Rule]
Behavior2/5

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

No annotations are provided, and the description only includes a [READ] prefix indicating read-only. It does not disclose behavioral traits such as pagination, ordering, or whether all baselines are returned, leaving a gap in transparency.

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 a single sentence that is perfectly concise and front-loaded with a verb. Every word serves a purpose, achieving high efficiency.

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

Completeness3/5

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

Given no parameters and an output schema present, the description is minimally adequate. However, it could specify scope (e.g., all baselines or filtered) and expected behavior, making it only moderately complete for a list operation.

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?

The tool has no parameters, so schema coverage is 100%. With zero parameters, the baseline score is 4 per scoring rules. The description adds no parameter info, but none is needed.

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

Purpose4/5

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

The description clearly states the tool lists compliance baselines, both built-in and user-imported. It uses a specific verb and resource, and while it doesn't explicitly distinguish from siblings, the scope (built-in vs user-imported) helps differentiate from other tools.

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?

The description provides no guidance on when to use this tool vs alternatives like get_baseline_rules or other list tools. The agent must infer usage from the tool name alone.

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/zw008/VMware-Harden'

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