Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/firstmeridian/llm-sql-safety-executor-mcp/gemini-mdgit clone --depth 1 https://github.com/Firstmeridian/llm-sql-safety-executor-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/firstmeridian/llm-sql-safety-executor-mcp/gemini-md)<a href="https://agentmods.dev/instructions/firstmeridian/llm-sql-safety-executor-mcp/gemini-md"><img src="https://agentmods.dev/badge/instructions/firstmeridian/llm-sql-safety-executor-mcp/gemini-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02263 | $0.02263 |
| Opus 5 | $0.01131 | $0.01131 |
| Sonnet 5 | $0.00453 | $0.00453 |
| Haiku 4.5 | $0.00226 | $0.00226 |
Grade A, and why
llm-sql-safety-executor-mcp GEMINI.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 228 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Gemini Project Context
Project Overview
This project is a Python-based tool designed to allow Large Language Models (LLMs) to safely execute read-only SQL queries. It provides functions to validate a given SQL query to ensure it is safe and read-only (i.e., only SELECT / SHOW / DESCRIBE / EXPLAIN are allowed), and then execute the validated query against a database.
NEW: MCP Service Implementation - The project now includes a Model Context Protocol (MCP) service that wraps the original functionality, providing a standardized interface for AI models to interact with the SQL safety checker.
The primary technologies used are:
- Python as the programming language.
- sqlparse for SQL query validation.
- SQLAlchemy for database connection and execution, using a connection pool.
- PyMySQL as the database driver for MySQL.
- python-dotenv for managing database credentials through a
.envfile. - fastMCP for creating the MCP service implementation.
Key Files
sql_safety_checker.py: The core logic of the project resides here. It contains:is_sql_safe(sql_query): Validates whether a SQL query is read-only and safe (e.g.,SELECT/SHOW/DESCRIBE/EXPLAIN).execute_sql(sql_query): Validates the query usingis_sql_safeand then executes it against the database.
mcp_sql_server.py: MCP (Model Context Protocol) server implementation that wraps the SQL safety checker functionality (refactored December 2025):query(sql): Primary MCP tool for executing read-only SQL queries (with automatic validation)check_connection(): MCP tool for testing database connectivitylist_tables(): MCP tool for listing all tables with estimated row countsdescribe_table(table_name): MCP tool for retrieving table column info and query recommendationsget_full_schema(): MCP tool for getting complete database schema in one callget_table_summary(table_name): Optional MCP tool for getting table statistics (controlled byENABLE_TABLE_SUMMARY, default disabled)sample(table_name, limit): Optional MCP tool for retrieving sample data (controlled byENABLE_SCHEMA_TOOLS, default enabled)sql_assistant(): MCP prompt for SQL query assistance
test_mcp_functions.py: NEW - Test script to verify MCP functions work correctly (internal tests)test_mcp_client.py: NEW - MCP client test script that simulates real client connectionsmcp_config.json: NEW - Configuration file for MCP client integrationTEST_MCP_CLIENT_GUIDE.md: NEW - Usage guide for the MCP client test scriptPROMPT_ENGINEERING_BEST_PRACTICES.md: NEW - Guidelines for MCP tool descriptions and promptsREFACTORING_LOG.md: NEW - December 2025 refactoring changes documentation.env.example: NEW - Example environment configuration filerequirements.txt: Lists all the necessary Python packages for this project (now includes fastMCP)..gitignore: A standard Python.gitignorefile to exclude unnecessary files from version control.GEMINI.md: This file, providing context for the Gemini CLI.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 228 lines · 2,263 tokens per session scan A d095146a00b9
llm-sql-safety-executor-mcp GEMINI.md is an instructions file published in the GitHub repository Firstmeridian/llm-sql-safety-executor-mcp (6 stars, last pushed 2d ago), licensed MIT. It adds 2,263 tokens to every session, about $0.0113 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
kamehadb AGENTS.md
AGENTS.md instructions for asta-nguyen/kamehadb, covering agents.md, project overview, repository layout, workspace and package boundaries and commands.
mcp-toolbox GEMINI.md
Gemini CLI instructions for googleapis/mcp-toolbox, covering mcp toolbox context & style guide, project overview, tech stack, key directories and development workflow.
mcp-toolbox AGENTS.md
AGENTS.md instructions for googleapis/mcp-toolbox, a project described as: MCP Toolbox for Databases is an open source MCP server for databases.
ii-agent CLAUDE.md
Instructions for Intelligent-Internet/ii-agent, covering ii-agent project guide, project overview, architecture, domain structure and orm base & id conventions.
pixeltable AGENTS.md
AGENTS.md instructions for pixeltable/pixeltable, covering agents.md, protected configuration, project overview, repository structure and setup commands.
pixeltable CLAUDE.md
Claude Code instructions for pixeltable/pixeltable, covering claude.md, protected configuration, project overview, repository structure and setup commands.