Skip to main content
Glama

Run Sqlmap

run_sqlmap

Automates SQL injection detection and exploitation, enabling database enumeration and table dumping for authorized penetration testing.

Instructions

Sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers. Tags: security, pentest, exploitation, vulnerability-scanner, database, sql-injection, enumeration

Usage Guide:

  • Target Specification: Provide a url for standard GET scans, or post_data for POST requests. Use request_file to load a raw HTTP request (e.g., exported from Burp).

  • Request Configuration: Use cookie_string for authenticated sessions. Enable random_agent or tor to bypass filters and hide origin.

  • Detection & Tuning: Adjust level (1-5) and risk (1-3) for deeper testing. Use tamper_script to evade WAF/IPS.

  • Enumeration: Use list_dbs to find databases, list_tables (with database_name) to find tables, and dump_table (with database_name and table_name) to exfiltrate data.

  • System Access: Use remote_file_read to retrieve local files from the server.

  • Automation: batch mode is enabled by default to prevent the tool from pausing for user input.

Warnings: ⚠️ WARNING: This tool contains exploitation/destructive capabilities. Use with extreme caution.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "run_sqlmap"
  }
}

Input Schema

NameRequiredDescriptionDefault
torNoUse Tor anonymity network to route traffic.
urlNoTarget URL (e.g., http://example.com/vuln.php?id=1).
riskNoRisk of tests to perform (1-3, default 2).
batchNoNever ask for user input, use the default behavior.
levelNoLevel of tests to perform (1-5, default 3).
list_dbsNoEnumerate DBMS databases.
post_dataNoData string to be sent through POST (e.g., "id=1&user=admin").
dump_tableNoDump DBMS database table entries.
table_nameNoDBMS database table to enumerate.
list_tablesNoEnumerate DBMS database tables.
random_agentNoUse a randomly selected HTTP User-Agent header value.
request_fileNoPath to a file containing a raw HTTP request.request.txt
cookie_stringNoHTTP Cookie header value for authentication.
database_nameNoDBMS database to enumerate.
flush_sessionNoFlush session files for current target.
get_passwordsNoEnumerate DBMS users password hashes.
tamper_scriptNoSqlmap tamper script to use for bypassing WAF.space2comment
remote_file_readNoRead a file from the back-end DBMS file system./etc/passwd

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full disclosure burden and does deliver meaningful behavioral context: an explicit destructive/exploitation warning, the fact that batch mode is on by default so it will not pause for input, and that tor/random_agent alter traffic routing. It omits side effects like session file persistence, flush_session, and any permission or runtime expectations for what is inherently an intrusive scan.

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 bulleted Usage Guide with labeled sections (Target Specification, Request Configuration, Detection, Enumeration, System Access, Automation) is well organized and scales appropriately to 18 parameters. The opening boilerplate definition and the Tags line add little for an agent that already has the name and title.

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?

For an 18-parameter exploitation tool with an output schema, the description covers the main invocation paths and warns about destructiveness, which is the critical missing piece without annotations. Minor gaps remain: get_passwords and flush_session are undocumented in prose, and the default request_file value ('request.txt') implies a file dependency the description does not call out.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning beyond it: it explains the escalation semantics of level (1-5) and risk (1-3), the workflow dependency between list_dbs, list_tables and dump_table, and the purpose of tamper_script for WAF evasion. It does not touch get_passwords or flush_session, leaving those to the schema alone.

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 specific verb and resource: it automates detecting and exploiting SQL injection flaws and taking over database servers, reinforced by tags like sql-injection and database. An agent can tell this is a SQL injection exploitation tool rather than a general scanner, though guidance is framed as a definition of Sqlmap rather than 'runs sqlmap against a target,' and no sibling is named.

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 Usage Guide gives concrete when-to-use context per parameter group: url vs post_data vs request_file for target specification, level/risk/tamper_script for deeper testing, and a chained enumeration workflow (list_dbs, then list_tables with database_name, then dump_table). It lacks explicit exclusions and does not point to any alternative tool when SQL injection is not the right approach.

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