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

# Refine Slides

> Refine existing slides based on instructions

## Tool: `refine_slide`

Refine an existing slide based on instructions. Useful for making adjustments to individual slides without regenerating the entire presentation.

## Parameters

| Parameter         | Type   | Required | Description                 |
| ----------------- | ------ | -------- | --------------------------- |
| `slide_id`        | string | Yes      | UUID of the slide to refine |
| `instructions`    | string | Yes      | Refinement instructions     |
| `layout_name`     | string | No       | Specific layout to use      |
| `conversation_id` | string | No       | Existing conversation UUID  |

## Example Request

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "refine_slide",
    "arguments": {
      "slide_id": "uuid",
      "instructions": "Make the title more engaging and add bullet points for key features",
      "layout_name": "Content Slide",
      "conversation_id": "uuid"
    }
  }
}
```

## Response

```json theme={null}
{
  "slide": {
    "slide_id": "uuid",
    "slide_number": 3,
    "layout": "Content Slide",
    "content": {
      "title": "Enhanced Title",
      "bullets": [
        "Key feature 1",
        "Key feature 2",
        "Key feature 3"
      ]
    },
    "thumbnail_url": "https://...",
    "download_url": "https://...",
    "web_url": "https://..."
  },
  "reflection": "Refined the slide to be more engaging..."
}
```

## Use Cases

* **Content Adjustments**: Modify text, add or remove content
* **Layout Changes**: Switch to a different layout within the same template
* **Style Updates**: Adjust formatting or styling
* **Iterative Refinement**: Make multiple passes to perfect a slide

## Python Example

```python theme={null}
import requests

API_KEY = "pk_your_api_key_here"
BASE_URL = "https://poe.poesius.com/api/v1/mcp"

def refine_slide(slide_id, instructions, layout_name=None, conversation_id=None):
    arguments = {
        "slide_id": slide_id,
        "instructions": instructions
    }
    
    if layout_name:
        arguments["layout_name"] = layout_name
    
    if conversation_id:
        arguments["conversation_id"] = conversation_id
    
    response = requests.post(
        f"{BASE_URL}/messages",
        headers={
            "X-API-Key": API_KEY,
            "Content-Type": "application/json"
        },
        json={
            "method": "tools/call",
            "params": {
                "name": "refine_slide",
                "arguments": arguments
            }
        }
    )
    return response.json()

# Refine a slide
result = refine_slide(
    slide_id="uuid",
    instructions="Make the content more concise and add a call-to-action",
    layout_name="Content Slide"
)

print(f"Refined slide: {result['result']['slide']['slide_number']}")
print(f"Download URL: {result['result']['slide']['download_url']}")
```

## Best Practices

* **Be Specific**: Provide clear, specific instructions for what you want changed
* **Layout Selection**: Specify `layout_name` if you want to change the layout
* **Iterative Process**: Refine slides multiple times to achieve the desired result
* **Conversation Context**: Use `conversation_id` to maintain context across refinements

<Card title="Generate Slides" icon="wand-magic" href="/mcp/generate-slides">
  Learn about generating new slides
</Card>

<Card title="Two-Step Process" icon="diagram-project" href="/mcp/two-step-process">
  Learn about the two-step generation process
</Card>
