Skip to main content
Glama

get_table_columns

Read-only

Retrieve column names and data types for one or more tables in a data source to verify column details before writing SQL queries.

Instructions

Get the column names and data types for one or more tables in a data source. Accepts a single table or a comma-separated list of tables. Use this to confirm exact column names and types before writing SQL with run_query or smart_query. Returns each table's columns; if a table name is not found, it suggests verifying it with list_tables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYesTable name(s), comma-separated (e.g., 'users' or 'users,orders')
data_source_idYesData source ID from list_data_sources
Behavior4/5

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

Annotations already declare readOnlyHint=true. The description adds useful behavioral context (returns each table's columns, handles missing tables) but omits potential details like pagination or limits.

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?

Three concise sentences, front-loaded with key action and parameters, no unnecessary 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?

No output schema exists; description mentions return type but lacks details on format (e.g., array of objects with name/type fields). Also does not specify limits on number of tables.

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 coverage is 100% and already describes both parameters. The description reiterates that table_name accepts comma-separated values, which is already in schema, adding minimal semantic value.

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 retrieves column names and data types for one or more tables, and explicitly differentiates from siblings by advising use before run_query or smart_query and suggesting list_tables for verification.

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?

Provides explicit usage guidance: 'Use this to confirm exact column names and types before writing SQL with run_query or smart_query' and includes fallback advice to use list_tables if a table name is not found.

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/seob717/redash-mcp'

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