Skip to main content
Glama

gate_action

Gate an action before execution by signing the decision, returning APPROVED, DENIED, or PENDING_APPROVAL. All outcomes are recorded in the audit trail.

Instructions

Pre-execution gate; signs the decision and returns APPROVED, DENIED, or PENDING_APPROVAL.

Both outcomes hit the audit trail. After an APPROVED gate, call
complete_action(gate_id, result) to bind the outcome into a bilateral receipt.

Args:
    action_type: The action to gate (e.g. "data:delete:users", "tool:execute:sql")
    agent_id: The agent requesting the action
    tool_name: Optional name of the tool being invoked
    arguments: Optional JSON string of the tool arguments
    risk_context: Optional description of why this action is risky

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
action_typeYes
agent_idYes
tool_nameNo
argumentsNo
risk_contextNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations, so description carries full burden. Describes pre-execution behavior, audit trail logging, and required follow-up. Missing details on handling DENIED/PENDING_APPROVAL and synchronicity.

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?

Concise paragraph followed by bullet-style parameter list. Front-loaded core purpose. Could be slightly more structured, but effective.

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?

Output schema presumably covers return values. Description covers purpose, parameters, and follow-up action. Missing error handling and explicit comparison to sibling tools.

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?

With 0% schema description coverage, the docstring provides meaningful descriptions for all 5 parameters, including examples for action_type and agent_id. Fully compensates for schema's lack of 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?

Clearly states it is a pre-execution gate that signs decisions and returns APPROVED, DENIED, or PENDING_APPROVAL. Distinct from siblings like check_policy and complete_action.

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?

Provides a clear follow-up instruction: after APPROVED gate, call complete_action. Lacks explicit guidance on when not to use or comparisons to siblings.

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

Install Server

Other Tools

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/jagmarques/asqav-mcp'

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