Skip to main content
Glama
call518

MCP PostgreSQL Operations

get_user_functions_stats

Analyze PostgreSQL user-defined function performance statistics including execution counts, timing data, and bottlenecks to optimize database operations.

Instructions

[Tool Purpose]: Analyze performance statistics for user-defined functions

[Exact Functionality]:

  • Show execution count and timing statistics for user functions

  • Calculate average execution time per function call

  • Identify performance bottlenecks in user-defined functions

  • Provide total and self execution time breakdown

[Required Use Cases]:

  • When user requests "function stats", "function performance", etc.

  • When analyzing user-defined function performance

  • When identifying slow or frequently called functions

  • When optimizing application function usage

[Strictly Prohibited Use Cases]:

  • Requests for function modification or optimization

  • Requests for statistics reset

  • Requests for function execution or testing

Args: database_name: Database name to analyze (uses default database if omitted)

Returns: User-defined function performance statistics including call counts and timing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by detailing what the tool does (performance analysis) and what it doesn't do (modification, reset, execution). It clarifies the tool is read-only and diagnostic, though it could add more on behavioral traits like data freshness or limitations.

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?

The description is well-structured with clear sections ([Tool Purpose], [Exact Functionality], etc.), front-loaded key information, and every sentence adds value without redundancy. It's appropriately sized for the tool's complexity.

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 moderate complexity, no annotations, and an output schema present, the description is complete. It covers purpose, functionality, usage guidelines, parameters, and returns, providing sufficient context for an agent to invoke it correctly without needing to explain return values.

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

Parameters4/5

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

The schema description coverage is 0%, but the description compensates by explaining the 'database_name' parameter as 'Database name to analyze (uses default database if omitted)', adding meaning beyond the bare schema. However, it doesn't detail format constraints or examples.

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 explicitly states the tool's purpose as 'Analyze performance statistics for user-defined functions' and details specific functionalities like execution count, timing statistics, and bottleneck identification. It clearly distinguishes from siblings by focusing on user functions rather than tables, indexes, or database-level metrics.

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 'Required Use Cases' (e.g., when user requests 'function stats') and 'Strictly Prohibited Use Cases' (e.g., requests for function modification), offering clear guidance on when to use this tool versus alternatives. It helps differentiate from siblings by specifying its niche in function performance analysis.

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/call518/MCP-PostgreSQL-Ops'

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