Skip to main content
Glama

cost_optimize_database

Scan database queries and schema to uncover cost optimization opportunities. Get actionable recommendations to reduce database expenses.

Instructions

Analyze database queries and schema for cost optimization opportunities (Pro feature)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNo
db_typeYesDatabase type
directoryYesProject source directory
Behavior3/5

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

No annotations are provided, so the description carries the burden of behavioral disclosure. 'Analyze' implies a non-mutating analysis operation and 'Pro feature' signals an entitlement/authorization aspect, but it omits expected output, api_key usage, and whether it needs a live database connection.

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 a single sentence with a front-loaded verb and no redundancy. It conveys the core purpose and the Pro restriction in under fifteen words.

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

Completeness2/5

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

With no output schema and no annotations, the agent is left guessing what the tool returns, whether it inspects local source only or connects to a database, and how the optional api_key is used. For a tool with three parameters and no output schema, this is insufficient context for reliable 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?

The schema already documents directory and db_type, covering 67% of parameters. The description adds context that the analysis focuses on queries and schema but offers little for api_key, whose purpose remains undocumented; the 'Pro feature' hint is the only indirect clue.

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?

States a specific verb ('Analyze'), a clear resource ('database queries and schema'), and an explicit goal ('cost optimization opportunities'). It is immediately distinct from sibling cost tools like cost_optimize_docker and clearly scoped to database contexts.

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

Usage Guidelines3/5

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

The description implies the tool is for database cost-optimization analysis, and the 'Pro feature' note hints at access requirements. However, it does not explicitly say when to choose this over alternatives such as cost_analyze_infra or query_analyze_slow, nor does it give exclusion criteria.

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/barnburner121/claude-plugin-marketplace'

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