Skip to main content
Glama

inspect_command

Read-onlyIdempotent

Analyze a shell command before execution and return a deterministic, policy-aware decision (allow, notice, confirm or block) without running it, under the applicable policy — permissive, balanced or strict, balanced by default. Paths outside a known workspace_root are treated as higher risk than paths inside it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working-directory context. It is never accessed.
shellNoThe command shell, when known.
policyNoOptional policy used to compute the decision: permissive, balanced or strict (default: balanced).
commandYesThe complete command text to inspect without executing it.
contextNoOptional declarative context.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYes
riskYes
shellYes
validYes
checksYes
commandYes
signalsYes
decisionYes
risk_scoreYes
policy_appliedYes
schema_versionYes
ruleset_versionYes
context_completenessYes

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint. The description supplements this by stating the command is 'without running it' and that path risk is based on workspace_root. These behavioral traits are not fully captured by the annotations, adding valuable context without contradicting them.

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 two sentences and front-loads the primary purpose. It packs essential information—decision enumeration, non-execution guarantee, policy options, and path risk—without redundant phrasing. Every sentence 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?

With an output schema present, the description does not need to explain return values. It adequately covers the decision types, policy defaults, and risk factors. Although it leaves cwd and shell semantics to the schema, the tool context is sufficiently complete for agent selection and invocation.

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 100%, so the description need not add parameter-level detail. It does add the default policy ('balanced') and the higher-risk heuristic for paths outside workspace_root, but the schema already documents these. Thus a baseline score of 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 specifies 'Analyze a shell command before execution' and enumerates concrete decision outcomes (allow, notice, confirm, block). This clearly identifies the resource as shell commands, differentiating it from sibling tools like analyze_tool_call, analyze_url_risk, and inspect_file, which target other resource types.

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 implies usage by stating the tool inspects commands 'before execution' and explains policy options and workspace_root risk. However, it does not explicitly name sibling alternatives or provide when-not recommendations, so it stops short of full usage guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool targets a distinct artifact: tool calls, URLs, shell commands, and files. There is no overlap in their input types or risk-analysis scopes, so an agent can clearly select the right tool for the situation.

Naming Consistency4/5

All tool names follow a snake_case verb_noun pattern, but two different verbs are used ('analyze' and 'inspect'). This is a minor deviation from a single consistent verb, yet the pattern remains predictable and readable.

Tool Count5/5

Four tools is well within the ideal 3-15 range and each one addresses a distinct, necessary aspect of pre-execution safety analysis. The count feels purposeful and not bloated.

Completeness4/5

The set covers the major categories of risky operations (actions, URLs, commands, files). A minor gap is the lack of a tool to configure or retrieve the policy that governs the decisions, but the core analysis surface is adequately complete.

Resources