Skip to main content
Glama

get_all_badges

Retrieve all available badges for your organization to view IDs and names. Use this tool to access badge information for management and selection purposes.

Instructions

Retrieve all available badges for the authenticated organization. Returns a list of badges with their IDs and names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of badges to return (default: 100, max: 100)

Implementation Reference

  • MCP tool dispatcher handler for 'get_all_badges': validates input using schema, calls the API client method, formats and returns the list of badges in a user-friendly response.
    case 'get_all_badges': {
      const validatedArgs = GetAllBadgesSchema.parse(args);
      const result = await apiClient.getAllBadges(validatedArgs.limit);
      
      if (result.success && result.data) {
        const badgeList = result.data.map((badge: Badge, index: number) => 
          `${index + 1}. ${badge.name} (ID: ${badge.id})`
        ).join('\n');
        
        return {
          content: [
            {
              type: 'text',
              text: `🏆 Available Badges (${result.data.length}):\n\n${badgeList}\n\n${JSON.stringify(result, null, 2)}`,
            },
          ],
        };
      }
      
      return {
        content: [
          {
            type: 'text',
            text: `📋 Badge List Result:\n\n${JSON.stringify(result, null, 2)}`,
          },
        ],
      };
    }
  • Core API client handler that performs the HTTP GET request to '/badge/getall' endpoint to fetch the list of badges.
    async getAllBadges(limit = 100): Promise<ApiResponse<Badge[]>> {
      const response = await this.client.get('/badge/getall', {
        params: { limit },
      });
      return response.data;
    }
  • Zod schema defining the input parameters for the get_all_badges tool (optional limit parameter).
    const GetAllBadgesSchema = z.object({
      limit: z.number().optional().describe('Maximum number of badges to return (default: 100)'),
    });
  • src/index.ts:260-276 (registration)
    Tool registration object added to the MCP tools array, specifying name, description, and input schema for listTools request.
    {
      name: 'get_all_badges',
      description: 'Retrieve all available badges for the authenticated organization. Returns a list of badges with their IDs and names.',
      inputSchema: {
        type: 'object',
        properties: {
          limit: {
            type: 'number',
            description: 'Maximum number of badges to return (default: 100, max: 100)',
            default: 100,
            minimum: 1,
            maximum: 100,
          },
        },
        required: [],
      },
    },
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 adds some context by specifying that it returns a list with IDs and names, which is useful beyond the input schema. However, it lacks details on authentication requirements, rate limits, pagination, or error handling, leaving gaps for a tool that interacts with organizational data.

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 sentences that are front-loaded and efficient, with no wasted words. The first sentence states the purpose, and the second adds key behavioral context about the return format, making it appropriately sized and structured.

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?

Given the tool's simplicity (one optional parameter, no output schema, no annotations), the description is adequate but has clear gaps. It explains the return format but doesn't cover authentication, error cases, or how the tool fits into the broader context with sibling tools. For a retrieval tool, this is minimal viable but not fully comprehensive.

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?

The input schema has 100% description coverage, with the 'limit' parameter fully documented in the schema. The description does not add any parameter-specific information beyond what the schema provides, such as default behavior or usage tips. This meets the baseline of 3 since the schema handles the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Retrieve') and resource ('all available badges for the authenticated organization'), making the purpose unambiguous. It distinguishes from siblings like 'create_badge' and 'issue_badge' by focusing on retrieval rather than creation or issuance. However, it doesn't explicitly differentiate from 'validate_key', which might be a different operation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to use 'get_all_badges' over other retrieval methods or tools, nor does it specify any prerequisites or exclusions. The context is implied but not explicit.

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