Skip to main content
Glama

run_analyze

ANALYZE a PostgreSQL table to refresh planner statistics and improve query performance. Use dry_run to preview before applying; prior stats are audited.

Instructions

[WRITE][risk=medium] ANALYZE a table to refresh planner statistics.

No undo; captures prior stats for audit. Pass dry_run=True to preview.

Args:
    table: Table name (optionally schema-qualified).
    dry_run: If True, preview without running.
    target: Target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
targetNo
dry_runNo
Behavior4/5

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

The description discloses key behavioral traits: it is a write operation with medium risk, has no undo, captures prior stats for audit, and offers a dry_run option to preview. Despite no annotations being provided, these details give the agent sufficient context about the tool's safety and effects.

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 very concise, using a tag format ([WRITE][risk=medium]) and brief bullet-style argument list. Every sentence adds value: the action, risk, undo/audit note, dry_run tip, and parameter descriptions. No extraneous information.

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?

Given the lack of annotations and output schema, the description covers the essential behavioral and usage aspects: what the tool does, preconditions (no undo), risk level, and dry run. It does not detail return values or performance impact, but these are not expected for a maintenance tool with no output schema. Overall sufficient for an agent to use correctly.

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?

The description provides basic semantics for all three parameters: 'table' (optionally schema-qualified), 'dry_run' (preview behavior), and 'target' (from config, defaults omitted). However, the explanations are minimal, especially for 'target' which is vague. With 0% schema description coverage, the description compensates partially but not fully.

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?

The description clearly states the tool's action: 'ANALYZE a table to refresh planner statistics.' This is a specific verb and resource. However, it does not differentiate this tool from sibling tools like 'run_vacuum' or 'bloat_and_vacuum_analysis', which also perform maintenance. Lack of explicit distinction reduces the score from 5.

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 is provided on when to use this tool versus alternatives. The description implies usage for refreshing stats but does not mention when not to use it or which sibling tools might be more appropriate for related tasks (e.g., vacuuming, index 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/AIops-tools/Postgres-AIops'

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