Skip to main content
Glama
Deconstruct2021

cryptopunks-mcp-server

get_punk_details

Retrieve comprehensive details for a specific CryptoPunk, including owner, price, attributes, and optional transaction history, to support market research and rarity analysis.

Instructions

Get full details for a specific CryptoPunk including owner, for-sale price, active bid, all attributes, and optionally the complete transaction history (transfers, sales, bids, offers). When include_history is true, history is fetched via the reliable POST endpoint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
punk_indexYesCryptoPunk index (0–9999)
include_historyNoSet true to include the full transaction history

Implementation Reference

  • The handler for "get_punk_details" which calls the API function and returns the result using the helper "ok".
    case "get_punk_details": {
      const result = await api.getPunkDetails(args.punk_index, args.include_history ?? false);
      return ok(result);
    }
  • The implementation of "getPunkDetails", handling logic to fetch both details and history if requested.
    export async function getPunkDetails(punkIndex: number, includeHistory = false) {
      // Bug 3 fix: GET with includeHistory returns null history for some punks.
      // When history is requested, use the POST endpoint which reliably returns
      // full transaction history, then merge with details from GET.
      if (includeHistory) {
        const [details, history] = await Promise.all([
          get(DATA_BASE, `/api/punks/${punkIndex}/details`, { includeHistory: "false" }),
          post(DATA_BASE, `/api/punks/${punkIndex}/details`, {}),
        ]);
        // Both responses are wrapped in { success, data: { ... } }
        const detailsWrapper = details as { success?: boolean; data?: Record<string, unknown> };
        const historyWrapper = history as { success?: boolean; data?: Record<string, unknown> };
        const detailsData = detailsWrapper.data ?? detailsWrapper;
        const historyData = historyWrapper.data ?? historyWrapper;
        return {
          success: true,
          data: {
            ...(detailsData as Record<string, unknown>),
            transactionHistory:
              (historyData as Record<string, unknown>).transactionHistory ?? historyData,
            _historySource: "POST",
          },
        };
      }
      return get(DATA_BASE, `/api/punks/${punkIndex}/details`, { includeHistory: "false" });
    }
  • Definition and input schema for "get_punk_details".
    get_punk_details: {
      description:
        "Get full details for a specific CryptoPunk including owner, for-sale price, active bid, all attributes, and optionally the complete transaction history (transfers, sales, bids, offers). When include_history is true, history is fetched via the reliable POST endpoint.",
      inputSchema: z.object({
        punk_index: punkIndex,
        include_history: z
          .boolean()
          .optional()
          .default(false)
          .describe("Set true to include the full transaction history"),
      }),
    },

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/Deconstruct2021/cryptopunks-mcp-server'

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