Skip to main content
Glama

Tables Get Table Ddl

tables_get_table_ddl
Read-onlyIdempotent

Retrieve the exact CREATE OR REPLACE TABLE or VIEW DDL for a Snowflake object to inspect, replicate, or version its schema definition.

Instructions

Retrieve the exact CREATE OR REPLACE TABLE/VIEW DDL definition for an object.

Input Schema

NameRequiredDescriptionDefault
object_nameYes
object_typeNoTABLE

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.4

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds that the returned content is an exact CREATE OR REPLACE statement, which is useful, but says nothing about permissions needed, whether the object must exist, or error behavior for missing objects.

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?

A single sentence that front-loads the action and the return artifact with no filler. Nothing can be trimmed without losing information.

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?

An output schema exists, so return-value structure need not be explained. However, for a tool with 0% parameter description coverage and a broad sibling set, the description leaves naming conventions, object_type semantics, and prerequisites unstated.

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

Parameters3/5

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

Schema description coverage is 0%, so the description carries the burden. It partially compensates by implying the object_type values (TABLE/VIEW) and that a single object is targeted, but gives no guidance on object_name format (e.g., fully qualified database.schema.name) or the default of object_type.

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?

States a specific verb (Retrieve) and resource (the exact CREATE OR REPLACE TABLE/VIEW DDL definition) for an object. It is distinguishable from tables_describe_table and databases_get_database_ddl by returning DDL rather than column metadata or database-level DDL, though it does not name those siblings explicitly.

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?

There is no statement of when to use this tool versus alternatives such as tables_describe_table, tables_list_tables, or databases_get_database_ddl. The use case (reconstructing an object's definition) must be inferred entirely from the verb.

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

Deploy Server

Other Tools