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;
    }
Behavior3/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 validates API keys for authentication testing, which implies a read-only, non-destructive operation. However, it doesn't disclose important behavioral details like rate limits, error responses, or what specific validation checks are performed (e.g., format validation, authentication against server).

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 perfectly concise with two sentences that each earn their place. The first sentence states the purpose and resource, while the second provides explicit usage guidance. There's zero wasted text, and the information is front-loaded with the core functionality.

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

Completeness4/5

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

For a single-parameter authentication validation tool with no output schema, the description provides good context about what the tool does and when to use it. However, it doesn't describe what the validation result looks like (e.g., returns success/failure, error messages) or any prerequisites beyond having an API key. Given the tool's relative simplicity, the description is mostly complete but could benefit from output information.

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?

Schema description coverage is 100%, with the single parameter 'api_key' well-documented in the schema. The description doesn't add any parameter-specific information beyond what the schema already provides about the API key format and purpose. The baseline score of 3 is appropriate when the schema does the heavy lifting for parameter documentation.

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?

The description clearly states the specific action ('validate') and resource ('IssueBadge API key') with explicit purpose ('for authentication' and 'test if your API credentials are working correctly'). It distinguishes from siblings like create_badge, get_all_badges, and issue_badge by focusing solely on authentication testing rather than badge operations.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool: 'Use this to test if your API credentials are working correctly.' This provides clear context for usage (authentication testing) and implicitly distinguishes it from sibling tools that perform badge-related operations rather than credential validation.

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

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