Skip to main content
Glama

get_plugins_with_backup

Retrieve plugins that have a backup version and can be downgraded or rolled back. Use this tool to identify plugins eligible for version rollback.

Instructions

Get plugins that can be downgraded

Returns plugins that have a backupVersion and can be rolled back.

Args: depth: The depth of the information to retrieve. Default is 0.

Returns: A list of plugins that can be downgraded

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler that exposes get_plugins_with_backup as a 'read' tool via @mcp.tool decorator. Delegates to the REST client.
    @mcp.tool(tags={'read'})
    async def get_plugins_with_backup(ctx: Context, depth: int = 0) -> list[dict]:
        """Get plugins that can be downgraded
    
        Returns plugins that have a backupVersion and can be rolled back.
    
        Args:
            depth: The depth of the information to retrieve. Default is 0.
    
        Returns:
            A list of plugins that can be downgraded
        """
        return jenkins(ctx).get_plugins_with_backup(depth=depth)
  • Tool registration/type decorator marking this tool with 'read' tag.
    @mcp.tool(tags={'read'})
    async def get_plugins_with_backup(ctx: Context, depth: int = 0) -> list[dict]:
  • The plugin module is imported here, which triggers the @mcp.tool() decorator registration on the JenkinsMCP instance.
    from mcp_jenkins.server import build, item, node, plugin, queue, view  # noqa: F401, E402
  • REST client implementation that fetches plugin list from Jenkins API and filters for plugins with backupVersion and downgradable=true.
    def get_plugins_with_backup(self, depth: int = 0) -> list[dict]:
        """Get plugins that can be downgraded.
    
        Plugins with backupVersion and downgradable=true can be rolled back.
    
        Args:
            depth: The depth of the information to retrieve.
    
        Returns:
            A list of plugins that can be downgraded.
        """
        response = self.request('GET', rest_endpoint.PLUGIN_LIST(depth=depth))
        plugins = response.json().get('plugins', [])
        return [
            {
                'shortName': p.get('shortName'),
                'longName': p.get('longName'),
                'version': p.get('version'),
                'backupVersion': p.get('backupVersion'),
                'downgradable': p.get('downgradable'),
            }
            for p in plugins
            if p.get('backupVersion') and p.get('downgradable')
        ]
  • REST endpoint definition for the plugin list API endpoint used by get_plugins_with_backup.
    PLUGIN_LIST = RestEndpoint('pluginManager/api/json?depth={depth}')
Behavior3/5

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

No annotations provided, so description must carry full burden. It discloses that it returns plugins with backupVersion, but does not explain the depth parameter's behavior, authentication needs, or response structure beyond a list.

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?

Description is short and front-loaded with the main purpose. The Args/Returns sections are structured but somewhat redundant; overall efficient.

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?

For a tool with one optional parameter and an output schema, the description covers the basic purpose and parameter but missing details on depth behavior and return structure. Adequate but not thorough.

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 has 0% description coverage. Description adds only a vague explanation of 'depth' as 'The depth of the information to retrieve', which lacks specificity on possible values or effects.

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?

Description clearly states the tool returns plugins that can be downgraded, distinguishing it from sibling tools like get_all_plugins or get_plugins_with_updates.

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 explicit guidance on when to use this tool versus siblings or when not to use it. The purpose is clear but lacks context for decision-making.

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/lanbaoshen/mcp-jenkins'

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