Skip to main content
Glama
hlavrencic

portainer-mcp-server

by hlavrencic

recreate_container

Update a Docker container to a new image: stops the existing container, pulls the specified image, and starts a replacement container.

Instructions

Recreate a container with an updated image (stops old container, pulls new image, starts new container)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesNew image to use (e.g., 'nginx:latest')
containerIdYesContainer ID or name
environmentIdYesPortainer environment ID
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses three key behavioral steps: stops old container, pulls new image, starts new container. However, it is vague about whether the old container is removed, whether persistent volumes are preserved, and what happens to container configuration. The term 'recreate' implies a new container but the details of cleanup and data handling are not specified.

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, well-structured sentence that front-loads the action and uses a parenthetical to list the main steps. It is concise with zero filler, making it easy to parse quickly.

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?

There is no output schema and no annotations, so the description must fully explain the tool's behavior, side effects, and return value. It omits critical information for a container recreation operation: whether the old container is destroyed, whether configuration and volumes are preserved, what the result contains, and expected downtime. This is inadequate for a potentially destructive tool.

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?

The input schema provides full descriptions for all three parameters (100% coverage), so the schema already handles parameter meaning. The description adds no additional parameter-specific information beyond the purpose, so baseline 3 is appropriate.

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 tool's function: 'Recreate a container with an updated image'. It uses a specific verb and resource, and the parenthetical ('stops old container, pulls new image, starts new container') distinguishes it from sibling tools like start/stop/restart, which do not involve pulling a new image.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The use case is implied by 'with an updated image', but there is no explicit guidance on when to use this tool versus alternatives like pull_image followed by start_container, nor any 'when not to use' or exclusion information. The description provides some context but no direct alternatives or exclusions.

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

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