Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DB_HOSTYesPostgreSQL server hostname
DB_NAMEYesDatabase name
DB_PORTNoConnection port5432
DB_USERYesDatabase username
DB_SSLMODENoSSL modeprefer
DB_MAX_ROWSNoMaximum rows per result set100
DB_PASSWORDYesDatabase password
API_VERIFY_SSLNotrue / false SSL verification (local dev certs)
API_BEARER_TOKENNoBearer token used for authenticated HTTP calls
DB_MAX_RESULT_SETSNoMaximum result sets per batch5
API_TIMEOUT_SECONDSNoHTTP request timeout
DB_APPLICATION_NAMENoApplication identifier
API_MAX_RESPONSE_BYTESNoMax response bytes returned by HTTP tools
DB_OBJECT_PREVIEW_CHARSNoMax definition preview length4000
DB_QUERY_TIMEOUT_SECONDSNoQuery timeout (seconds)30

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
healthB

Provide system status and configuration details without exposing secrets.

describe_objectB

Retrieve structural details, parameters, and definition for a database object.

list_tables_and_columnsB

Discover tables and columns with optional filtering by schema or keyword search.

preview_queryA

Execute read-only SELECT statements and CTEs with safety validation and row limits.

execute_readonly_sqlC

Execute read-only SQL batches with support for temporary tables within the session.

exec_proc_previewB

Execute PostgreSQL functions or procedures with optional parameters and result limiting.

exec_function_previewA

Execute a PostgreSQL function with positional parameters and return preview rows.

Use this tool for function calls such as sales."Fn_GetSalesChamps"(2, 2025, ARRAY[1,2,5], 5).

Pass arguments in positional order using JSON-compatible values:

  • scalars: 2, 2025, 5

  • arrays: [1, 2, 5]

  • null: null

PostgreSQL array parameters should be passed as normal lists; psycopg adapts them to PostgreSQL arrays automatically.

insert_rowA

Insert a single row into a PostgreSQL table.

Use this tool when you need one explicit insert with structured values.

  • table_name: table target, optionally schema-qualified

  • row: object mapping column names to values

  • returning_columns: optional list of columns to return via RETURNING

Example:

  • table_name: sales.orders

  • row: { "customer_id": 10, "status": "new" }

  • returning_columns: ["order_id"]

insert_rowsA

Insert multiple rows into a PostgreSQL table in one batch.

Use this tool for bulk inserts where every row has the same columns.

  • table_name: table target, optionally schema-qualified

  • rows: list of objects mapping column names to values

  • returning_columns: optional list of columns to return from inserted rows

Notes:

  • Every row must use the same columns in the same order.

  • Arrays can be passed as JSON lists and psycopg adapts them automatically.

http_getA

Send an HTTP GET request.

Use for read-only resource retrieval. Provide a full URL. Pass jwt_token to forward the caller's JWT for this request only. If jwt_token is omitted, API_BEARER_TOKEN is used when configured. headers.Authorization is ignored; use jwt_token instead.

http_headA

Send an HTTP HEAD request.

Use for metadata/status checks without retrieving a full body. Pass jwt_token to override the default environment token for this call. headers.Authorization is ignored; use jwt_token instead.

http_postA

Send an HTTP POST request.

Use for create/actions. Provide a full URL. body accepts JSON object/array or UTF-8 text. content_type optionally overrides the Content-Type header. Pass jwt_token to forward the caller's JWT for this request only.

http_putA

Send an HTTP PUT request.

Use for full updates/replacements. body accepts JSON object/array or UTF-8 text. Pass jwt_token to forward the caller's JWT for this request only.

http_patchA

Send an HTTP PATCH request.

Use for partial updates. body accepts JSON object/array or UTF-8 text. Pass jwt_token to forward the caller's JWT for this request only.

http_deleteA

Send an HTTP DELETE request.

Use for delete operations. Some APIs allow delete payloads; if needed, provide body as JSON object/array or UTF-8 text. Pass jwt_token to forward the caller's JWT for this request only.

auth_start_sessionA

Acquire a session-scoped JWT for email from the backend broker.

After a successful call every HTTP tool call in this session will automatically use the returned token (unless the tool call provides its own jwt_token).

Parameters

email: The user whose identity the MCP session will impersonate. reason: Optional free-text description of why this session is needed. Stored in the JWT claims for audit purposes.

Returns

dict ok=True with email, display_name, user_name, store on success; ok=False with error on failure.

auth_switch_userA

Switch the active session to a different user.

Equivalent to calling auth_start_session — provided as a semantic alias when the intent is to change the active user rather than start a fresh session.

Parameters

email: The new user to impersonate. reason: Optional free-text description of why the switch is needed.

Returns

dict Same shape as auth_start_session.

auth_statusA

Return the current session status without exposing the raw token.

Returns

dict active=False when no session is set; otherwise active=True with email, display_name, expires_in_seconds, and needs_refresh.

auth_clear_sessionA

Clear the active session token from memory.

After this call HTTP tools will fall back to API_BEARER_TOKEN (if configured) or make unauthenticated requests.

Returns

dict {"ok": True, "message": "Session cleared."}.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 19 tools

Disambiguation4/5

Most tools have distinct purposes, but there is some overlap between exec_function_preview and exec_proc_preview, which both execute PostgreSQL functions/procedures with similar parameters. The HTTP tools (http_get, http_post, etc.) are clearly differentiated by HTTP method, and auth tools are well-separated. Overall, the descriptions help clarify boundaries, but the function/procedure execution tools could cause confusion.

Naming Consistency5/5

Tool names follow a highly consistent snake_case pattern with clear verb_noun structures. Auth tools use auth_ prefix (e.g., auth_clear_session), HTTP tools use http_ prefix (e.g., http_get), and database tools use descriptive verbs like describe_, exec_, insert_, list_, preview_. There are no deviations in naming style across the set.

Tool Count4/5

With 19 tools, the count is slightly high but reasonable for a workbench server that combines authentication, HTTP operations, and database interactions. It covers multiple domains comprehensively without being excessive. A few tools might be consolidated (e.g., the two function execution tools), but overall the scope justifies the number.

Completeness5/5

The toolset provides complete coverage for its intended domains: authentication (session management), HTTP operations (full CRUD via different methods), and PostgreSQL database interactions (querying, inserting, describing objects, executing functions). There are no obvious gaps; agents can perform end-to-end workflows involving data retrieval, manipulation, and API calls with proper auth handling.

Maintenance

ActivityMaintained
ResponsivenessNo issues