Skip to main content
Glama

sqli_file_read

Read server files through SQL injection using UNION SELECT LOAD_FILE(). Requires MySQL FILE privilege to access server-side files like /etc/passwd for security testing.

Instructions

Read server files via UNION SELECT LOAD_FILE(). Requires MySQL FILE privilege. Uses LOAD_FILE() in a UNION SELECT. Returns file_content, success, target_file. Errors: FILE privilege required. Returns empty if privilege denied.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesFull URL with injectable parameter
parameterYesVulnerable parameter name
target_fileNoServer-side file to read, e.g. /etc/passwd
column_countNoNumber of columns (from previous UNION discovery)
string_columnNo1-indexed column that displays strings
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure and does this well. It specifies technical requirements ('MySQL FILE privilege'), implementation details ('Uses LOAD_FILE() in a UNION SELECT'), return values ('Returns file_content, success, target_file'), and error conditions ('Errors: FILE privilege required. Returns empty if privilege denied'). The only minor gap is not mentioning potential side effects or rate limits.

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?

The description is perfectly front-loaded and efficient. The first sentence establishes the core purpose, followed by essential requirements, implementation details, return values, and error conditions - all in just 4 sentences with zero wasted words. Every sentence earns its place by providing critical information.

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 a complex security testing tool with 5 parameters and no output schema, the description provides excellent coverage of what the tool does, how it works, requirements, and error conditions. The only gap is the lack of output schema, which means the description doesn't fully document the structure of returned data (though it lists the fields). Given the complexity and absence of annotations, it's nearly complete.

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?

With 100% schema description coverage, the baseline is 3. The description mentions 'target_file' in the return values section, which provides some additional context about that parameter's purpose, but doesn't add meaningful semantic information beyond what's already documented in the comprehensive input schema descriptions for all 5 parameters.

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 clearly states the tool's purpose: 'Read server files via UNION SELECT LOAD_FILE()' - a specific verb ('Read') and resource ('server files') with the exact technique ('UNION SELECT LOAD_FILE()'). It distinguishes itself from sibling SQL injection tools like sqli_union_extract, sqli_blind_boolean, and sqli_blind_time by focusing specifically on file reading rather than general data extraction or blind techniques.

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 description provides clear context for when to use this tool: 'Requires MySQL FILE privilege' and 'Uses LOAD_FILE() in a UNION SELECT' indicate it's specifically for MySQL databases with file reading vulnerabilities. However, it doesn't explicitly state when NOT to use it or mention alternatives among the many sibling SQL injection tools, which prevents a perfect score.

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/operantlabs/operant-mcp'

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