Skip to main content
Glama

sanitize_sql_query

Detects SQL injection vectors, escapes malicious input, and normalizes queries into strict parameterized syntax to protect database interactions.

Instructions

Detects SQL injection vectors, escapes malicious input, and normalizes queries into strict parameterized syntax. (0.01 USDC on Base L2)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payloadYesInput parameters or JSON string payload for the tool execution
paymentSignatureNoBase L2 USDC micropayment signature or transaction hash for x402 settlement

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations are absent, so the description carries the full burden of behavioral disclosure. It does add useful context with the '(0.01 USDC on Base L2)' cost note, which an agent needs for a paid tool. However, it does not disclose failure behavior (does it reject unsafe queries or transform them?), the return format (there is no output schema), or whether the paymentSignature is actually enforced, which is a significant gap for a security-sensitive mutation tool.

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?

Two sentences with zero waste: the core purpose is front-loaded in the first sentence, and the cost disclosure is a single compact parenthetical that earns its place for a paid tool. Nothing is repeated from the schema, and no fluff is present.

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?

For a paid, security-sensitive transformation tool with no output schema and no annotations, the description is incomplete. It never explains what the tool returns (sanitized query? status object?), how it behaves when injection is detected, or whether paymentSignature is required in practice despite being marked optional. These gaps materially affect an agent's ability to invoke and interpret the tool correctly.

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 the baseline is 3. The description adds marginal value by pricing the paymentSignature (0.01 USDC, matching the cost note), but the payload parameter in the schema is generic boilerplate ('Input parameters or JSON string payload for the tool execution') and the description never explicitly states that payload should be the SQL query string or JSON containing it. The description does not rise above the baseline but does not fall below it either.

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

Purpose4/5

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

The description states a clear verb+resource chain: it detects SQL injection vectors, escapes malicious input, and normalizes queries into strict parameterized syntax. This is specific enough for an agent to distinguish it from format_sql_query_pretty (formatting, not sanitizing). However, it never explicitly contrasts itself with the very close sibling sql_ast_sqli_taint_analyzer, so the differentiation is implicit rather than stated.

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?

The description gives no when-to-use or when-not-to-use guidance, and given the sibling list includes sql_ast_sqli_taint_analyzer, format_sql_query_pretty, and validate_code_syntax, an agent could plausibly pick the wrong tool. Usage is only implied by the action verbs; there is no explicit statement about when sanitization is needed or which sibling to prefer for analysis-only or formatting-only tasks.

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

Deploy Server

Other Tools