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

# Media & Context Tools

> Generate descriptions, enhance images, and retrieve brand context.

## generate\_description

Generate an AI-powered product description from existing product data or an image.

**Parameters:**

| Parameter    | Type    | Required | Description                                      |
| ------------ | ------- | -------- | ------------------------------------------------ |
| `product_id` | string  | Yes      | Product ID or SKU                                |
| `style`      | string  | No       | `technical`, `lifestyle`, `seo` (default: `seo`) |
| `max_chars`  | integer | No       | Max description length (default: 500)            |
| `language`   | string  | No       | `pt-BR` or `en` (default: workspace language)    |

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://app.alana.shopping/api/mcp/sse" \
    -H "Authorization: Bearer sk_live_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{"method":"tools/call","params":{"name":"generate_description","arguments":{"product_id":"SKU-001","style":"lifestyle","max_chars":300}}}'
  ```

  ```javascript JavaScript theme={null}
  const result = await client.callTool({
    name: "generate_description",
    arguments: {
      product_id: "SKU-001",
      style: "lifestyle",
      max_chars: 300,
      language: "en",
    },
  });
  console.log(result.content[0].text);
  ```

  ```python Python theme={null}
  result = await session.call_tool(
      "generate_description",
      arguments={
          "product_id": "SKU-001",
          "style": "lifestyle",
          "max_chars": 300,
          "language": "en",
      },
  )
  print(result.content[0].text)
  ```
</CodeGroup>

**Response:**

```json theme={null}
{
  "product_id": "SKU-001",
  "description": "Step into effortless comfort with our Blue Cotton T-Shirt. Crafted from 100% pre-shrunk cotton, it keeps you cool and looking sharp from morning meetings to weekend adventures.",
  "style": "lifestyle",
  "char_count": 186
}
```

***

## enhance\_images

Analyze product images and return suggestions for improvement (alt text, composition, quality score).

**Parameters:**

| Parameter           | Type    | Required | Description                                      |
| ------------------- | ------- | -------- | ------------------------------------------------ |
| `product_id`        | string  | Yes      | Product ID or SKU                                |
| `generate_alt_text` | boolean | No       | Generate alt text for each image (default: true) |

<CodeGroup>
  ```javascript JavaScript theme={null}
  const result = await client.callTool({
    name: "enhance_images",
    arguments: {
      product_id: "SKU-001",
      generate_alt_text: true,
    },
  });
  ```

  ```python Python theme={null}
  result = await session.call_tool(
      "enhance_images",
      arguments={
          "product_id": "SKU-001",
          "generate_alt_text": True,
      },
  )
  ```
</CodeGroup>

**Response:**

```json theme={null}
{
  "product_id": "SKU-001",
  "images": [
    {
      "url": "https://cdn.yourstore.com/blue-tshirt.jpg",
      "quality_score": 0.82,
      "alt_text": "Men's blue cotton t-shirt on white background",
      "suggestions": ["Add lifestyle shot", "Include size reference"]
    }
  ]
}
```

***

## get\_brand\_context

Retrieve brand guidelines, tone of voice, and positioning data to inform content generation.

**Parameters:**

| Parameter          | Type    | Required | Description                            |
| ------------------ | ------- | -------- | -------------------------------------- |
| `brand_id`         | string  | Yes      | Brand ID                               |
| `include_keywords` | boolean | No       | Include brand keywords (default: true) |

<CodeGroup>
  ```javascript JavaScript theme={null}
  const result = await client.callTool({
    name: "get_brand_context",
    arguments: { brand_id: "brand_abc", include_keywords: true },
  });
  ```

  ```python Python theme={null}
  result = await session.call_tool(
      "get_brand_context",
      arguments={"brand_id": "brand_abc", "include_keywords": True},
  )
  ```
</CodeGroup>

**Response:**

```json theme={null}
{
  "brand_id": "brand_abc",
  "name": "YourBrand",
  "tone": "friendly, approachable, confident",
  "positioning": "Premium casual wear for active professionals",
  "keywords": ["comfort", "quality", "sustainable", "versatile"],
  "forbidden_terms": ["cheap", "discount"]
}
```
