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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/index.ts:289-297 (handler)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" }] }; }
- src/tools/index.ts:284-288 (schema)JSON input schema for the validate_key tool, defining an empty object with no required properties.inputSchema: { type: "object", properties: {}, required: [] },
- src/types/index.ts:42-42 (schema)TypeScript interface defining the arguments for validate_key tool, which requires no arguments.export interface ValidateKeyArgs {}
- src/tools/index.ts:281-298 (registration)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