Skip to main content
Glama
jgravelle
by jgravelle

ingest_sql_log

Ingest SQL log files (CSV, JSONL, .gz) to parse table and column references, redact sensitive data, and roll up usage per fingerprint, enabling unused column and data health analysis.

Instructions

Ingest a SQL log file (pg_stat_statements CSV or generic JSONL, .gz transparently) into the per-dataset runtime tables. Each query is parsed for table + column refs, redacted at the chokepoint (string + numeric literals + cell-PII registry), and rolled up into runtime_query_calls keyed by (fingerprint, table, column). Tables in the log that don't match any indexed dataset count as unmapped. Foundational primitive for find_unused_columns, check_column_drop_safe, and data_health_radar (v1.6.0 sibling-parity Phase 1).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
redactNoScrub PII / literals before persisting. Default true.
sourceNopg_stat_statements | jsonl | auto (default — sniff by extension).auto
max_rowsNoHard cap on ingested rows. Default 100000.
file_pathYesPath to a CSV / JSONL / .gz log file.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Since annotations only provide readOnlyHint=false, the description adds meaningful behavioral detail: parsing formats, redaction of string/numeric literals plus cell-PII registry, roll-up into runtime_query_calls keyed by (fingerprint, table, column), and handling of unmapped tables. It does not address idempotency or overwrite semantics, but the disclosure goes well beyond the annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three concise sentences: main action, processing pipeline, and upstream/downstream context. Each sentence earns its place, and the front-loaded first sentence immediately conveys the tool's purpose. The version/phase reference is minor but does not detract.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has one required parameter and no output schema, so the description adequately covers input formats, processing steps, persistence location, and relationship to other tools. It does not specify return values or failure modes, but for an ingest primitive this is a reasonable completeness level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description enriches parameter meaning by explaining transparent .gz support, the redaction pipeline, and what 'unmapped' means. It translates parameter choices into runtime behavior without replacing the schema's own field descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Ingest') and clearly identifies the resource and destination: SQL log files (pg_stat_statements CSV or JSONL) into per-dataset runtime tables. It also names downstream consumers (find_unused_columns, check_column_drop_safe, data_health_radar), distinguishing it from the analytical sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description positions the tool as a 'foundational primitive' for specific downstream analysis features, making the intended usage context clear. It does not explicitly state when not to use it or offer alternatives, but the role as an ingestion step is evident from the phrasing and sibling tool list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/jgravelle/jdatamunch-mcp'

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