Skip to main content
Glama
JeremyLakeyJr

Friday MCP Server

rollback_skill

Revert a skill to a previous state by specifying its ID and optionally selecting a specific backup file to restore.

Instructions

Restore the latest or selected backup of a skill.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skill_idYes
backup_fileNo

Implementation Reference

  • The MCP tool 'rollback_skill' is registered as a @mcp.tool() decorator. The function delegates to skill_store.rollback_skill(skill_id, backup_file or None).
    @mcp.tool()
    def rollback_skill(skill_id: str, backup_file: str = "") -> dict:
        """Restore the latest or selected backup of a skill."""
        return skill_store.rollback_skill(skill_id, backup_file or None)
  • The core logic of rollback_skill in SkillStore. Finds backup candidates, selects the latest or specific backup, reads its content, and re-installs it via install_skill_from_markdown with source_type='rollback'.
    def rollback_skill(self, skill_id: str, backup_file: str | None = None) -> dict[str, Any]:
        candidates = sorted(self.backups_dir.glob(f"{skill_id}-*.md"))
        if backup_file is not None:
            candidate = (self.backups_dir / backup_file).resolve()
            if candidate not in [path.resolve() for path in candidates]:
                raise SkillError(f"Unknown backup '{backup_file}' for skill '{skill_id}'.")
        else:
            if not candidates:
                raise SkillError(f"No backups available for skill '{skill_id}'.")
            candidate = candidates[-1].resolve()
    
        markdown = candidate.read_text(encoding="utf-8")
        record = self.install_skill_from_markdown(
            markdown,
            source=str(candidate),
            source_type="rollback",
            activate=True,
        )
        record["restored_from"] = str(candidate)
        return record
  • SkillDocument dataclass defines the schema/structure for skill metadata used in rollback operations.
    class SkillDocument:
        skill_id: str
        name: str
        version: str
        description: str
        instructions: str
        capabilities: list[str]
        min_server_version: str
  • SkillStore.__init__ sets up backups_dir used by rollback_skill for finding backup candidates.
    def __init__(self, root: Path) -> None:
        self.root = root
        self.installed_dir = self.root / "installed"
        self.backups_dir = self.root / "backups"
        self.registry_path = self.root / "registry.json"
  • The register function that wires up all skill tools including rollback_skill via the skills.register call path.
    def register(mcp, *, skill_store) -> None:
        @mcp.tool()
        def list_skills(active_only: bool = False) -> list[dict]:
            """List installed skills and their activation state."""
            return skill_store.list_skills(active_only=active_only)
    
        @mcp.tool()
        def get_skill(skill_id: str) -> dict:
            """Get the full installed content and metadata for a skill."""
            return skill_store.get_skill(skill_id)
    
        @mcp.tool()
        def validate_skill_markdown(markdown: str) -> dict:
            """Validate a candidate skill document before installation."""
            return skill_store.validate_skill_markdown(markdown)
    
        @mcp.tool()
        def install_skill_from_markdown(
            markdown: str,
            source: str = "generated",
            activate: bool = True,
        ) -> dict:
            """Install a skill from markdown front matter and instructions."""
            return skill_store.install_skill_from_markdown(
                markdown,
                source=source,
                source_type="generated",
                activate=activate,
            )
    
        @mcp.tool()
        async def install_skill_from_url(url: str, activate: bool = True) -> dict:
            """Download, validate, install, and optionally activate a skill from a URL."""
            async with httpx.AsyncClient(follow_redirects=True, timeout=15.0) as client:
                response = await client.get(url)
                response.raise_for_status()
            return skill_store.install_skill_from_markdown(
                response.text,
                source=url,
                source_type="url",
                activate=activate,
            )
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It does not state whether the operation is destructive, requires authentication, or is reversible. The implied 'restore' suggests overwriting, but this is not explicit.

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 a single sentence that is concise and free of fluff. It effectively communicates the core action without verbosity.

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 no output schema and no annotations, the description should cover return values, side effects, and prerequisites. It lacks details on what happens on success/failure, whether the skill must be active, or any impact on current state.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must add meaning. It clarifies that backup_file selects a specific backup and omitting it restores the latest. However, it does not explain the format or expected values for backup_file, leaving ambiguity.

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 restores a backup of a skill, using the verb 'Restore' and resource 'backup of a skill'. While it doesn't explicitly distinguish from siblings, the sibling tools are different operations (e.g., remove_skill, activate_skill), so purpose is clear.

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 on when to use this tool vs alternatives, no prerequisites mentioned (e.g., backups must exist), and no hint about when not to use it. The description is purely functional without usage context.

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/JeremyLakeyJr/mcp-server'

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