Skip to main content
Glama
ginkida

portainer-mcp

by ginkida

portainer_stack_inspect

Retrieves stack details and compose file content, with optional unmasking of credential values for inspection.

Instructions

Get details of a stack including its compose file content.

Credential-looking values (stack Env variables named like *PASSWORD, *SECRET, *TOKEN, *KEY, ... and inline environment values in the compose file) are masked as [REDACTED] unless reveal_env=true. Always inspect with reveal_env=true before resending the compose file through portainer_stack_update — a masked file is rejected.

Args: stack_id: The ID of the stack to inspect reveal_env: Return credential values unmasked (default false)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stack_idYes
reveal_envNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv0.8.0
    • addedInput schema / properties / reveal_env
      Added value: +{
      +  "default": false,
      +  "title": "Reveal Env",
      +  "type": "boolean"
      +}
  2. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description must carry behavioral disclosure. It does by explaining the masking of credential-looking values (REDACTED) and the conditional reveal_env behavior, plus the consequence of a masked file being rejected by the update tool. This is important and non-obvious behavior. It doesn't explicitly state read-only, but the verb 'Get' and tool name 'inspect' imply it.

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 concise and well-structured: a one-sentence purpose, a critical behavioral note, then a short Args section. It front-loads the purpose and the masking behavior, which is essential. The Args section is slightly redundant with the schema, but since the schema lacks descriptions, it earns its place.

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

Completeness4/5

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

The tool has an output schema, so return value details are covered. The description covers the key behavioral aspects (masking, reveal_env) and the interaction with the update tool, which is a common pitfall. For a simple read-only inspect with two parameters, this is sufficiently complete. Missing error conditions or pagination are not critical here.

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

Parameters5/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 explain the parameters. It does: stack_id is defined as 'The ID of the stack to inspect' and reveal_env as 'Return credential values unmasked (default false)'. This adds clear meaning beyond the bare schema, fully compensating for the lack of schema descriptions.

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 opens with a clear verb+resource: 'Get details of a stack including its compose file content.' This distinguishes it from sibling tools like portainer_stacks_list (listing stacks) and portainer_stack_status (status only), and it goes beyond a generic statement by specifying the compose file content as a key output.

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

Usage Guidelines4/5

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

The description provides a concrete usage guideline: 'Always inspect with reveal_env=true before resending the compose file through portainer_stack_update — a masked file is rejected.' This tells the agent exactly when to set reveal_env. It doesn't explicitly contrast with other inspect tools, but the sibling context and the tool's name make the primary use case clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

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