> ## 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.

# MCP Resources & Prompts

> Use MCP Resources to access catalog data and MCP Prompts to run optimization workflows.

## MCP Resources

MCP Resources let agents read structured data from Alana without making explicit tool calls. Think of them as read-only data attachments that the agent can reference.

### Available Resources

| Resource URI              | Description                                   |
| ------------------------- | --------------------------------------------- |
| `catalog://products`      | Paginated product summaries for the workspace |
| `catalog://products/{id}` | Full product detail by ID                     |
| `catalog://categories`    | Category tree for the workspace               |
| `catalog://brands`        | Brand list for the workspace                  |

### Reading a Resource

<CodeGroup>
  ```javascript JavaScript theme={null}
  // List available resources
  const resources = await client.listResources();

  // Read a specific resource
  const resource = await client.readResource({
    uri: "alana://catalog/cat_abc",
  });
  console.log(resource.contents[0].text);
  ```

  ```python Python theme={null}
  # List available resources
  resources = await session.list_resources()

  # Read a specific resource
  resource = await session.read_resource("alana://catalog/cat_abc")
  print(resource.contents[0].text)
  ```
</CodeGroup>

### How Agents Use Resources

When an agent needs catalog context, it can read the resource at the start of a session rather than making repeated `search_products` calls. This reduces latency and tool calls for context-heavy workflows.

```
Agent: "I need to review all products in the Summer 2026 catalog"
→ Reads alana://catalog/cat_summer2026
→ Has full catalog context without pagination
```

***

## MCP Prompts

MCP Prompts are pre-built workflow templates that agents can invoke. They combine multiple tool calls into a single guided workflow.

### Available Prompts

| Prompt Name               | Description                               |
| ------------------------- | ----------------------------------------- |
| `optimize-catalog`        | Run optimization across an entire catalog |
| `analyze-product`         | Deep analysis of a single product         |
| `generate-feed-report`    | Feed performance analysis                 |
| `brand-consistency-check` | Check products against brand guidelines   |

### Using a Prompt

<CodeGroup>
  ```javascript JavaScript theme={null}
  // List available prompts
  const prompts = await client.listPrompts();

  // Get a prompt with arguments
  const prompt = await client.getPrompt({
    name: "optimize-catalog",
    arguments: { catalog_id: "cat_abc", target_platform: "google" },
  });

  // The prompt returns messages you can send to the LLM
  console.log(prompt.messages);
  ```

  ```python Python theme={null}
  # List available prompts
  prompts = await session.list_prompts()

  # Get a prompt
  prompt = await session.get_prompt(
      "optimize-catalog",
      arguments={"catalog_id": "cat_abc", "target_platform": "google"},
  )
  print(prompt.messages)
  ```
</CodeGroup>

### Prompt: analyze-product

Generates a structured analysis of a product including score, improvement suggestions, and platform-specific recommendations.

**Arguments:**

| Argument     | Required | Description                                |
| ------------ | -------- | ------------------------------------------ |
| `product_id` | Yes      | Product to analyze                         |
| `platforms`  | No       | Comma-separated list: `google,meta,openai` |

### Prompt: brand-consistency-check

Checks a set of products against brand guidelines and flags inconsistencies.

**Arguments:**

| Argument     | Required | Description                        |
| ------------ | -------- | ---------------------------------- |
| `brand_id`   | Yes      | Brand to check against             |
| `catalog_id` | No       | Catalog to audit (defaults to all) |
