Skip to content

miratech-designs/sql-automation-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL Automation Plugin v1.0.0

Overview

The SQL Automation Plugin provides an intelligent workflow for executing SQL Server queries through a structured, deterministic process.
It combines:

  • A Node.js tool (sql-runner) to execute SQL Server queries
  • An agent to orchestrate behavior
  • A workflow skill to validate inputs, run queries, and interpret results
  • A slash command to trigger the workflow quickly

Features

  • Input validation for SQL text and connection selection
  • Optional dry-run mode (no execution, just summary)
  • Parameterized queries to reduce injection risk
  • Structured results: status, rows, rowCount, errorMessage
  • Clear error reporting and conservative behavior

Architecture

  • manifest.json – declares the agent, skill, tool, and slash command
  • agents/sql-automation-agent.agent – orchestrates the workflow
  • skills/sql-workflow-automation.skill – defines the workflow steps
  • tools/sql-runner/ – Node.js SQL Server execution tool
  • sql/placeholder.sql – example SQL script
  • slash-commands/run-sql-workflow.json – slash command entrypoint

Installation

  1. Copy the sql-automation-plugin.v1 folder into your plugins/extensions directory.

  2. Install Node.js (LTS recommended).

  3. In tools/sql-runner, install dependencies:

    npm install
  4. Configure your SQL Server connection via environment variables (see Configuration). Configuration The sql-runner tool uses environment variables for connection details: • SQLRUNNER_DEFAULT_CONNECTION – name of the default connection (e.g. main) • SQLRUNNER_MAIN_SERVER – SQL Server host • SQLRUNNER_MAIN_DATABASE – database name • SQLRUNNER_MAIN_USER – username • SQLRUNNER_MAIN_PASSWORD – password You can add more connections by extending the connection map in index.js.

Usage

  1. Ensure the host environment loads this plugin’s manifest.json.
  2. Use the slash command /run-sql-workflow (or equivalent UI) with: ◦ connectionName ◦ sqlText ◦ Optional parameters ◦ Optional dryRun

The workflow will:

  1. Validate inputs
  2. Optionally perform a dry run (no execution)
  3. Execute the SQL via sql-runner
  4. Return structured results

Slash Commands

• /run-sql-workflow Runs the sql-workflow-automation skill with the provided parameters. Safety & Limitations • Designed to be conservative: no schema-changing queries should be run unless explicitly intended. • Always review SQL before execution. • Ensure least-privilege database accounts. • Logging is minimal by default; extend as needed for your environment.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors