new_deck

Pack: deckofcards · Endpoint: https://gateway.pipeworx.io/deckofcards/mcp

Create a shuffled deck of playing cards. Returns deck_id and remaining count. Use deck_count to combine multiple decks (e.g., 2 for 104 cards).

Parameters

NameTypeRequiredDescription
countnumbernoNumber of standard 52-card decks to combine and shuffle. Defaults to 1.

Example call

Arguments

{
  "count": 1
}

curl

curl -X POST https://gateway.pipeworx.io/deckofcards/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"new_deck","arguments":{"count":1}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('new_deck', {
  "count": 1
});

More examples

{
  "count": 2
}

Response shape

Always returns: deck_id, shuffled, remaining

FieldTypeDescription
deck_idstringUnique identifier for the created deck
shuffledbooleanWhether the deck was shuffled
remainingnumberNumber of cards remaining in the deck
Full JSON Schema
{
  "type": "object",
  "properties": {
    "deck_id": {
      "type": "string",
      "description": "Unique identifier for the created deck"
    },
    "shuffled": {
      "type": "boolean",
      "description": "Whether the deck was shuffled"
    },
    "remaining": {
      "type": "number",
      "description": "Number of cards remaining in the deck"
    }
  },
  "required": [
    "deck_id",
    "shuffled",
    "remaining"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "deckofcards": {
      "url": "https://gateway.pipeworx.io/deckofcards/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026