Skip to main content
Glama
platypus-db

platypus-db

Official

get_ddl

Retrieve the CREATE statement for a table, view, function, trigger, or other database object using its connection, schema, and name. Use it to inspect or recreate object definitions.

Instructions

Returns the CREATE statement of a table, view, function, trigger or other object.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "connection": "<connection>",
      "schema": "<schema>",
      "name": "<name>"
    },
    "name": "get_ddl"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoThe kind from `list_objects` (`table`, `view`, `function`, ...); looked up when left out.
nameYesThe object's name, as `list_objects` shows it.
schemaYesThe object's schema.
connectionYesThe connection's name, as `list_connections` shows it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.2

TDQS

B3.3/5.0
Behavior3/5

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

No annotations, so the description carries the load; it does disclose the return payload (a CREATE statement), which is the key behavioral fact. It says nothing about permissions, error behavior for missing objects, or whether output is truncated for large objects.

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?

One front-loaded sentence with zero waste; the object-kind enumeration efficiently signals scope.

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?

Adequate for a simple single-object read tool: input is fully documented via schema and the output type is named. Missing are error/missing-object behavior and any hint of how it relates to sibling introspection tools, but nothing essential blocks correct invocation.

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%, with each parameter documented and cross-referenced to list_connections/list_objects/kind fallback, so the schema does the heavy lifting. The description adds no parameter meaning beyond that, which is the baseline case.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Returns the CREATE statement of a table, view, function, trigger or other object.' An agent knows exactly what it gets, though it doesn't explicitly distinguish itself from sibling describe_table.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to choose this over describe_table, search_objects, or list_objects. The only implied usage is 'when you need DDL text', which the agent must infer.

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