# Templates

MCP tools for templates.

## list_templates

List the built-in deck templates and their IDs. This does not create anything.

Scopes: poll.read. Read-only.

### Input

```json
{
  "type": "object",
  "additionalProperties": false,
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
```

### Output

```json
{
  "type": "object",
  "properties": {
    "templates": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "conference-ai-writing"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "description": {
            "type": "string",
            "minLength": 0,
            "maxLength": 240
          },
          "questionCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 40
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "questionCount"
        ],
        "additionalProperties": false
      },
      "minItems": 0,
      "maxItems": 20
    }
  },
  "required": [
    "templates"
  ],
  "additionalProperties": false,
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
```

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_templates",
    "arguments": {}
  }
}
```

## create_deck_from_template

Create a fresh poll from a built-in template. Optionally override its title. Unguessable results links are enabled by default, just like on the website, and the owner can turn them off.

Scopes: poll.read, poll.write.

### Input

```json
{
  "type": "object",
  "properties": {
    "templateId": {
      "type": "string",
      "enum": [
        "conference-ai-writing"
      ]
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "required": [
    "templateId"
  ],
  "additionalProperties": false,
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
```

### Output

```json
{
  "type": "object",
  "properties": {
    "deck": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
          "format": "uuid"
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "code": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "updatedAt": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "settings": {
          "type": "object",
          "properties": {
            "pacing": {
              "type": "string",
              "enum": [
                "live",
                "self"
              ]
            },
            "showResultsToVoters": {
              "type": "string",
              "enum": [
                "never",
                "afterVote",
                "afterClose"
              ]
            },
            "allowChange": {
              "type": "boolean"
            },
            "showBranding": {
              "type": "boolean"
            },
            "shareResults": {
              "type": "boolean"
            }
          },
          "required": [
            "pacing",
            "showResultsToVoters",
            "allowChange",
            "showBranding",
            "shareResults"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "title",
        "code",
        "createdAt",
        "updatedAt",
        "settings"
      ],
      "additionalProperties": false
    },
    "questionIds": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
        "format": "uuid"
      },
      "minItems": 0,
      "maxItems": 40,
      "uniqueItems": true
    }
  },
  "required": [
    "deck",
    "questionIds"
  ],
  "additionalProperties": false,
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
```

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_deck_from_template",
    "arguments": {
      "templateId": "conference-ai-writing"
    }
  }
}
```
