Skip to main content
Glama
elekto-com-br

Elekto MCP for SQL Server

Official

Table structure

get_table_schema
Read-onlyIdempotent

Retrieve the full structure of a table or view: columns, types, constraints, and indexes, to learn exact column names and types before querying. For view SQL text, use get_view_definition.

Instructions

Returns the full structure of one table or view: columns with an unambiguous type_declaration (such as 'nvarchar(250)'), max_length_chars, every extended property, computed-column definitions and whether they are persisted; plus primary key, foreign keys, check and unique constraints, and indexes with key column order and declared key width. Call it before query_table to learn exact column names and types; for a view's SQL text use get_view_definition. max_length is the raw sys.columns value in BYTES, so reason about text length with type_declaration or max_length_chars.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable name, bare, with no schema prefix. Example: 'GenericSecurity'
schemaNoTable schema. Empty searches every schema. Example: 'Feeder'
databaseYesName of the database as registered in the configuration.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive behavior, so the safety profile is covered. The description adds real interpretive value beyond that — the warning that max_length is a raw sys.columns BYTES value and that type_declaration/max_length_chars should be used instead — which prevents a common agent error.

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 statement of what is returned, followed by a dense enumeration of return contents and a usage/caveat sentence. It is long but information-dense; the enumerated return fields are justified because no output schema exists.

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?

With no output schema, the description carries the burden of describing return values and does so thoroughly, listing every included element plus key interpretation caveats. An agent has everything needed to call and interpret this tool correctly.

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%, so the schema already documents table, schema, and database parameters including the bare-name format and empty-schema-wildcard behavior. The description adds nothing parameter-specific beyond the notion of one table or view, so the baseline of 3 applies.

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+resource (returns the full structure of a table or view) and enumerates exactly what is included: columns, type declarations, extended properties, computed columns, keys, constraints, and indexes. It is clearly distinguishable from siblings like get_view_definition or list_tables.

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 tells the agent when to call it ('before query_table to learn exact column names and types') and names the alternative for a related need ('for a view's SQL text use get_view_definition'). The routing decision is unambiguous.

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