Skip to main content
Glama
Garoth
by Garoth

validate_key

Check if your OpenAI API key is valid and properly configured for use with DALL-E image generation tools.

Instructions

Validate the OpenAI API key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function implementing the validate_key tool. It calls dalleService.validateApiKey() to check the OpenAI API key and returns a text response indicating validity.
    handler: async (_args: ValidateKeyArgs): Promise<ToolResponse> => {
      const isValid = await dalleService.validateApiKey();
      return {
        content: [{
          type: "text",
          text: isValid ? "API key is valid" : "API key is invalid"
        }]
      };
    }
  • JSON input schema for the validate_key tool, defining an empty object with no required properties.
    inputSchema: {
      type: "object",
      properties: {},
      required: []
    },
  • TypeScript interface defining the arguments for validate_key tool, which requires no arguments.
    export interface ValidateKeyArgs {}
  • The full tool registration object for 'validate_key' exported in the tools array.
    {
      name: "validate_key",
      description: "Validate the OpenAI API key",
      inputSchema: {
        type: "object",
        properties: {},
        required: []
      },
      handler: async (_args: ValidateKeyArgs): Promise<ToolResponse> => {
        const isValid = await dalleService.validateApiKey();
        return {
          content: [{
            type: "text",
            text: isValid ? "API key is valid" : "API key is invalid"
          }]
        };
      }
    }
  • src/index.ts:29-29 (registration)
    MCP server capabilities registration declaring support for the validate_key tool.
    validate_key: true

Tool Definition Quality

Score is being calculated. Check back soon.

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/Garoth/dalle-mcp'

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