Skip to main content
Glama

get_class_identity

Analyze Hearthstone class strategic identities by revealing hero power implications, historical archetypes, strengths, weaknesses, and game phase approaches for deck building and gameplay strategy.

Instructions

Get the strategic identity of a Hearthstone class — hero power implications, historical archetypes, strengths, weaknesses, and how the class approaches each game phase. Omit the class name to get an overview of all 11 classes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
class_nameNoClass name (e.g. "Mage", "Warrior"). Omit to get an overview of all classes.

Implementation Reference

  • The handler function that executes the logic to fetch class identity information from the database.
    export function getClassIdentity(
      db: Database.Database,
      input: GetClassIdentityInputType,
    ): GetClassIdentityResult {
      // If no class_name provided, return overview of all classes
      if (!input.class_name) {
        const rows = db
          .prepare('SELECT class, identity, hero_power_name FROM class_identities ORDER BY class')
          .all() as ClassOverviewEntry[];
    
        return {
          found: true,
          overview: true,
          classes: rows,
        };
      }
    
      // Single class lookup (case-insensitive)
      const row = db
        .prepare('SELECT * FROM class_identities WHERE LOWER(class) = LOWER(?)')
        .get(input.class_name) as ClassIdentityRow | undefined;
    
      if (row) {
        return {
          found: true,
          identity: toClassIdentityInfo(row),
        };
      }
    
      // Not found — suggest similar entries via LIKE
      const suggestions = db
        .prepare('SELECT class FROM class_identities WHERE LOWER(class) LIKE LOWER(?) LIMIT 5')
        .all(`%${input.class_name}%`) as Array<{ class: string }>;
    
      const suggestionNames = suggestions.map((s) => s.class);
    
      return {
        found: false,
        message: `No class found matching "${input.class_name}".`,
        suggestions: suggestionNames.length > 0 ? suggestionNames : undefined,
      };
    }
  • Zod input schema for the get_class_identity tool.
    export const GetClassIdentityInput = z.object({
      class_name: z
        .string()
        .optional()
        .describe('Class name (e.g. "Mage", "Warrior"). Omit to get an overview of all classes.'),
    });
    
    export type GetClassIdentityInputType = z.infer<typeof GetClassIdentityInput>;
  • src/server.ts:218-230 (registration)
    Registration of the get_class_identity tool within the server.
    // 7. get_class_identity
    server.tool(
      'get_class_identity',
      'Get the strategic identity of a Hearthstone class — hero power implications, historical archetypes, strengths, weaknesses, and how the class approaches each game phase. Omit the class name to get an overview of all 11 classes.',
      GetClassIdentityInput.shape,
      async (params) => {
        try {
          const result = getClassIdentity(db, params);
          return {
            content: [
              {
                type: 'text' as const,
                text: formatGetClassIdentity(result),

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/gregario/hearthstone-oracle'

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