Skip to main content
Glama
ThinAirTelematics

ThinAir Data

Official

impact_analysis

Analyze the blast radius of database schema changes: detect foreign key dependencies, affected views, row counts, and assign a risk score. Supports PostgreSQL, MySQL, SQL Server.

Instructions

Analyze the blast radius of a proposed schema change: FK dependencies, affected views, row count, risk score. [ARCHITECT tier]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • bin/server.js:32-174 (registration)
    The tool 'impact_analysis' is declared in the static TOOLS array as part of the reference adapter's tool catalog. This array is returned by the ListToolsRequestSchema handler.
    const TOOLS = [
      // DISCOVER tier (free)
      {
        name: "query_sql",
        description:
          "Execute a read-only SQL query against the target connection. ONLY SELECT / WITH / EXPLAIN permitted. Write dialect-appropriate SQL for the connection's engine — PostgreSQL syntax for postgres, T-SQL for mssql, MySQL for mysql. Response meta includes `connection` + `dialect` so you know which syntax worked. Default LIMIT 100 unless the user asks for all rows.",
        inputSchema: { type: "object" },
      },
      {
        name: "describe_schema",
        description:
          "Discover the full database schema: tables, columns, types, primary keys, foreign keys, and indexes. Results cached 1 hour. Call with refresh=true after schema changes.",
        inputSchema: { type: "object" },
      },
      {
        name: "analyze_table",
        description:
          "QUICK statistical snapshot for ONE table — row count, null rates, cardinality, numeric min/max/avg, date ranges. Optionally drill into a specific column. Use `data_profile` when the user wants a FULL quality report including PII detection.",
        inputSchema: { type: "object" },
      },
      {
        name: "detect_anomalies",
        description:
          "Scan a table for unusual patterns: volume drops/spikes, data gaps, value concentration, high null rates, stale data. Severity-ranked alerts. Tables > 100k rows use a sampled path (~5%). Dialect-aware sampling.",
        inputSchema: { type: "object" },
      },
      {
        name: "suggest_queries",
        description:
          "Generate schema-aware query suggestions with ready-to-run SQL. Great for exploring unfamiliar databases or finding useful queries.",
        inputSchema: { type: "object" },
      },
      {
        name: "test_connection",
        description:
          "Ping a connection (SELECT 1) and return server version + latency. Fast way to confirm credentials and network path without running describe_schema.",
        inputSchema: { type: "object" },
      },
      {
        name: "list_connections",
        description:
          "List every database connection registered for your tenant: name, id, dbType (postgres / mysql / mssql), createdAt. Flags duplicate names. Returns nothing sensitive (no DSN, no credentials).",
        inputSchema: { type: "object" },
      },
      {
        name: "quota",
        description:
          "Check current API usage, daily limit, plan name, and upgrade options.",
        inputSchema: { type: "object" },
      },
      {
        name: "issue_api_key",
        description:
          "Issue a fresh ta_data_* API key for your current tenant. Useful for pasting into /add-database or configuring a separate integration. Rate-limited to 5 issuances per tenant per day.",
        inputSchema: { type: "object" },
      },
      // BUILD tier
      {
        name: "explain_query",
        description:
          "Analyze a SQL query's execution plan and return plain-English performance recommendations. Runs EXPLAIN ANALYZE (Postgres) or EXPLAIN FORMAT=JSON (MySQL). [BUILD tier]",
        inputSchema: { type: "object" },
      },
      {
        name: "optimize_query",
        description:
          "Suggest a rewritten, optimized version of a SQL query with explanations. Identifies sequential scans, missing indexes, sort spills, join inefficiencies, and suggests index DDL. [BUILD tier]",
        inputSchema: { type: "object" },
      },
      {
        name: "data_profile",
        description:
          "FULL data quality + compliance report for a table: per-column stats PLUS a 0-100 health score, type-gated PII detection (email / phone / SSN / etc.), and insight warnings. Use this when the user says 'profile' or 'quality report' or mentions PII/compliance. [BUILD tier]",
        inputSchema: { type: "object" },
      },
      {
        name: "query_history",
        description:
          "Return recent queries executed through ThinAir with timing, row counts, and status. [BUILD tier]",
        inputSchema: { type: "object" },
      },
      {
        name: "saved_queries",
        description:
          "Manage your personal library of reusable SELECT queries. action=save stores a query by name; action=run executes a saved query; action=list returns all your saved queries; action=delete removes one. [BUILD tier]",
        inputSchema: { type: "object" },
      },
      {
        name: "generate_migration",
        description:
          "Generate dialect-correct ALTER TABLE migration SQL + rollback from a plain-English intent. Output uses the connection's exact dialect. Never executes. [BUILD tier]",
        inputSchema: { type: "object" },
      },
      {
        name: "generate_seed_data",
        description:
          "Generate realistic, schema-aware INSERT statements for development and testing. Respects types, constraints, and FK relationships. Never executes. [BUILD tier]",
        inputSchema: { type: "object" },
      },
      {
        name: "show_locks",
        description:
          "List active sessions + blocking locks. Uses the dialect's own system view: `pg_stat_activity` on postgres, `information_schema.processlist` on mysql, `sys.dm_exec_requests` joined with `sys.dm_tran_locks` on mssql. [BUILD tier]",
        inputSchema: { type: "object" },
      },
      {
        name: "pii_scan",
        description:
          "Sweep string columns across tables for common PII patterns (email, SSN, credit card, phone, JWT, bearer tokens). Heuristic-only — not a compliance guarantee. [BUILD tier]",
        inputSchema: { type: "object" },
      },
      // ARCHITECT tier
      {
        name: "watch_table",
        description:
          "Monitor a table's row count and latest record. Compares to previous snapshot to show changes. Built-in scheduler. [ARCHITECT tier]",
        inputSchema: { type: "object" },
      },
      {
        name: "find_n_plus_one",
        description:
          "Detect N+1 query patterns from recent query history. Fingerprints queries and flags repeated patterns. [ARCHITECT tier]",
        inputSchema: { type: "object" },
      },
      {
        name: "query_firewall",
        description:
          "Manage per-connection SQL rules: block dangerous patterns, require WHERE on large tables, log PII access. [ARCHITECT tier]",
        inputSchema: { type: "object" },
      },
      {
        name: "impact_analysis",
        description:
          "Analyze the blast radius of a proposed schema change: FK dependencies, affected views, row count, risk score. [ARCHITECT tier]",
        inputSchema: { type: "object" },
      },
      {
        name: "cross_db_query",
        description:
          "Run a federated query across multiple connections (different dialects). Returns a unified result set with per-source provenance. [ARCHITECT tier]",
        inputSchema: { type: "object" },
      },
    ];
  • All tool calls (including 'impact_analysis') are handled by a single generic handler that returns a redirect message pointing users to the hosted production endpoint. There is no actual execution logic for impact_analysis in this codebase — it's a stub adapter.
    server.setRequestHandler(CallToolRequestSchema, async () => ({
      content: [{ type: "text", text: REDIRECT_MESSAGE }],
      isError: false,
    }));
Behavior2/5

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

With no annotations provided, the description must convey behavioral traits. It indicates analysis of proposed changes, suggesting read-only behavior, but does not explicitly state whether it modifies data, required permissions, or whether it is safe to run. Lacks details on side effects or risk level.

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 a single, front-loaded sentence with a concise list of analysis aspects. Every word serves a purpose; the [ARCHITECT tier] tag adds context. No wasted words.

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

Completeness3/5

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

For a tool with no parameters and no output schema, the description covers what it does but omits output format or return value. It lists what it analyzes but does not specify how results are presented (e.g., risk score as number, report). Adequate but could be more complete.

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?

The input schema has no parameters, so the description does not need to add parameter info. Baseline is 4 for zero parameters. The description adds no parameter details, which is acceptable.

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 clearly states the tool's purpose: analyzing blast radius of schema changes. It lists specific aspects (FK dependencies, affected views, row count, risk score) and distinguishes itself from siblings like analyze_table or describe_schema by focusing on impact analysis of proposed changes.

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

Usage Guidelines2/5

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

The description implies use for schema change impact analysis but does not provide explicit guidance on when to use this tool versus alternatives (e.g., analyze_table, describe_schema). No exclusions or context-specific recommendations are given.

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/ThinAirTelematics/thinair-data'

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