Skip to main content
Glama

analyze_tool_call

Read-onlyIdempotent

Analyze a proposed AI-agent tool call before execution and return a deterministic, policy-aware decision (allow, notice, confirm or block) covering destructive actions, sensitive-data exposure, external transmission, privilege changes and irreversible operations, under the applicable policy — permissive, balanced or strict, balanced by default. Filesystem paths outside a known workspace_root are treated as higher risk than paths inside it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
policyNoOptional policy used to compute the decision: permissive, balanced or strict (default: balanced).
contextNoOptional declarative context about the proposed operation.
argumentsYesThe proposed tool arguments. They are analyzed as data and never executed.
tool_nameYesThe exact name of the proposed tool.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
riskYes
validYes
checksYes
signalsYes
decisionYes
tool_nameYes
risk_scoreYes
policy_appliedYes
schema_versionYes
ruleset_versionYes
context_completenessYes

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is clear. The description adds valuable behavioral detail: the decision is deterministic, policy-aware, and treats workspace paths outside the root as higher risk. It also explicitly states that arguments are 'analyzed as data and never executed', which is not present in annotations.

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 clear, front-loaded sentences. The first sentence defines the tool's function and outcome set, the second adds a specific risk rule. There is no redundant or filler content; every sentence contributes value.

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

Completeness5/5

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

Given the tool's complexity, the description covers the core purpose, the decision set, policy options, risk categories, and the workspace_root rule. An output schema exists, so return values need not be described. The description is complete and self-sufficient for an agent to determine when and how to invoke the tool.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description goes beyond the schema by explaining how the 'policy' parameter affects the decision, how 'workspace_root' influences risk assessment, and clarifying that 'arguments' are not executed. This adds meaningful context for parameter usage.

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 purpose: 'Analyze a proposed AI-agent tool call before execution and return a deterministic, policy-aware decision'. It specifies the exact verb (analyze), resource (tool call), and output (allow, notice, confirm, block). This distinguishes it from sibling analysis tools like analyze_url_risk, inspect_command, and inspect_file, which target different inputs.

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 when to use the tool: before executing a tool call to assess risks like 'destructive actions, sensitive-data exposure, external transmission', etc. It mentions the applicable policies and the workspace_root risk factor. However, it does not explicitly name alternatives or state when not to use the tool, so it falls short of a 5.

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