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

# AI Playground

> Test StackOne actions with natural language. No code required. Inspect Defender risk signals on tool calls.

The [AI Playground](https://app.stackone.com/playground) lets you test any action from your linked accounts using natural language.

<Frame>
  <img src="https://mintcdn.com/stackone-60/8SM23-qxAQM0ZgHx/images/playground/playground-main.png?fit=max&auto=format&n=8SM23-qxAQM0ZgHx&q=85&s=c09f4604c2ea435cf2024704edfee317" alt="Playground Main Interface" width="3456" height="2678" data-path="images/playground/playground-main.png" />
</Frame>

<Note>
  **Testing tool, not a production agent.** The Playground is designed for quickly testing actions and exploring capabilities. For production use cases, build your own agent using our [MCP Server](/mcp/quickstart), [AI Toolset](/agents/typescript/introduction), or [A2A Protocol](/a2a/quickstart). See [Agent Protocols Comparison](/guides/calling-stackone-actions) for guidance.
</Note>

<Info>
  **Access Required**: Contact StackOne support if you don't see the Playground in your dashboard.
</Info>

## Getting Started

<Steps>
  <Step title="Select accounts">
    Choose one or more linked accounts from the dropdown. Each account shows its provider and category.
  </Step>

  <Step title="Configure actions (optional)">
    Expand the **Actions** section to enable/disable specific actions before chatting.
  </Step>

  <Step title="Start chatting">
    Ask questions like *"List 5 employees"* or *"What tools can I use?"*
  </Step>
</Steps>

<Warning>
  Action selection is locked once you start a conversation. To change actions, start a new chat.
</Warning>

## Example Queries

The queries you can run depend on which accounts you've connected and what actions are available. Tailor your prompts to your agent's use case:

| Use Case                 | Example Query                                                          |
| ------------------------ | ---------------------------------------------------------------------- |
| **Explore capabilities** | "What tools can I use with these accounts?"                            |
| **List data**            | "Show me the first 10 employees"                                       |
| **Get specific records** | "Find employee with email [john@company.com](mailto:john@company.com)" |
| **Create records**       | "Create a new contact with name Jane Doe"                              |

<Tip>
  Start with "What tools can I use?" to see available actions for your selected accounts.
</Tip>

## Model Selection

Click the model selector at the bottom right to switch between models:

| Model                | Recommendation                                                                |
| -------------------- | ----------------------------------------------------------------------------- |
| **Anthropic Haiku**  | **Recommended.** Best balance of speed and tool calling accuracy for testing. |
| **Anthropic Sonnet** | Use for complex multi-step reasoning tasks.                                   |
| **GPT-4o**           | Alternative for comparison testing.                                           |

<Info>
  **StackOne Tool Calling Model (Beta)**

  StackOne is fine-tuning a specialized model optimized for SaaS tool calling, at lower cost than leading models.

  Contact [ai@stackone.com](mailto:ai@stackone.com) to join the beta.
</Info>

## Defender

The Playground includes a **StackOne Defender** toggle in the configuration sidebar that scans tool call responses for prompt injection attempts before the model sees them.

**Per-request override.** The Playground toggle is a per-request override — it controls Defender for the Playground session only, regardless of what the project-level setting is. Use it to test how your agent behaves with Defender on or off without changing your project configuration. The toggle defaults to **on** in the Playground.

**Risk indicators on tool calls.** When Defender is enabled, every tool call in the chat log displays a colored icon next to its status badge:

| Icon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Meaning                                                                                                                               |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| <img src="https://mintcdn.com/stackone-60/D_ktR54Q8ZzCnqcJ/images/defender/defender_green.svg?fit=max&auto=format&n=D_ktR54Q8ZzCnqcJ&q=85&s=fd358164c4ca655ee031224bef467f8c" width="20" height="20" style={{ display: "inline-block", verticalAlign: "middle", margin: 0 }} data-path="images/defender/defender_green.svg" /> | Low risk — response passed Defender's checks                                                                                          |
| <img src="https://mintcdn.com/stackone-60/D_ktR54Q8ZzCnqcJ/images/defender/defender_amber.svg?fit=max&auto=format&n=D_ktR54Q8ZzCnqcJ&q=85&s=3a87b795cc595ab0c25fcf9bb8090f07" width="20" height="20" style={{ display: "inline-block", verticalAlign: "middle", margin: 0 }} data-path="images/defender/defender_amber.svg" /> | Medium risk — flagged but not blocked                                                                                                 |
| <img src="https://mintcdn.com/stackone-60/D_ktR54Q8ZzCnqcJ/images/defender/defender_red.svg?fit=max&auto=format&n=D_ktR54Q8ZzCnqcJ&q=85&s=de5d7978a11dfe5bf2ab104591f33713" width="20" height="20" style={{ display: "inline-block", verticalAlign: "middle", margin: 0 }} data-path="images/defender/defender_red.svg" />                 | High or critical risk — when **Block High Risk Content** is on in your project settings, this call is blocked from reaching the model |
| *no icon*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Defender did not scan this response (toggle off, size limit exceeded, or no defender metadata)                                        |

Hover any icon for the precise risk level reported by Defender.

**Behaviour when blocked.** With **Block High Risk Content** enabled at the project level, a high/critical tool call surfaces as a `Blocked` status in the chat log and the model receives an error in place of the tool response. The agent can react like any other tool error — retry, skip, or surface to the user.

For the full Defender configuration reference — detection modes, thresholds, large-response behaviour, SFE, and SDK overrides — see the [Defender guide](/guides/defender).

## Use Setup

The **"Use Setup"** button shows configuration for connecting StackOne's MCP server to your own applications:

<Frame>
  <img src="https://mintcdn.com/stackone-60/4ouL_MauP-dDyfF3/images/playground/playground-use-setup.png?fit=max&auto=format&n=4ouL_MauP-dDyfF3&q=85&s=93dc34a2da3945d69468272b0eb445a2" alt="Use Setup Dialog" width="2400" height="1800" data-path="images/playground/playground-use-setup.png" />
</Frame>

* **URL**: `https://api.stackone.com/mcp`
* **Auth**: `Basic <base64-encoded-api-key>`
* **Header**: `x-account-id: <your-account-id>`

For full setup instructions, see the [MCP Quickstart](/mcp/quickstart). To understand which protocol is right for your use case, see [Agent Protocols Comparison](/guides/calling-stackone-actions).

## Troubleshooting

<AccordionGroup>
  <Accordion title="No accounts visible">
    Ensure accounts are linked in the [Accounts section](/guides/accounts-section) and actions are enabled in your [connector configuration](/guides/managing-integrations).
  </Accordion>

  <Accordion title="Slow responses">
    Switch to Haiku (fastest) or reduce the number of selected accounts.
  </Accordion>

  <Accordion title="Tool not found">
    Verify the action is enabled in your integration configuration. Check [Request Logs](/guides/request-logs) for details.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Defender" icon="shield-halved" href="/guides/defender">
    Prompt-injection defense for tool call responses
  </Card>

  <Card title="Agent Protocols" icon="scale-balanced" href="/guides/calling-stackone-actions">
    Choose the right protocol for production
  </Card>

  <Card title="MCP Quickstart" icon="bolt" href="/mcp/quickstart">
    Connect MCP clients
  </Card>
</CardGroup>
