Skip to main content
Glama

get_pricing_estimate

Calculate per-component costs and total pricing for tabletop games at different order quantities to plan manufacturing budgets.

Instructions

Get per-component cost breakdown and total price for a game at various order quantities. The game must have components added first via add_component_to_game. Requires authentication.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
game_idYesThe game ID to get pricing for. The game must have components added.

Implementation Reference

  • The handler implementation for the `get_pricing_estimate` tool. It retrieves game ledger entries or falls back to basic game object pricing details.
    export function handleGetPricingEstimate(client: TgcClient) {
      return async (args: { game_id: string }): Promise<CallToolResult> => {
        const [entries, game] = await Promise.all([
          client.getGameLedgerEntries(args.game_id),
          client.getGame(args.game_id),
        ]);
    
        if (entries.length > 0) {
          return {
            content: [
              {
                type: "text",
                text: `Ledger entries:\n${JSON.stringify(entries, null, 2)}`,
              },
            ],
          };
        }
    
        // Fallback: extract pricing from the game object itself
        const pricing = {
          game_id: game.id,
          name: game.name,
          cost: game.cost,
          price_1: game.price1 ?? game.price,
          price_10: game.price10,
          price_100: game.price100,
          price_500: game.price500,
          price_1000: game.price1000,
          retail_price_each: game.retail_price_each,
          msrp: game.msrp,
          designer_profit: game.designer_profit,
          component_list: game.component_list,
        };
    
        return {
          content: [
            {
              type: "text",
              text: `No ledger entries available. Pricing summary from game details:\n\n${JSON.stringify(pricing, null, 2)}`,
            },
          ],
        };
      };
    }
  • Input schema definition for `get_pricing_estimate`.
    export const getPricingEstimateInput = {
      game_id: safeId.describe(
        "The game ID to get pricing for. The game must have components added.",
      ),
    };
  • src/index.ts:134-140 (registration)
    Tool registration for `get_pricing_estimate` in the main server file.
    server.registerTool("get_pricing_estimate", {
      description:
        "Get per-component cost breakdown and total price for a game at various order quantities. The game must have components added first via add_component_to_game. Requires authentication.",
      inputSchema: schemas.getPricingEstimateInput,
      annotations: { readOnlyHint: true },
    }, withErrorHandling(handleGetPricingEstimate(client)));

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/alex-gon/thegamecrafter-mcp-server'

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