fb_generate_post_with_image
Generate an image for a candidate Facebook post. Returns a URL to use with the publish action, allowing iterative visual refinement without consuming API quota.
Instructions
Generate an image for a candidate post and return a usable URL.
Does NOT publish. Caller is expected to take the returned image_url and
pass it to fb_publish_post (or further validate via
fb_validate_pre_publish). This separation lets the LLM iterate on the
visual without burning Meta API quota.
Args: page_id: Numeric Meta Page ID (used only to resolve provider defaults). prompt: Image generation prompt (English recommended). image_provider: "openai" | "fal". Defaults to config.image_providers.default.
Returns:
Dict with image_url, provider, model, prompt.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"page_id": "<page_id>",
"prompt": "<prompt>"
},
"name": "fb_generate_post_with_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | ||
| prompt | Yes | ||
| image_provider | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||