Skip to main content
Glama
mcpsmiths

cost-guard-mcp

check_credentials

Read-only

Verify engine credentials and connectivity with a yes/no signal before running queries. Call after configuring BigQuery, Snowflake, or Databricks to debug failed tool calls.

Instructions

Verify credentials/connectivity for an engine without running a real query or a dry-run estimate. What runs: BigQuery - one metadata call (the service-account lookup). Snowflake - login, USE WAREHOUSE when a warehouse is given, SELECT CURRENT_WAREHOUSE() when none is, SHOW WAREHOUSES LIKE for the pinned warehouse, and only when that row says STARTED one session-context SELECT. Databricks - one control-plane GET of the configured SQL warehouse (Warehouses API), and only when it is RUNNING a session running SELECT current_user(). Call this once after configuring a new engine (or when a real tool call fails) to get a fast, clear yes/no signal instead of debugging via trial queries.

Compute disclosure: on Snowflake and Databricks the session-context statement runs on the
named (or default/configured) warehouse session, which could resume a suspended or start a
stopped warehouse and bill compute - which is why the state is read first and the statement
is not run on a warehouse that is not STARTED (Snowflake: ok=true with a detail built from
the SHOW WAREHOUSES row) or not RUNNING (Databricks: ok=false, no session opened). The
operator opt-ins COST_GUARD_SNOWFLAKE_ALLOW_WAREHOUSE_RESUME=true and
COST_GUARD_DATABRICKS_ALLOW_WAREHOUSE_START=true skip the state read and run the statement
regardless.

Input Schema

NameRequiredDescriptionDefault
engineYes
warehouseNo

Output Schema

NameRequiredDescriptionDefault
okYes
detailYes
engineYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations by enumerating the exact operations per engine and disclosing a genuine cost risk: the session-context statement could resume/start a warehouse and bill compute. It documents the state-check guard, the resulting behavior (ok=true with detail, or ok=false with no session), and the opt-in env vars that bypass it.

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

Conciseness4/5

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

Front-loaded with the core purpose and the call trigger. The engine-specific detail and compute disclosure are dense but each sentence carries real information. Slightly heavy for a two-parameter diagnostic tool, but not padded.

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

Completeness5/5

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

Given output schema exists (so return-shape need not be explained) and annotations cover safety, the description fills the remaining gaps: exact operations, cost side effects, and operator overrides. An agent needs nothing more to call it correctly or interpret the outcome.

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 coverage is 0%, but the engine parameter is a self-explanatory enum and the description provides rich behavioral context per engine value. The warehouse parameter's role is implied ('when a warehouse is given', 'the pinned warehouse'), though its null/default semantics and any constraints aren't spelled out.

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?

States a specific verb (verify) and resource (credentials/connectivity) with an explicit scope boundary: 'without running a real query or a dry-run estimate.' This sharply distinguishes it from the siblings estimate_query_cost and run_query_bounded, which do exactly those things.

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

Usage Guidelines5/5

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

Explicitly specifies when to call: 'once after configuring a new engine (or when a real tool call fails)' to get a fast yes/no signal 'instead of debugging via trial queries.' This names both the trigger conditions and the alternative (trial queries) it replaces.

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