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 cover read-only, idempotent, and non-destructive behavior. The description adds valuable context: the decision types, default policy, and the higher-risk treatment of paths outside workspace_root, enriching behavioral understanding.

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 concise, two sentences with no redundancy, and front-loads the core purpose. Every sentence contributes valuable information.

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 description covers the essential behavior, policy options, and risk model. With an output schema present, it need not detail return values; overall it is sufficiently complete for an agent to select and use the 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?

Schema coverage is 100%, so parameters are fully documented. The description adds only minor elaboration (e.g., workspace risk), but the schema already explains each field adequately; no significant extra semantics are provided.

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 analyzes a shell command and returns a policy-aware decision, distinguishing it from sibling tools like analyze_tool_call and analyze_url_risk. The verb 'analyze' and resource 'shell command' are explicit and specific.

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?

Clear context is provided: use before command execution to get a decision. However, no explicit exclusions or comparisons with alternatives are mentioned, leaving some room for inference.

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.2/5.0
Disambiguation4/5

Each tool targets a distinct input type (tool call, URL, command, file), but analyze_tool_call could overlap with inspect_command when the tool call is a shell command. Descriptions are specific enough to mostly disambiguate.

Naming Consistency4/5

All tools follow a verb_noun pattern, but they mix 'analyze_' and 'inspect_' as verbs. The structure is consistent across tools, though the verb choice is not uniform.

Tool Count5/5

Four tools covering the core analysis targets (action, URL, command, file) is well-scoped for a security-analysis utility, not too thin and not overbuilt.

Completeness4/5

The surface covers the main entities an agent would need to analyze, but there are minor gaps such as a tool for managing policies or analyzing other data types (e.g., IP addresses or free-form text).

Resources