# deploy_template

> Page: https://docs.flung.dev/reference/mcp/deploy-template. Index of every page: https://docs.flung.dev/llms.txt

Schedule a post from a template. Schedules a post from a template, filling {{variables}}.

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Schedules a post from a template, filling {{variables}}. |
| Does it change anything? | Changes something. |
| Which endpoint does it call? | [`POST /v1/templates/{id}/deploy`](https://docs.flung.dev/reference/api/post-v1-templates-id-deploy.md) |
| Which server? | `https://mcp.flung.dev/mcp-oauth` (sign in) or `https://mcp.flung.dev/mcp` (API key). |

## Arguments

| Argument | Type | Required | Description |
|---|---|---|---|
| `templateId` | `string` | yes | From list_templates. pattern `^tpl_[a-z2-7]+$`. |
| `accountIds` | `string[]` | no | Instead of the template's. |
| `publishAt` | `string` | no | ISO 8601 with offset; omit for now. pattern `^(?:(?:\d\d[2468][048]\|\d\d[13579][26]\|\d\d0[48]\|[02468][048]00\|[13579][26]00)-02-29\|\d{4}-(?:(?:0[13578]\|1[02])-(?:0[1-9]\|[12]\d\|3[01])\|(?:0[469]\|11)-(?:0[1-9]\|[12]\d\|30)\|(?:02)-(?:0[1-9]\|1\d\|2[0-8])))T(?:(?:[01]\d\|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z\|([+-](?:[01]\d\|2[0-3]):[0-5]\d)))$`. |
| `variables` | `object` | no |  |

## Example call

```json
{
  "name": "deploy_template",
  "arguments": {
    "templateId": "tpl_aaaaaaaaaaaaaaaaaaaaaaaa",
    "variables": {
      "product": "Flung"
    }
  }
}
```

## Things a person might say

- "Post the weekly news template on Friday."

## Annotations

| Hint | Value |
|---|---|
| `readOnlyHint` | false |
| `destructiveHint` | false |
| `idempotentHint` | false |
| `openWorldHint` | true |

## See also

| Doc | Why |
|---|---|
| [MCP tools](https://docs.flung.dev/reference/mcp.md) | Every tool |
| [Connect an AI agent](https://docs.flung.dev/mcp.md) | Install the server in your client |
| [`POST /v1/templates/{id}/deploy`](https://docs.flung.dev/reference/api/post-v1-templates-id-deploy.md) | The same operation over HTTP |
