← All tool references

Generators · not_available

Card Picker

Calculate selected cards from cards to draw, deck, draw with replacement.

Open public tool

Overview

Category
Generators
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/card-picker

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/card-picker/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

draw_count · number · required
Enter cards to draw.
deck · string · required
Enter deck. Accepted values: standard_52, standard_with_jokers.
replacement · string · required
Enter draw with replacement. Accepted values: no, yes.
{
    "type": "object",
    "properties": {
        "draw_count": {
            "type": "number",
            "description": "Enter cards to draw."
        },
        "deck": {
            "type": "string",
            "description": "Enter deck.",
            "enum": [
                "standard_52",
                "standard_with_jokers"
            ]
        },
        "replacement": {
            "type": "string",
            "description": "Enter draw with replacement.",
            "enum": [
                "no",
                "yes"
            ]
        }
    },
    "required": [
        "draw_count",
        "deck",
        "replacement"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

cards · array
Selected cards produced by the tool.
remaining · number
Cards remaining produced by the tool.
draw_count · number
Cards drawn produced by the tool.
{
    "type": "object",
    "properties": {
        "cards": {
            "type": "array",
            "description": "Selected cards produced by the tool."
        },
        "remaining": {
            "type": "number",
            "description": "Cards remaining produced by the tool."
        },
        "draw_count": {
            "type": "number",
            "description": "Cards drawn produced by the tool."
        }
    },
    "additionalProperties": false
}

Card Picker worked example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/card-picker/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "draw_count": 5,
    "deck": "standard_52",
    "replacement": "no"
}'
{
    "ok": true,
    "data": {
        "slug": "card-picker",
        "result": {
            "values": {
                "cards": [
                    {
                        "draw": 1,
                        "card": "J♣",
                        "rank": "J",
                        "suit": "♣"
                    },
                    {
                        "draw": 2,
                        "card": "9♦",
                        "rank": "9",
                        "suit": "♦"
                    },
                    {
                        "draw": 3,
                        "card": "A♠",
                        "rank": "A",
                        "suit": "♠"
                    },
                    {
                        "draw": 4,
                        "card": "J♠",
                        "rank": "J",
                        "suit": "♠"
                    },
                    {
                        "draw": 5,
                        "card": "K♣",
                        "rank": "K",
                        "suit": "♣"
                    }
                ],
                "remaining": 47,
                "draw_count": 5
            },
            "display": {
                "display": "[{\"draw\":1,\"card\":\"J♣\",\"rank\":\"J\",\"suit\":\"♣\"},{\"draw\":2,\"card\":\"9♦\",\"rank\":\"9\",\"suit\":\"♦\"},{\"draw\":3,\"card\":\"A♠\",\"rank\":\"A\",\"suit\":\"♠\"},{\"draw\":4,\"card\":\"J♠\",\"rank\":\"J\",\"suit\":\"♠\"},{\"draw\":5,\"card\":\"K♣\",\"rank\":\"K\",\"suit\":\"♣\"}]"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.