Skip to main content
Glama

Check a command against the zero-trust policy

classify_command
Read-onlyIdempotent

Classify Kubernetes, Docker, Helm, and Podman commands by risk as safe-read, approval-required, or blocked, with reasons, risk score, and role permission checks before execution.

Instructions

Classify a kubectl/oc/docker/podman/helm command as SAFE_READ, APPROVAL_REQUIRED or BLOCKED_DESTRUCTIVE, with reasons and a risk score, and say whether the given role may run it. Pipes, chaining, command substitution and non-allowlisted binaries are blocked.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "command": "<command>"
    },
    "name": "classify_command"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleNooperator
commandYes
approvedNoA human approved this command

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations, the description discloses the classification labels, inclusion of reasons and a risk score, role-based permission output, and the policy that pipes, chaining, command substitution, and non-allowlisted binaries are blocked. It does not explain how the approved flag affects classification, which is a notable behavioral gap, but the read-only and non-destructive annotations already establish the safety profile.

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 definition is two focused sentences with no wasted language. The core classification behavior is front-loaded, and the second sentence adds the important policy constraints on pipes, chaining, command substitution, and non-allowlisted binaries.

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?

For a read-only policy classifier with no output schema, the description is largely complete: it explains the result categories, reasons, risk score, and role-permission check. The main missing piece is the semantics of the approved parameter and how approval interacts with APPROVAL_REQUIRED, which an agent may need in order to invoke the tool correctly.

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 coverage is only 33%, so the description must compensate for undocumented parameters. It adds meaning for command by listing the supported command families and for role by saying the tool checks whether that role may run the command, but it does not explain the viewer/operator/admin distinctions or how the approved flag changes the result.

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 names a specific verb (classify) and resource (kubectl/oc/docker/podman/helm command), and enumerates the exact output categories: SAFE_READ, APPROVAL_REQUIRED, BLOCKED_DESTRUCTIVE. It also states the role-permission check, making it clearly distinct from the sibling tools for pod diagnosis, log redaction, manifest validation, and cluster risk auditing.

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 clear context for using the tool: check a command against policy and determine whether the given role may run it. It does not explicitly name alternatives or when-not-to-use guidance, but the sibling tools are functionally distinct enough that no routing ambiguity is apparent.

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