Skip to main content
Glama

issue_badge

Issue digital badges and certificates to recipients, creating verifiable credentials and sending email notifications with verification links.

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)
nameYesRecipient's full name (will appear on the certificate)
emailNoRecipient's email address (optional, but recommended for notifications)
phoneNoRecipient's phone number (optional)
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.)

Implementation Reference

  • MCP request handler case for 'issue_badge' tool: parses input with schema, calls IssueBadgeClient.issueBadge, handles success/error response formatting.
    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 handler logic in IssueBadgeClient: sends POST request to IssueBadge API /issue/create endpoint with provided data.
    async issueBadge(data: z.infer<typeof IssueBadgeSchema>): Promise<IssuedBadge> {
      const response = await this.client.post('/issue/create', data);
      return response.data;
    }
  • Zod schema defining input validation for issue_badge tool parameters.
    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'),
    });
  • src/index.ts:277-312 (registration)
    Tool registration object defining name, description, and JSON inputSchema for the MCP 'issue_badge' tool.
    {
      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'],
      },
    },
  • TypeScript interface for the IssuedBadge response from the issue_badge API call.
    interface IssuedBadge {
      success: boolean;
      IssueId: string;
      publicUrl: string;
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses key behavioral traits: creation of a digital certificate and sending of notification emails with verification URLs. However, it doesn't mention permissions needed, rate limits, whether the operation is idempotent (though idempotency_key parameter hints at this), or error handling. The description adds value but leaves gaps for a mutation tool.

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 two concise sentences that front-load the core purpose and outcomes. Every word earns its place with no redundancy or fluff, making it highly efficient for quick comprehension.

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

Completeness3/5

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

For a mutation tool with 6 parameters, no annotations, and no output schema, the description is adequate but incomplete. It covers the main action and outcomes but lacks details on permissions, errors, or return values. Given the complexity and missing structured data, it should provide more behavioral context to be fully helpful.

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%, so the schema already documents all 6 parameters thoroughly. The description doesn't add any parameter-specific details beyond what's in the schema (e.g., it doesn't explain badge_id sourcing further or metadata usage). Baseline 3 is appropriate when schema does the heavy lifting.

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 ('issue a badge'), the target ('to a recipient'), and the outcomes ('creates a digital certificate and sends notification email with verification URL'). It distinguishes from sibling tools like create_badge (which creates badge definitions) and get_all_badges (which lists badges).

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

Usage Guidelines3/5

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

The description implies usage context (issuing badges to recipients) but doesn't explicitly state when to use this tool versus alternatives like create_badge. It mentions getting badge_id from get_all_badges or create_badge, which provides some guidance but not explicit when/when-not rules or comparisons to siblings like validate_key.

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