Skip to main content
Glama
aegis-action-firewall

aegis-action-firewall

sql_execute_safe

Validate and execute SQL queries safely by parsing the AST, scanning outbound DLP, and enforcing policy invariants before execution.

Instructions

Parse SQL AST, scan outbound DLP, evaluate Z3 policy invariants, and execute safely.

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": {
      "session_id": "<session_id>",
      "connection_id": "<connection_id>",
      "query": "<query>"
    },
    "name": "sql_execute_safe"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes
paramsNo
agent_roleNoWORKER
risk_scoreNo
session_idYes
connection_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does add real behavioral context by revealing a screening pipeline (AST parsing, outbound DLP scanning, Z3 policy invariants), which tells the agent that queries may be blocked for policy or leakage reasons. It stops short of saying whether execution is mutating, whether it is transactional or reversible, what happens on denial, or what errors look like.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single short sentence with no filler, which is good, but the ordering front-loads implementation mechanics over the user-facing purpose. The agent must read to the final clause to learn the actual action is 'execute'.

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

Completeness2/5

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

With six parameters, zero schema coverage, and no annotations, the description should explain the session/connection model and the meaning of agent_role and risk_score. The presence of an output schema removes the need to describe return values, but the input side is left almost entirely undocumented.

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

Parameters1/5

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

Schema description coverage is 0% across six parameters, and the description adds no meaning for any of them. Critical fields such as session_id, connection_id, agent_role (default WORKER), risk_score, and params are entirely unexplained, leaving the agent to guess at their format and effect.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description does name a concrete action and resource ('execute' SQL) inside a processing chain, so an agent can infer it runs a query against a database. However, it leads with internal implementation stages (AST parse, DLP scan, Z3 invariants) rather than stating plainly what the tool does, and it offers no differentiation from siblings like http_request_safe.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus the sibling tools, and no mention of prerequisites such as needing a session, a connection, or an approval. The word 'safe' implies screening but never states when a query would be rejected or what to do instead.

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