# Schedule Mastodon posts with OpenAI API

> The OpenAI API is for developers who build their own agent, so a Mastodon post here is a feature in your product rather than a chat you have by hand. You pass Tesselith's MCP server to the Responses API as a hosted tool, and your code decides when the model drafts or queues a post. Because the model calls tools without you in the loop, keep allowed_tools tight and never let a publish run unconfirmed.

Canonical: https://tesselith.com/ai-agents/openai-api/mastodon

## Drafting a post for each newsletter issue

A developer runs a small newsletter service. When an issue is published, a webhook calls their code, which sends the issue text and its link to the Responses API with Tesselith's MCP server attached. The model creates a draft, and the writer approves it in Tesselith before anything is queued. The code never calls a publish tool.

## A press release to three posts for a university

A marketing team at a university builds an internal form where staff paste a press release. The app asks the model for three Mastodon posts aimed at three audiences, and the model uses list_channels to pick the right account for each. Each post comes back as a draft in Tesselith, and the communications lead chooses which ones to schedule.

## Turning a new-arrivals spreadsheet into drafts

An online shop keeps a spreadsheet of new arrivals. A nightly job reads the rows added that day and asks the model for a Mastodon post for each product, under 500 characters, with the product link at the end. The job creates drafts only, so a person reviews the batch each morning before any of it is scheduled.

## Prompts to try

- "Write a Mastodon post for this product, under 450 characters, ending with the product link."
- "Draft a three-post thread from this press release, each post under 500 characters."
- "Create a draft on the account for the spring campaign channel, and don't queue it."
- "Summarize the Mastodon queue for next week, then tell me which days have no posts."
- "Attach the product photo from this public URL to the draft before you return it."

## Tips

- Restrict allowed_tools to what the job needs. A drafting job needs create_draft and list_channels, not publish_now. An open tool list lets the model reach actions your code never meant to expose.
- Keep the confirmation step for publish and delete in your own flow too. Tesselith asks for confirmation on both, so pass that step through to a person instead of auto-confirming it in code.
- Put the platform's limit in the prompt. Mastodon allows 500 characters on most servers, and every link counts as 23. Without that number, a model tends to write long drafts you then have to trim.
- Keep the Tesselith key on your server, not in client code. The key gives the model access to your workspace, so load it from an environment variable such as TESSELITH_API_KEY.

## Questions people ask

### Do I need to host an MCP server?

No. OpenAI calls Tesselith's MCP server for you, so your code only sends the server URL and your key.

### Can the model publish a post straight from my code?

Only if your code allows publish_now. Tesselith still needs confirm: true on that call, so your code has to put a person in that step first.

### Why does the model only see some of the Tesselith tools?

Because allowed_tools limits what the model can call. Check the tool names against the MCP tool list before you debug the rest of the request.

---
Tesselith · https://tesselith.com · Full site index: https://tesselith.com/llms.txt
