Skip to main content
Glama
Pawansingh3889

sql-steward

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SQL_STEWARD_MASKNoOptional: set to '1' to enable PII masking on results.
SQL_STEWARD_ROLENoOptional: role name for query-warden access control.
SQL_STEWARD_LAYERYesPath to the semantic layer YAML file defining entities, metrics, and policies.
SQL_STEWARD_DB_URLYesSQLAlchemy database URL (e.g., postgresql+psycopg://user@host/db).
SQL_STEWARD_POLICYNoOptional: path to a second-pass role policy YAML file.
SQL_STEWARD_AUDIT_DBNoOptional: path to SQLite database for agent-blackbox audit chain.
SQL_STEWARD_EMBED_URLNoOptional: URL for local embedding endpoint (e.g., http://localhost:11434/api/embeddings).
SQL_STEWARD_EMBED_MODELNoOptional: model name for embeddings (e.g., nomic-embed-text).
SQL_STEWARD_QUERY_BUDGETNoOptional: hard cap on queries per role per session (integer).

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_entitiesA

List the entities (tables) you may read, plus the available metrics.

Call this first. You never write SQL -- you pass names from here to get_records / get_metric and sql-steward compiles the query for you.

describe_entityA

Show one entity's fields, types and PII tags.

Fields tagged with a blocked PII category are marked blocked: true; asking for them in get_records is refused before any query runs.

list_metricsB

List pre-approved metrics and the dimensions/filters each one allows.

get_recordsB

Read rows from one entity.

filters is a list of {field, op, value}. Operators: =, !=, <, <=, >, >=, like, in, not in, is null, is not null. Blocked-PII fields are refused before anything runs; cross-entity references without a defined join are refused as unreachable.

get_metricA

Compute a pre-approved metric, optionally grouped/filtered by allowed dimensions. The aggregation itself is fixed by the semantic layer.

semantic_searchA

Vector similarity search over an entity's embedding column (pgvector).

query is embedded locally and matched against the entity's configured embedding; the closest rows are returned (the embedding itself never is). Requires the entity to have a search config and a local embedding model (SQL_STEWARD_EMBED_URL). PostgreSQL-only. Same PII refusal as everything else.

list_checksA

List the declared data-quality checks the layer can run.

run_checksA

Run the declared data-quality checks and return a readiness summary.

Each check compiles to a read-only violation count; zero violations passes. Returns a readiness score (percent of checks passing), an overall status, and a per-check breakdown. An 'error'-severity failure makes the status 'failing'; a 'warn'-severity failure makes it 'degraded'.

audit_verifyA

Verify the tamper-evident audit chain (agent-blackbox), if enabled.

Reports whether any previously recorded call was altered after the fact.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/Pawansingh3889/sql-steward'

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