Skip to main content
Glama
ncejda-g2

Snowflake MCP Server

by ncejda-g2

Show Tables

show_tables

Explore Snowflake table hierarchies using pattern-based filtering. Filter by database, schema, or table patterns to locate relevant tables and understand the data landscape.

Instructions

Browse databases, schemas, and tables using pattern-based filtering.

USE THIS WHEN: You want to explore what databases/schemas exist, or need to filter by exact patterns.
Like SQL's: SHOW TABLES IN database LIKE 'pattern'

RETURNS (small result): hierarchical tree
- database → schema → list of tables

RETURNS (broad result): when the matching tree is too large to return inline
(e.g. show_tables() with no filter, or a broad database_pattern matching tens
of thousands of tables), the COMPLETE tree is written to a temp `.json` file
and the response is instead a compact summary built to help you NARROW:
`total_tables`, `total_schemas`, `results_file`, and a bounded breakdown that
adapts to what's left to narrow -- `top_schemas` (db.schema=count) when the
result is a single database, else `top_databases` (db=count) -- each with a
`(+X more ..., Y tables)` tail marker, plus a `spilled` hint.

To act on a spilled result, prefer RE-CALLING show_tables with a tighter
database_pattern/schema_pattern (served from cache, no Snowflake) until it
fits inline. To read results_file directly instead -- it is compact JSON
nested THREE levels deep, `{"DB": {"SCHEMA": ["TABLE", ...]}}` (so table
names are the innermost array, not a key) -- list its schemas WITHOUT loading
every table name into context:
  jq -r 'to_entries[]|.key as $d|.value|keys[]|"\($d).\(.)"' <results_file>
or, if jq is unavailable:
  python3 -c "import json,sys;d=json.load(open(sys.argv[1]));print(chr(10).join(f'{db}.{s}' for db,sc in d.items() for s in sc))" <results_file>
Mind the nesting depth when counting: `jq '[.[][][]]|length'` counts TABLES
(three flattens to reach the leaf array); `jq '[.[][]]|length'` counts
SCHEMAS. (total_tables/total_schemas in the summary already give both.)

HOW IT WORKS:
- Auto-refreshes cache if expired/empty (requires Snowflake auth on first use)
- Uses cached data if available (no auth needed)
- Pattern matching is case-insensitive substring search

Parameters:
- database_pattern: Filter databases (e.g., "SALES" matches "SALES_DB", "SALES_PROD")
- schema_pattern: Filter schemas (e.g., "PUBLIC")
- table_pattern: Filter tables (e.g., "CUSTOMER" matches "CUSTOMERS", "CUSTOMER_ORDERS")

Examples:
- show_tables() - Browse all databases
- show_tables(database_pattern="SALES") - Only SALES databases
- show_tables(schema_pattern="PUBLIC") - All PUBLIC schemas across databases

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_patternNo
schema_patternNo
database_patternNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.0.3
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / database_pattern / title
      Removed value: -"Database Pattern"
    • removedInput schema / properties / schema_pattern / title
      Removed value: -"Schema Pattern"
    • removedInput schema / properties / table_pattern / title
      Removed value: -"Table Pattern"
  2. Changed1 schema field changedv1.0.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  3. First observedv0.2.3

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description fully carries the behavioral disclosure burden. It richly explains return formats for small vs broad results, spill-to-file behavior, cache refresh and authentication needs, pattern-matching semantics, and even provides jq/python commands for interacting with spilled results.

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?

Although long, the description is well-structured with clear sections: use case, return behavior, how it works, parameters, and examples. The density is justified by the tool's non-trivial spill behavior; every section earns its place and information is front-loaded.

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?

The description is exceptionally complete given no output schema exists. It covers return values in both normal and spilled cases, parameter usage, cache behavior, authentication, and concrete examples. An agent has everything needed to call this tool correctly and interpret either response form.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate, and it does: each of the three parameters is explained with matching examples and substring semantics. It adds far more meaning than the bare schema, which only provides type and default information.

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

Purpose4/5

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

The description states a clear purpose: browse databases, schemas, and tables with pattern-based filtering, and explicitly compares to SQL's SHOW TABLES. It is specific about the resource and operation, though it does not explicitly differentiate itself from siblings like find_tables or describe_table.

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 'USE THIS WHEN' section gives explicit guidance for when the tool is appropriate: exploring existing databases/schemas or filtering by exact patterns. It provides clear context but does not mention when not to use it or name alternative sibling tools.

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