Skip to main content
Glama

get_class_identity

Get the strategic identity of a Hearthstone class: hero power implications, historical archetypes, strengths, weaknesses, and game phase approach. Omit class name for all 11 classes overview.

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

  • Main handler function for get_class_identity tool. Accepts an optional class_name, queries the SQLite database for class identity info, and returns either an overview, detailed identity, or a not-found message with suggestions.
    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,
      };
    }
  • Input schema for get_class_identity using Zod. Optional 'class_name' field describing the class to look up.
    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.'),
    });
  • Result type definitions: ClassIdentityInfo (full details), ClassOverviewEntry (summary), and GetClassIdentityResult (discriminated union).
    export interface ClassIdentityInfo {
      class: string;
      identity: string;
      hero_power_name: string;
      hero_power_cost: number;
      hero_power_effect: string;
      hero_power_implications: string;
      historical_archetypes: string[];
      strengths: string[];
      weaknesses: string[];
      early_game: string;
      mid_game: string;
      late_game: string;
    }
    
    export interface ClassOverviewEntry {
      class: string;
      identity: string;
      hero_power_name: string;
    }
    
    export type GetClassIdentityResult =
      | { found: true; identity: ClassIdentityInfo }
      | { found: true; overview: true; classes: ClassOverviewEntry[] }
      | { found: false; message: string; suggestions?: string[] };
  • src/server.ts:218-233 (registration)
    Registration of get_class_identity as an MCP tool via server.tool(...), wired to GetClassIdentityInput shape and getClassIdentity handler.
    // 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),
              },
            ],
          };
  • Helper function toClassIdentityInfo that maps a DB row to the ClassIdentityInfo interface, parsing JSON fields like historical_archetypes, strengths, and weaknesses.
    }
    
    // --- Handler ---
    
    interface ClassIdentityRow {
      class: string;
      identity: string;
      hero_power_name: string;
      hero_power_cost: number;
      hero_power_effect: string;
      hero_power_implications: string;
      historical_archetypes: string;
      strengths: string;
      weaknesses: string;
      early_game: string;
      mid_game: string;
      late_game: string;
    }
    
    function toClassIdentityInfo(row: ClassIdentityRow): ClassIdentityInfo {
Behavior3/5

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

No annotations are provided, so the description bears full responsibility. It explains the output contents (strategic identity, archetypes, etc.) but does not mention response format, potential errors, permissions, or any constraints. It is adequate but leaves behavioral gaps.

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?

Two sentences, front-loaded with purpose, followed by a usage note. No filler words, every sentence adds value.

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?

With one optional parameter and no output schema, the description sufficiently covers the tool's purpose and output scope. It could mention return format but is already informative enough for the agent to decide.

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 coverage is 100% (one parameter fully described in schema). The description repeats the schema note about omitting the class name but adds no further semantic value beyond what the schema already provides.

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 uses a specific verb ('Get') and resource ('strategic identity of a Hearthstone class'), and details what the identity covers (hero power implications, historical archetypes, strengths, weaknesses, game phases). This clearly distinguishes it from sibling tools like get_archetype or get_card.

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

Usage Guidelines4/5

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

States that omitting the class name returns an overview of all 11 classes, which clarifies usage. However, it does not explicitly contrast with alternatives like explain_concept or get_archetype, leaving some contextual ambiguity.

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

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