Skip to main content

SQL Generator Pack

Trustedv1.0.0MITGold Verified95

by AgentNode · published 1 month ago · toolpack

Generate SQL queries from natural language descriptions.

Translates natural language to SQL with schema awareness and query validation.

langchaincrewaigeneric

Quick Start

bash
agentnode install sql-generator-pack

Runs in a subprocess with filtered environment by default. Declared permissions are policy-checked, not sandboxed.

Usage

From package
python
from sql_generator_pack.tool import run

result = run(
    question="Show me the top 10 customers by total order value this quarter",
    schema={
        "customers": ["id", "name", "email", "created_at"],
        "orders": ["id", "customer_id", "total_amount", "status", "created_at"]
    },
    dialect="postgresql"
)

print(result["sql"])
# SELECT c.name, c.email, SUM(o.total_amount) AS total_value
# FROM customers c
# JOIN orders o ON c.id = o.customer_id
# WHERE o.created_at >= date_trunc('quarter', CURRENT_DATE)
#   AND o.status = 'completed'
# GROUP BY c.id, c.name, c.email
# ORDER BY total_value DESC
# LIMIT 10;

print(f"Tables used: {result['tables_referenced']}")
print(f"Query type: {result['query_type']}")

Runs locally on your machine. No execution data is sent to AgentNode. Permissions are checked before execution. Learn how this works

Verification

high confidence95/100★ Gold Verified
smokeReturned valid result
+25/25
testsPublisher-provided tests passed
+15/15
importAll tools imported successfully
+15/15
installInstalled in 1.9s
+15/15
contractAll contract checks passed
+10/10
determinismConsistent output across runs (normalized)
+5/5
reliability3/3 runs passed
+10/10

Package installs and imports correctly. runtime checks passed. publisher tests passed.

install1.9s
import1.4s
smoke1.5s
tests2.7s

This package was executed and validated by AgentNode before listing. Install, import, and runtime checks passed.

Python 3.12.3ffmpegpopplertesseractuv

Last verified 13d ago· Runner v2.0.0

Use this when you need to...

  • Convert plain English questions into SELECT queries for analytics
  • Generate complex JOIN queries from schema descriptions
  • Build parameterized INSERT and UPDATE statements from natural language
  • Translate business KPI definitions into aggregate SQL queries
  • Generate database migration DDL from schema change descriptions

README

Version History

Capabilities

sql_generationgenerate_sqltool

Permissions

Declared by the publisher. Checked before execution by the policy gate.

Networknone
Filesystemnone
Code Executionnone
Data Accessinput_only
User Approvalonce

Permissions are policy-checked before execution. Network and filesystem access are not sandboxed at runtime. Learn more

Privacy

All tool execution happens locally on your machine. AgentNode never receives:

  • • Tool inputs or outputs
  • • Execution logs
  • • Data your agent processes

Only install events and search queries are sent to the registry.

bash
agentnode install sql-generator-pack

Files (3)

License

MIT

Stats

Downloads0
Installs0
Versionv1.0.0
Published3/16/2026
Channelstable
Typetoolpack
Entrypointsql_generator_pack.tool

Compatibility

Frameworks

langchaincrewaigeneric

Runtime

python

Python Version

>=3.10

Trust & Security

PublisherTrusted
SignatureNone
ProvenanceNone
Security Issues0

Publisher

A

AgentNode

@agentnode