Skip to main content
Glama
igorolv

jdbc-mcp-server

getRoutineDefinition

getRoutineDefinition
Read-onlyIdempotent

Retrieve the complete definition and body of any function, procedure, or package to inspect its logic and understand database behavior.

Instructions

Return the source code of one known function, procedure or package, including its body where available. Use listRoutines to discover routine names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
schemaNo
connectionYesDatabase to run against. Call listConnections for valid names; do not guess.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds one useful behavioral nuance: the body is included 'where available', implying some routines may have no body. It does not contradict annotations, though it does not discuss error behavior or permissions.

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?

Two sentences with no filler: the primary behavior is front-loaded and the discovery pointer is a single clear clause. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the core return value (source code, body where available) and directs agents to listRoutines for discovery, while annotations cover the safety profile. The main gap is the undocumented optional schema parameter and absence of not-found/error behavior, but for a simple read-only getter this is nearly complete.

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

Parameters2/5

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

Schema description coverage is only 33%, with only connection documented. The description adds meaning for name by calling it a known routine and pointing to listRoutines, but the optional schema parameter is never explained and name lacks format details. With low schema coverage, the description only partially compensates.

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 states a specific action ('Return the source code') on a defined resource ('one known function, procedure or package') and clarifies scope with 'including its body where available.' It also points to listRoutines for discovery, which helps differentiate it from search-oriented siblings.

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?

It explicitly tells agents to use listRoutines to discover routine names, which provides clear context for when to use that sibling first. It does not spell out exclusions like triggers/views, but the 'known' routine requirement implies this tool is for direct retrieval, not discovery.

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