> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postqueen.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Examples

> The flows where an agent has to discover something before it can post

You never type any of this. You say what you want in plain language, your agent makes the calls,
and she puts the result on your calendar.

So this page is not a list of things to copy. It is the handful of flows where the agent cannot go
straight to posting, because it has to ask her a question first: which channel, which audio track,
which voice. Those are the ones worth understanding, because when they go wrong the symptom is an
agent that says it posted and a calendar that disagrees.

For the ordinary case, where she just writes and schedules, the sequence is in
[Introduction](/mcp/introduction). Every tool and its parameters: [Tools](/mcp/tools).

## Discord: pick a channel first

Discord will not accept a post without a channel id, and the ids are not something you know. The
agent discovers them.

<Steps>
  <Step title="Get the schema">
    The agent calls `integrationSchema` with `platform: "discord"` and sees that this channel
    offers a tool for listing channels.
  </Step>

  <Step title="List the channels">
    The agent calls `triggerTool`:

    ```json theme={"system"}
    {
      "integrationId": "discord-123",
      "methodName": "channels",
      "dataSchema": []
    }
    ```

    Back comes every channel the PostQueen bot can post to, as `{ id, name }`. A channel missing
    from that list is a permissions question on the Discord side, not a PostQueen one.
  </Step>

  <Step title="Schedule with the channel id">
    ```json theme={"system"}
    {
      "socialPost": [
        {
          "integrationId": "discord-123",
          "isPremium": false,
          "date": "2026-08-01T09:00:00.000Z",
          "shortLink": false,
          "type": "now",
          "postsAndComments": [
            { "content": "<p>Hello Discord!</p>", "attachments": [] }
          ],
          "settings": [{ "key": "channel", "value": "channel-id-here" }]
        }
      ]
    }
    ```
  </Step>
</Steps>

Pinterest works the same way with a `boards` tool, and Reddit with `restrictions` for flairs. The
pattern is always schema, then tool, then settings.

## Instagram: attach a trending audio track to a Reel

Instagram offers an `audioSearch` tool for finding music or original sounds.

<Steps>
  <Step title="Search for audio">
    An empty `q` returns trending audio:

    ```json theme={"system"}
    {
      "integrationId": "instagram-123",
      "methodName": "audioSearch",
      "dataSchema": [
        { "key": "q", "value": "summer vibes" },
        { "key": "type", "value": "music" }
      ]
    }
    ```

    ```json theme={"system"}
    {
      "output": [
        {
          "id": "587784541076604",
          "title": "Summer Vibes",
          "artist": "Some Artist",
          "duration": 30000,
          "previewUrl": "https://..."
        }
      ]
    }
    ```
  </Step>

  <Step title="Schedule the Reel">
    A Reel is a single video with `post_type: "post"`. The two volume numbers mix the track
    against the video's own audio:

    ```json theme={"system"}
    {
      "socialPost": [
        {
          "integrationId": "instagram-123",
          "isPremium": false,
          "date": "2026-08-01T09:00:00.000Z",
          "shortLink": false,
          "type": "schedule",
          "postsAndComments": [
            {
              "content": "<p>New reel with trending audio!</p>",
              "attachments": ["https://uploads.postqueen.ai/reel.mp4"]
            }
          ],
          "settings": [
            { "key": "post_type", "value": "post" },
            { "key": "audio", "value": { "id": "587784541076604", "audio_volume": 80, "video_volume": 20 } }
          ]
        }
      ]
    }
    ```
  </Step>
</Steps>

<Note>
  Audio is not available on `instagram-standalone` channels, because the Instagram Audio API
  requires Facebook Login. If the tool is missing from the schema, that is why.
</Note>

## Video: three questions before one video

Video is the longest discovery chain in the tool set, because the agent has to find out which
generator exists, then what that generator accepts, before it can ask for anything.

<Steps>
  <Step title="Which generators are available">
    `generateVideoOptions` returns them. Which ones appear depends on the keys the install has.
  </Step>

  <Step title="What does this generator accept">
    Each generator has its own parameters. For Image Text Slides, the voices come from
    `videoFunctionTool`:

    ```json theme={"system"}
    {
      "identifier": "image-text-slides",
      "functionName": "loadVoices"
    }
    ```
  </Step>

  <Step title="Generate">
    `generateVideoTool` takes the generator's `identifier`, an `output` shape and whatever
    `customParams` that generator declared:

    ```json theme={"system"}
    {
      "identifier": "image-text-slides",
      "output": "vertical",
      "customParams": [
        { "key": "prompt", "value": "5 tips for better social media engagement" },
        { "key": "voice", "value": "voice-id-here" }
      ]
    }
    ```

    The returned URL goes into `attachments` on the post, exactly like an uploaded file.
  </Step>
</Steps>

An AI image is the short version of the same idea: `generateImageTool` takes a prompt and returns
a `path`, which becomes an attachment.

## One array, two meanings

`postsAndComments` holds more than one item when you want more than one message. What that means
depends on the network:

* **On X**, the items are a thread. The first is the tweet, the rest are replies to it.
* **On LinkedIn**, the first item is the post and the rest are comments underneath it.

```json theme={"system"}
"postsAndComments": [
  { "content": "<p>We just launched something big!</p>", "attachments": [] },
  { "content": "<p>Check it out at example.com</p>", "attachments": [] }
]
```

Same shape, and the network decides what it becomes. Bulk scheduling is the other axis: more
entries in `socialPost`, each with its own `integrationId` and `date`.

## Next steps

<CardGroup cols={2}>
  <Card title="Tools" icon="wrench" href="/mcp/tools">
    Every tool and every parameter it accepts
  </Card>

  <Card title="Limits" icon="circle-minus" href="/mcp/limits-and-troubleshooting">
    What the tools cannot reach, and where those things live
  </Card>
</CardGroup>
