Skip to main content
Glama
egarcia74

Warp SQL Server MCP

by egarcia74

get_index_recommendations

Analyze database performance and generate index recommendations to optimize SQL Server queries and improve execution efficiency.

Instructions

Get index recommendations for database optimization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseNoDatabase name (optional)
schemaNoSchema name (optional, defaults to dbo)
limitNoMaximum number of recommendations to return (optional, defaults to 10)
impact_thresholdNoMinimum impact score threshold (0-100, optional)

Implementation Reference

  • Primary handler for the get_index_recommendations tool. Delegates to QueryOptimizer.analyzeIndexUsage and formats JSON response.
    async getIndexRecommendations(database) {
      try {
        const recommendations = await this.queryOptimizer.analyzeIndexUsage(database);
        return [
          {
            type: 'text',
            text: JSON.stringify(
              {
                success: true,
                data: recommendations
              },
              null,
              2
            )
          }
        ];
      } catch (error) {
        throw new McpError(ErrorCode.InternalError, error.message);
      }
    }
  • Core implementation logic for generating index recommendations (placeholder implementation). Called by main handler.
    async analyzeIndexUsage(database) {
      // Basic index recommendations - this would normally query SQL Server DMVs
      return {
        database,
        timestamp: new Date().toISOString(),
        recommendations: [
          {
            type: 'missing_index',
            priority: 'high',
            suggestion: 'Consider adding indexes on frequently queried columns',
            impact: 'Could improve query performance by 50-80%',
            table: 'example_table',
            columns: ['column1', 'column2']
          }
        ],
        unusedIndexes: [],
        duplicateIndexes: [],
        fragmentedIndexes: []
      };
    }
  • Tool definition with name, description, and input schema used for MCP tool listing and validation.
      name: 'get_index_recommendations',
      description: 'Get index recommendations for database optimization',
      inputSchema: {
        type: 'object',
        properties: {
          database: { type: 'string', description: 'Database name (optional)' },
          schema: { type: 'string', description: 'Schema name (optional, defaults to dbo)' },
          limit: {
            type: 'number',
            description: 'Maximum number of recommendations to return (optional, defaults to 10)'
          },
          impact_threshold: {
            type: 'number',
            description: 'Minimum impact score threshold (0-100, optional)'
          }
        }
      }
    },
  • index.js:328-331 (registration)
    Dispatch case in the main tool request handler switch statement that routes to the tool handler.
    case 'get_index_recommendations':
      return {
        content: await this.getIndexRecommendations(args.database)
      };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool's purpose but doesn't reveal key traits like whether it's read-only, requires specific permissions, has side effects, returns structured data, or handles errors. For a tool with 4 parameters and no annotation coverage, this is a significant gap in transparency.

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, efficient sentence with zero wasted words. It's front-loaded with the core purpose ('Get index recommendations') and avoids redundancy, making it appropriately sized for its informational content.

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?

Given the complexity of a 4-parameter tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'index recommendations' entail (e.g., format, criteria), how results are returned, or usage context, leaving gaps that could hinder effective tool selection and 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 input schema has 100% description coverage, clearly documenting all 4 optional parameters with their types and defaults. The description adds no parameter-specific information beyond implying 'database optimization' context, so it meets the baseline of 3 where the schema does the heavy lifting without compensating value.

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 action ('Get index recommendations') and purpose ('for database optimization'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from sibling tools like 'get_optimization_insights' or 'detect_query_bottlenecks' which might also relate to database optimization, missing explicit differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context (e.g., during performance tuning), or exclusions, leaving the agent to infer usage from the tool name alone among many database-related siblings.

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/egarcia74/warp-sql-server-mcp'

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