Skip to main content
Glama

issue_badge

Create and send digital certificates to recipients with email notifications and verification links for credential verification.

Instructions

Issue a badge to a recipient. This creates a digital certificate and sends notification email with verification URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
badge_idYesEncrypted badge ID from badge creation (get this from get_all_badges or create_badge)
emailNoRecipient's email address (optional, but recommended for notifications)
idempotency_keyYesUnique key to prevent duplicate issuance (e.g., "issue_john_doe_2024_001")
metadataNoCustom field values and additional metadata (e.g., completion_date, score, etc.)
nameYesRecipient's full name (will appear on the certificate)
phoneNoRecipient's phone number (optional)

Implementation Reference

  • src/index.ts:277-312 (registration)
    Registration of the 'issue_badge' tool in the MCP tools array, defining its name, description, and JSON input schema.
    { name: 'issue_badge', description: 'Issue a badge to a recipient. This creates a digital certificate and sends notification email with verification URL.', inputSchema: { type: 'object', properties: { badge_id: { type: 'string', description: 'Encrypted badge ID from badge creation (get this from get_all_badges or create_badge)', }, name: { type: 'string', description: 'Recipient\'s full name (will appear on the certificate)', }, email: { type: 'string', format: 'email', description: 'Recipient\'s email address (optional, but recommended for notifications)', }, phone: { type: 'string', description: 'Recipient\'s phone number (optional)', }, idempotency_key: { type: 'string', description: 'Unique key to prevent duplicate issuance (e.g., "issue_john_doe_2024_001")', }, metadata: { type: 'object', description: 'Custom field values and additional metadata (e.g., completion_date, score, etc.)', additionalProperties: true, }, }, required: ['badge_id', 'name', 'idempotency_key'], }, },
  • Zod validation schema (IssueBadgeSchema) used to parse and validate inputs for the issue_badge tool.
    const IssueBadgeSchema = z.object({ badge_id: z.string().describe('Encrypted badge ID from badge creation'), name: z.string().describe('Recipient full name'), email: z.string().email().optional().describe('Recipient email address'), phone: z.string().optional().describe('Recipient phone number'), idempotency_key: z.string().describe('Unique key to prevent duplicate issuance'), metadata: z.record(z.any()).optional().describe('Custom field values and additional metadata'), });
  • MCP server request handler for 'issue_badge': validates arguments using IssueBadgeSchema, calls apiClient.issueBadge, formats and returns the response.
    case 'issue_badge': { const validatedArgs = IssueBadgeSchema.parse(args); const result = await apiClient.issueBadge(validatedArgs); if (result.success) { return { content: [ { type: 'text', text: `🎉 Badge Issued Successfully!\n\n📧 Recipient: ${validatedArgs.name}\n🆔 Issue ID: ${result.IssueId}\n🔗 Verification URL: ${result.publicUrl}\n\n${JSON.stringify(result, null, 2)}`, }, ], }; } return { content: [ { type: 'text', text: `📜 Badge Issuance Result:\n\n${JSON.stringify(result, null, 2)}`, }, ], }; }
  • Core implementation in IssueBadgeClient: makes POST request to '/issue/create' endpoint with badge data and returns the issued badge response.
    async issueBadge(data: z.infer<typeof IssueBadgeSchema>): Promise<IssuedBadge> { const response = await this.client.post('/issue/create', data); 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