Skip to main content
Glama

dependency_analysis

Assess dependencies between database objects - views, functions, triggers, sequences, and foreign data wrappers - across schemas and tables to understand impact before modifying or dropping objects.

Instructions

Comprehensive dependency analysis - views, functions, triggers, sequences, FDW.

LEVEL: Database ↔ Schema ↔ Table (multi-level tool)

  • schema='all': Database level - dependencies for ALL schemas

  • schema='': Schema level - dependencies in that schema (supports ANY schema name: 'sales', 'billing', 'auth', 'analytics', etc.)

  • table='users': Table level - what depends on this specific table

REQUIRED: Specify schema explicitly - use 'all' for all schemas or a specific schema name.

USE FOR: dependencies, views, functions, triggers, sequences, extensions, FDW, lineage, "what depends on this table?", "what views exist?", impact analysis before DROP. DO NOT USE FOR: table structure (use get_schema), index analysis (use maintenance_analysis), security permissions (use security_audit).

INCLUDE OPTIONS:

  • 'all': Everything (default)

  • 'views': Views, materialized views, view dependencies

  • 'functions': User-defined functions, trigger functions

  • 'triggers': Triggers on tables

  • 'sequences': Sequences and their usage

  • 'extensions': Installed PostgreSQL extensions

  • 'fdw': Foreign data wrappers, foreign servers, foreign tables

Examples: dependency_analysis() - All dependencies in public schema (default) dependency_analysis(schema='all') - Database-wide analysis dependency_analysis(schema='billing') - Dependencies in billing schema dependency_analysis(table='users') - What depends on users table dependency_analysis(include='views') - Only view dependencies dependency_analysis(include='functions') - Only functions dependency_analysis(include='triggers') - Only triggers dependency_analysis(include='fdw') - Foreign data wrappers only

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaNoSchema to analyze. Omit for all schemas, or specify one. Use get_schema() to list available.
includeNoWhat to include: 'all', 'views', 'functions', 'triggers', 'sequences', 'extensions', 'fdw'all
tableNoOptional: analyze dependencies for specific table
formatNoOutput format: 'json' or 'markdown'json
urlNoDatabase URL for auto-connection
summary_onlyNoReturn only summary counts, not detailed object lists

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Since no annotations are provided, the description carries full burden. It details multi-level behavior (database, schema, table), required parameters, include options, and default behavior. It also provides examples showing how the tool responds to different inputs, making its behavior fully transparent.

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?

The description is comprehensive but relatively lengthy. However, it is well-organized with clear sections, bullet points, and examples. Every sentence provides useful information, so the length is justified.

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?

Given the tool's complexity, the description covers all necessary aspects: purpose, usage guidelines, behavioral details, parameter semantics, and examples. The presence of an output schema further reduces the need for return value documentation. The description is fully complete.

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

Parameters5/5

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

Schema coverage is 100% for all 6 parameters, and the description adds significant value beyond the schema by providing usage context, default behavior, and examples for each parameter (e.g., explaining 'all' vs specific schema names, listing all include values).

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 clearly identifies the tool as performing dependency analysis on database objects (views, functions, triggers, sequences, FDW) and distinguishes from siblings by explicitly stating 'DO NOT USE FOR' alternatives like table structure, index analysis, and security permissions.

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?

The description provides explicit 'USE FOR' and 'DO NOT USE FOR' sections, lists concrete scenarios (impact analysis, lineage, what depends on a table), and names sibling tools as alternatives (get_schema, maintenance_analysis, security_audit).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/snss10/DBeast'

If you have feedback or need assistance with the MCP directory API, please join our Discord server