Skip to main content
Glama

validate_key

Verify IssueBadge API key authentication to confirm credentials function correctly before issuing digital badges and certificates.

Instructions

Validate an IssueBadge API key for authentication. Use this to test if your API credentials are working correctly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyYesThe API key to validate (usually starts with a number and pipe, e.g., "1|abc123...")

Implementation Reference

  • The main handler for the 'validate_key' tool in the MCP server request handler switch statement. It validates input using ValidateKeySchema, calls apiClient.validateKey, and formats the response.
    case 'validate_key': { const validatedArgs = ValidateKeySchema.parse(args); const result = await apiClient.validateKey(validatedArgs.api_key); return { content: [ { type: 'text', text: `✅ API Key Validation Result:\n\n${JSON.stringify(result, null, 2)}`, }, ], }; }
  • Zod schema for validating the input arguments to the 'validate_key' tool, requiring an 'api_key' string.
    const ValidateKeySchema = z.object({ api_key: z.string().describe('The API key to validate'), });
  • src/index.ts:246-259 (registration)
    Tool registration in the tools array, defining name, description, and inputSchema for the MCP server to list and recognize the 'validate_key' tool.
    { name: 'validate_key', description: 'Validate an IssueBadge API key for authentication. Use this to test if your API credentials are working correctly.', inputSchema: { type: 'object', properties: { api_key: { type: 'string', description: 'The API key to validate (usually starts with a number and pipe, e.g., "1|abc123...")', }, }, required: ['api_key'], }, },
  • Helper method in IssueBadgeClient class that makes the HTTP POST request to '/validate-key' endpoint with the api_key, used by the tool handler.
    async validateKey(apiKey: string): Promise<ApiResponse> { const response = await this.client.post('/validate-key', { api_key: apiKey }); return response.data; }

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/issuebadge/mcp-server'

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