Skip to main content
Glama

get_remediation

Retrieve the stored remediation suggestion for a specific compliance violation to resolve hardening issues.

Instructions

[READ] Get the persisted Suggestion for a violation, or None.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
violation_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Core implementation of the get_remediation tool. Opens the Twin store, calls twin.get_suggestion(violation_id), and returns the Suggestion as a dict (or None).
    @vmware_tool(risk_level="low")
    def get_remediation(violation_id: str) -> dict | None:
        """[READ] Get the persisted Suggestion for a violation, or None."""
        from vmware_harden.store.twin import Twin
    
        twin = Twin(_resolve_db())
        try:
            sugg = twin.get_suggestion(violation_id)
            if sugg is None:
                return None
            return sugg.model_dump(mode="json")
        finally:
            twin.close()
  • Registration of the get_remediation tool on the FastMCP server with name='get_remediation'. Wraps the tools.py implementation via a lambda-like closure.
    @server.tool(name="get_remediation")
    def _get_remediation_impl(violation_id: str) -> dict | None:
        """[READ] Get the persisted Suggestion for a violation, or None."""
        return t.get_remediation(violation_id)
  • Twin.get_suggestion() - the low-level database helper that queries the remediation table for a given violation_id and deserializes the stored Suggestion JSON.
    def get_suggestion(self, violation_id: str):
        """Load the saved Suggestion for a violation, or None if absent."""
        from vmware_harden.baselines.model import Suggestion
    
        row = self.conn.execute(
            "SELECT suggestion FROM remediation WHERE violation_id = ?",
            [violation_id],
        ).fetchone()
        if row is None or row[0] is None:
            return None
        return Suggestion.model_validate_json(row[0])
Behavior2/5

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

With no annotations, the description carries the full burden. It only indicates a read operation and potential return of None, but omits any behavioral traits like prerequisites, side effects, or permission requirements.

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 with a useful [READ] prefix. It is front-loaded and contains no extraneous words.

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

Completeness2/5

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

Given one parameter, no annotations, and an output schema (not shown), the description fails to provide sufficient context about what a 'Suggestion' is or the broader violation context. It is minimally complete.

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 coverage is 0%, and the description adds no extra meaning to the 'violation_id' parameter. It does not explain what a violation_id is or how to find it beyond the bare minimum.

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 gets a suggestion for a violation, using the verb 'Get' and specifying the resource. The [READ] prefix reinforces its read-only nature. However, it does not explicitly distinguish from siblings like 'get_baseline_rules', though the resource is different.

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 versus alternatives such as 'list_violations' or 'get_baseline_rules'. There are no when-to-use or when-not-to-use instructions.

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