Skip to main content
Glama
elekto-com-br

Elekto MCP for SQL Server

Official

Table usage

get_table_usage
Read-onlyIdempotent

Identifies all foreign keys, views, procedures, and functions that reference a table, enabling impact analysis before schema changes.

Instructions

Lists everything that references one table: foreign keys to and from it, and the views, procedures and functions whose code uses it. Use it for impact analysis before changing a table; for the dependency graph of the whole database use get_dependency_graph. sql_module_usage is null when the login cannot read dependencies, and 'visibility' says when the list may be incomplete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable name, bare, with no schema prefix.
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.5/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, so the bar is lower, and the description adds real operational context: sql_module_usage is null when the login cannot read dependencies, and 'visibility' flags when the list may be incomplete. This permission-dependent degradation is genuinely useful and not derivable from the annotations, though it does not cover rate limits or pagination.

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 tight sentences, front-loaded with the core behavior and followed by routing and caveats. No filler; every clause carries information.

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?

No output schema exists, so the description compensates by naming the returned fields that matter (sql_module_usage, visibility) and explaining their edge cases. Combined with full schema coverage and safety annotations, an agent has everything needed to call and interpret it.

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 100%, so all three parameters (table, schema, database) are already documented in the schema, including the empty-schema-means-all-schemas behavior and the bare-name constraint. The description adds no further parameter meaning, so the baseline 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 and resource ('Lists everything that references one table') and enumerates the exact reference kinds returned: foreign keys in/out plus views, procedures and functions using it. It explicitly differentiates itself from the sibling get_dependency_graph, so an agent can distinguish the two without opening schemas.

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?

Gives an explicit use case ('impact analysis before changing a table') and names the alternative for the other case ('for the dependency graph of the whole database use get_dependency_graph'). Both the when-to-use and the when-to-use-something-else are stated.

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