Skip to main content
Glama

Check SQL with Claix Guard

claix.guard.check
Read-onlyIdempotent

Claix Guard: check a proposed SQL write before your app executes it (POST /check-sql). Body: { sql, params?: unknown[], connection_id?: uuid }. You define what is allowed. Returns allowed, needs_approval, verdict (allow | deny | needs_approval), reason, code, decision_id, violations. A write that does not fit an active permission is denied (code not_permitted). needs_approval means it fits and a person must confirm it; allowed is false. A denial is still HTTP 200 — read allowed. Claix never runs the statement.

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": {
      "sql": "<sql>"
    },
    "name": "claix.guard.check"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesThe SQL statement the agent wants to run (INSERT, UPDATE, or DELETE). Claix only checks it; it does not execute it.
paramsNoBound parameters for the SQL statement, in order ($1, $2, …).
api_keyNoAPI key secreta de Claix. Ejemplo: claix_sk_abc123.... Opcional si la conexión MCP envía x-api-key en cabecera HTTP (recomendado en Smithery/Cursor).
connection_idNoActive Claix DB connection UUID. Required when the account has more than one active connection.

Output Schema

NameRequiredDescriptionDefault
dataNoJSON payload from the Claix API (extracted records, schema list, or Excel export metadata).
errorNoHuman-readable error message when success is false.
successYesTrue when Claix returned a successful response. False when isError is set on the tool result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

The annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false), and the description adds the operational facts an agent actually needs: Claix never runs the statement, a denial still comes back as HTTP 200 so the agent must read allowed instead of the status code, and needs_approval is a state where allowed is false. Those are exactly the behavioral traits that would otherwise cause a calling agent to mis-handle a response.

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?

The text is dense but front-loaded: the purpose and endpoint come first, then the body, then the return contract. Listing the returned field names is partly wasted effort given an output schema exists, and the body enumeration duplicates the schema, but every remaining sentence carries decision-relevant information.

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?

For a validation gate whose output schema is already published, this description supplies the missing interpretive layer: non-execution, the not_permitted denial path, and the relationship between needs_approval and allowed. Nothing an agent needs in order to call it and correctly act on the result is absent.

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 sql, params, api_key, and connection_id are all already documented at the field level, and the description's body sketch largely mirrors that schema. It adds the endpoint and the optionality notation, but nothing about parameter meaning that the schema does not already supply, so the baseline 3 applies.

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 opens with a specific verb and resource: 'check a proposed SQL write before your app executes it (POST /check-sql)'. That phrasing tells an agent exactly what is validated and the point in the workflow where it belongs, which is enough to separate it from the extract/convert/schema siblings, none of which are a write-validation gate.

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 definition gives real when-to-use guidance ('before your app executes it') and explains how to read each outcome: a write outside an active permission is denied with code not_permitted, needs_approval means the statement fits but a person must confirm, and allowed is false in that case. What it does not do is state a when-not-to-use condition or name an alternative path for reading SQL; those omissions are minor because no sibling appears to overlap this gate.

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.