Skip to main content
Glama
elekto-com-br

Elekto MCP for SQL Server

Official

User function definition

get_function_definition
Read-onlyIdempotent

Reads the CREATE FUNCTION text for one user-defined SQL function, so you can review its definition found via list_functions. Returns null when the login lacks read permission.

Instructions

Returns the CREATE FUNCTION text of one user-defined function. Use it to read or review a function found with list_functions; this server never executes functions. A function the login can see but not read comes back with definition null and definition_visible false.

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantive behavior beyond them: the server never executes functions, and unreadable-but-visible functions return definition null with definition_visible false. That permission-driven return behavior is exactly the kind of trait an agent could not infer from the schema.

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, zero filler, with the core purpose front-loaded and the permission caveat and non-execution guarantee following logically. Every sentence earns its place.

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, and the description compensates by explaining the returned payload (CREATE FUNCTION text) and the null/false outcome for restricted functions. With a well-documented 3-param schema and covered safety annotations, nothing an agent needs is missing.

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% (schema, database, function all documented with examples and defaults), so the schema carries parameter meaning. The description adds nothing further about parameter format or the empty-schema wildcard behavior, 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?

Specific verb and resource: 'Returns the CREATE FUNCTION text of one user-defined function.' It clearly differentiates itself from siblings like get_procedure_definition and get_view_definition by naming the exact object type and payload.

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?

Names the workflow it belongs to ('use it to read or review a function found with list_functions') and clarifies the server never executes functions, giving clear context for selection. It stops short of stating explicit when-not-to-use conditions or naming a directly competing sibling.

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