a5sql-mcp AGENTS.md

a5sql-mcp AGENTS.md is an instructions file for Codex, OpenCode from takuyaw-w/a5sql-mcp. It costs 5,003 tokens per session, scanned A, original, MIT.

Instructions for an MCP server that reads local A5:SQL Mk-2 files and makes database designs, SQL files, and related metadata easier for an AI agent to inspect.

In plain words
What is it for?
Use them to describe, parse, and read supported A5:SQL files, detect likely A5:SQL locations, and safely develop or test the command-line MCP mode.
Why use it?
They define a read-only, security-conscious approach that avoids exposing credentials or accidentally changing files or databases.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/takuyaw-w/a5sql-mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/takuyaw-w/a5sql-mcp

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for a5sql-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/takuyaw-w/a5sql-mcp/agents-md.svg)](https://agentmods.dev/instructions/takuyaw-w/a5sql-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/takuyaw-w/a5sql-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/takuyaw-w/a5sql-mcp/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,003 This file is loaded in full into every session.
When invoked 5,003 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.05003 $0.05003
Opus 5 $0.02501 $0.02501
Sonnet 5 $0.01001 $0.01001
Haiku 4.5 $0.00500 $0.00500

Measured 5d ago against content hash 83a02d526148, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

a5sql-mcp AGENTS.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.

AGENTS.md · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

このリポジトリは、ローカルに存在する A5:SQL Mk-2 の設定・メタデータ・SQL 資産を読み取り、AI エージェントが安全に扱いやすい形で配信する MCP サーバーを開発するためのものです。

開発の目的

  • A5:SQL のローカル資産を、AI が検索・要約・参照しやすい構造化データとして提供する。
  • データベース接続情報、ER 図、テーブル定義、SQL 履歴、SQL ファイルなどを段階的に扱えるようにする。
  • まずは読み取り専用を基本とし、ローカル環境や接続先 DB を壊さない。
  • 秘密情報を不用意にログ、レスポンス、テストスナップショット、コミットに含めない。

基本方針

  • 実装より前に、A5:SQL がローカルに保存するファイル形式・保存場所・文字コードを確認する。
  • 保存場所や形式はユーザー環境・A5:SQL のバージョン・Windows/Wine/Linux などの実行形態で変わり得るため、ハードコードを避ける。
  • デフォルト動作は読み取り専用にする。
  • 書き込み、削除、接続先 DB へのクエリ実行、資格情報の復号・表示は、明示的に実装範囲へ入るまで扱わない。
  • AI 向けの配信では「生データをそのまま渡す」のではなく、識別子、要約、参照パス、必要最小限の抜粋に整形する。
  • 例外や解析失敗時は、ファイルパスや秘密情報を含みすぎないエラーにする。

想定する公開面

現在の MCP サーバーは、起動時に指定された .a5er / .sql / text ファイルを読み取る stdio サーバーです。独立した packages/mcp-server は持たず、packages/cli--mcp モードで提供します。

現時点で公開している tool は次のとおりです。

  • describe_a5sql_file: 起動時に指定されたファイルのパス、種別、サイズ、更新日時を返す。
  • parse_a5sql_file: 起動時に指定された .a5er / .sql ファイルを AI 向けの構造に変換する。デフォルトは summary。mode: "full" でも maxTables / maxRelationships / maxColumnsPerTable による上限つきで返す。
  • read_a5sql_file: 起動時に指定されたファイル本文を、最大文字数つきで返す。offsetChars、または startLine / maxLines で読み取り範囲を絞れる。
  • detect_a5sql_locations: A5:SQL の設定ディレクトリ候補を、存在有無、読み取り可否、検出理由つきで返す。DB には接続しない。
  • read_a5sql_asset: assetId で指定された asset 本文を、サイズ制限と秘密情報マスクつきで返す。バイナリや未対応ファイルは本文を返さず warning を返す。
  • list_a5sql_connections: A5:SQL 設定 root 配下から接続候補を抽出し、秘密情報を返さない形で一覧する。非秘密項目もデフォルトではマスクする。
  • search_a5sql_assets: roots または A5SQL_MCP_ROOTS で指定された root 配下から A5:SQL 関連 asset を検索し、parse_a5sql_asset に渡せる assetId とマスク済み抜粋を返す。DB には接続しない。
  • parse_a5sql_asset: assetId で指定された .a5er / .sql / text asset を AI 向けの構造に変換する。roots または A5SQL_MCP_ROOTS で探索対象を明示する。DB には接続しない。
  • list_a5sql_tables: .a5er ファイル内のテーブル/ビュー一覧を返す。offset / limit によるページングに対応し、デフォルトは 100 件。
  • describe_a5sql_table: .a5er ファイル内の特定テーブル/ビュー定義を返す。
  • explain_a5sql_table: .a5er ファイル内の特定テーブルを、役割・主キー・関連テーブル・注意点つきで要約する。
  • list_a5sql_relationships: .a5er ファイル内のリレーション一覧を返す。
  • find_a5sql_tables: .a5er ファイル内のテーブルを、テーブル名・論理名・コメント・カラム名から検索する。
  • find_a5sql_columns: .a5er ファイル内のカラムを、カラム名・論理名・コメント・型・テーブル名から検索する。
  • generate_sql_select: .a5er ファイル内の定義から SELECT SQL のたたき台を生成する。DB には接続しない。maxRelatedTables で JOIN 対象の上限を指定できる。
  • generate_mermaid_er_diagram: .a5er ファイル内のテーブルとリレーションから Mermaid ER diagram を生成する。maxTables で出力対象テーブル数を制限できる。
  • generate_model_files: .a5er ファイル内のテーブル定義から Laravel Eloquent または SQLAlchemy のモデルファイル案を生成する。ファイルシステムには書き込まない。maxTables で生成対象テーブル数を制限できる。
  • generate_schema_markdown: .a5er ファイル内のテーブル定義とリレーションから Markdown の定義書案を生成する。ファイルシステムには書き込まない。
  • review_a5sql_schema: .a5er ファイル内のスキーマ品質を、主キー・型・コメント・リレーション整合性の観点でレビューする。
  • suggest_schema_changes: .a5er ファイル内のスキーマ品質レビュー結果から、主キー・型・リレーション・コメントの改善提案を返す。
  • compare_a5er_with_live_schema: .a5er ファイル内の定義と、外部 DB MCP などから渡された live schema JSON を比較する。DB には接続せず、テーブル/カラム欠落、余剰、型、NULL 許容、主キー差分を返す。
  • generate_migration_plan: .a5er ファイル内の定義と live schema JSON の差分から migration 案を生成する。DB には接続せず、実行しない。

Read the full file on GitHub · 129 lines

Changes

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.

  1. 5d ago First seen · 129 lines · 5,003 tokens per session scan A 83a02d526148

Subscribe to this mod's changes

a5sql-mcp AGENTS.md is an instructions file published in the GitHub repository takuyaw-w/a5sql-mcp (1 stars, last pushed 1mo ago), licensed MIT. It adds 5,003 tokens to every session, about $0.0250 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.