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

# Calling Actions

> Choose how to invoke StackOne actions: direct API, MCP, A2A, or SDKs

StackOne provides multiple ways to call actions. Whether you're building an AI agent, a traditional application, or orchestrating multi-agent systems, there's a protocol that fits your needs.

## Why Multiple Protocols?

StackOne's **Falcon Connector Engine** handles authentication, rate limiting, data transformation, and error recovery for every action. All protocols (direct API, MCP, A2A, and SDKs) route through this same engine, so you get the same reliability regardless of how you call actions.

<Info>
  **Actions** are the atomic operations in StackOne: `salesforce_list_contacts`, `gmail_send_message`, `google_drive_list_files`, etc. Every protocol is just a different way to invoke the same underlying actions.
</Info>

## Quick Decision Guide

<CardGroup cols={2}>
  <Card title="Actions API" icon="code">
    **Direct RPC calls** for traditional applications, scripts, or when you need full control

    [Jump to Actions API →](#actions-api)
  </Card>

  <Card title="AI Toolset (SDK)" icon="microchip">
    **Native TypeScript/Python** with framework integrations (LangChain, CrewAI, OpenAI)

    [Jump to SDKs →](#ai-toolset-sdks)
  </Card>

  <Card title="MCP Servers" icon={<svg fill="currentColor" fillRule="evenodd" height="1em" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"></path><path d="M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"></path></svg>}>
    **Open standard** for AI tools. Works with Claude, Cursor, Vercel AI, n8n

    [Jump to MCP →](#mcp-servers)
  </Card>

  <Card title="A2A Protocol" icon={<svg width="1em" height="1em" viewBox="0 0 860 860" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="544" cy="307" r="27" fill="currentColor"/><circle cx="154" cy="307" r="27" fill="currentColor"/><circle cx="706" cy="307" r="27" fill="currentColor"/><circle cx="316" cy="307" r="27" fill="currentColor"/><path d="M336.5 191.003H162C97.6588 191.003 45.5 243.162 45.5 307.503C45.5 371.844 97.6442 424.003 161.985 424.003C206.551 424.003 256.288 424.003 296.5 424.003C487.5 424.003 374 191.005 569 191.001C613.886 191 658.966 191 698.025 191C762.366 191.001 814.5 243.16 814.5 307.501C814.5 371.843 762.34 424.003 697.998 424.003H523.5" stroke="currentColor" strokeWidth="48" strokeLinecap="round"/><path d="M256 510.002C270.359 510.002 282 521.643 282 536.002C282 550.361 270.359 562.002 256 562.002H148C133.641 562.002 122 550.361 122 536.002C122 521.643 133.641 510.002 148 510.002H256ZM712 510.002C726.359 510.002 738 521.643 738 536.002C738 550.361 726.359 562.002 712 562.002H360C345.641 562.002 334 550.361 334 536.002C334 521.643 345.641 510.002 360 510.002H712Z" fill="currentColor"/><path d="M444 628.002C458.359 628.002 470 639.643 470 654.002C470 668.361 458.359 680.002 444 680.002H100C85.6406 680.002 74 668.361 74 654.002C74 639.643 85.6406 628.002 100 628.002H444ZM548 628.002C562.359 628.002 574 639.643 574 654.002C574 668.361 562.359 680.002 548 680.002C533.641 680.002 522 668.361 522 654.002C522 639.643 533.641 628.002 548 628.002ZM760 628.002C774.359 628.002 786 639.643 786 654.002C786 668.361 774.359 680.002 760 680.002H652C637.641 680.002 626 668.361 626 654.002C626 639.643 637.641 628.002 652 628.002H760Z" fill="currentColor"/></svg>}>
    **Agent-to-agent** communication for multi-agent orchestration

    [Jump to A2A →](#a2a-protocol)
  </Card>
</CardGroup>

## Comparison Table

| Feature           | Actions API               | AI Toolset (SDK)          | MCP Servers               | A2A Protocol         |
| ----------------- | ------------------------- | ------------------------- | ------------------------- | -------------------- |
| **Use case**      | Traditional apps, scripts | AI agents with frameworks | MCP-compatible clients    | Multi-agent systems  |
| **Requires code** | Yes                       | Yes                       | No (config only)          | Yes                  |
| **Best for**      | Full control, non-agentic | Production AI apps        | Quick setup, IDE agents   | Agent orchestration  |
| **Works with**    | Any HTTP client           | LangChain, CrewAI, OpenAI | Claude, Cursor, Vercel AI | Any A2A orchestrator |

***

## Actions API

The Actions API is the foundational protocol: a direct RPC endpoint to invoke any StackOne action programmatically. MCP and A2A both use this API internally.

<Tabs>
  <Tab title="When to Use">
    * Building **traditional applications** (not AI agents)
    * Writing **scripts or automation** that call connectors
    * Need **direct HTTP calls** without SDK dependencies
    * Want **full control** over request/response handling
    * Integrating from languages without SDK support
  </Tab>

  <Tab title="Example">
    ```bash theme={null}
    curl -X POST "https://api.stackone.com/actions/rpc" \
      -u "$STACKONE_API_KEY:" \
      -H "x-account-id: customer-hubspot" \
      -H "Content-Type: application/json" \
      -d '{
        "action": "hubspot_list_contacts",
        "query": { "page_size": 50 }
      }'
    ```
  </Tab>
</Tabs>

<Card title="Execute Actions API →" href="/platform/api-reference/actions/make-an-rpc-call-to-an-action" />

***

## AI Toolset SDKs

Native TypeScript and Python libraries with framework integrations for OpenAI, LangChain, CrewAI, Vercel AI SDK, and more.

<Tabs>
  <Tab title="When to Use">
    * Building a **custom AI agent** or product
    * Need **programmatic control** over which tools to load
    * Using **LangChain, CrewAI, OpenAI SDK**, or similar frameworks
    * Need to **dynamically select tools** based on context or user
    * Want **type safety** and IDE autocomplete
    * Building **production applications** with custom error handling
  </Tab>

  <Tab title="When NOT to Use">
    * You just want to use StackOne tools in [Claude Desktop](/mcp/app-guides/claude-desktop) or Cursor
    * You don't want to write code
    * Your use case is fully handled by MCP configuration
  </Tab>
</Tabs>

<CardGroup cols={2}>
  <Card title="TypeScript SDK →" href="/agents/typescript/introduction" />

  <Card title="Python SDK →" href="/agents/python/introduction" />
</CardGroup>

***

## MCP Servers

Model Context Protocol (MCP) is an open standard for connecting AI models to external tools. StackOne hosts MCP servers that expose all actions. These servers call the same Actions API.

<Tabs>
  <Tab title="When to Use">
    * Using an **MCP-compatible client**: Claude SDK, Vercel AI SDK, Cursor, Windsurf, n8n
    * Want **zero-code setup**: just configure and go
    * Building with **frameworks that support MCP natively**
    * Adding StackOne tools to **existing MCP setups**
    * Using **IDEs or agent builders** like Cursor or Flowise
    * Need to **switch between accounts** dynamically (just change `x-account-id`)
  </Tab>

  <Tab title="When NOT to Use">
    * Need **fine-grained programmatic control** over tool loading
    * Building a **production app** that requires custom error handling
    * Your framework doesn't support MCP
  </Tab>
</Tabs>

<Card title="MCP Quickstart →" href="/mcp/quickstart" />

***

## A2A Protocol

Agent-to-Agent (A2A) is Google's open protocol for autonomous agent communication. StackOne exposes A2A-compatible agents for each integration. These agents invoke the same underlying Actions API.

<Tabs>
  <Tab title="When to Use">
    * Building **multi-agent systems** with specialized agents
    * Want **autonomous agent communication** (agents talking to agents)
    * Need **context isolation** to protect your top-level agent's context window
    * Using an **A2A-compatible orchestrator**
    * Need **long-running tasks** with async completion
  </Tab>

  <Tab title="When NOT to Use">
    * Just need to call a few tools from your agent
    * Need **synchronous, immediate responses**
    * Your stack doesn't support A2A protocol
    * Building simple, single-agent applications
  </Tab>
</Tabs>

<Card title="A2A Quickstart →" href="/a2a/quickstart" />

***

## Can I Use Multiple?

Yes! Many production setups combine protocols:

* **Actions API for backend jobs** (scheduled syncs, data pipelines)
* **AI Toolset (SDK) for your product** (customer-facing AI features)
* **MCP for internal tools** (Cursor, Claude Desktop for your team)
* **A2A for complex workflows** (multi-agent orchestration)

All protocols use the same actions and authentication, so you can mix and match.

## Next Steps

<CardGroup cols={2}>
  <Card title="Execute Actions" icon="code" href="/api/execute-actions">
    Direct RPC calls
  </Card>

  <Card title="TypeScript SDK" icon="js" href="/agents/typescript/introduction">
    Native TypeScript integration
  </Card>

  <Card title="MCP Quickstart" icon={<svg fill="currentColor" fillRule="evenodd" height="1em" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"></path><path d="M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"></path></svg>} href="/mcp/quickstart">
    Zero-code MCP setup
  </Card>

  <Card title="A2A Introduction" icon={<svg width="1em" height="1em" viewBox="0 0 860 860" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="544" cy="307" r="27" fill="currentColor"/><circle cx="154" cy="307" r="27" fill="currentColor"/><circle cx="706" cy="307" r="27" fill="currentColor"/><circle cx="316" cy="307" r="27" fill="currentColor"/><path d="M336.5 191.003H162C97.6588 191.003 45.5 243.162 45.5 307.503C45.5 371.844 97.6442 424.003 161.985 424.003C206.551 424.003 256.288 424.003 296.5 424.003C487.5 424.003 374 191.005 569 191.001C613.886 191 658.966 191 698.025 191C762.366 191.001 814.5 243.16 814.5 307.501C814.5 371.843 762.34 424.003 697.998 424.003H523.5" stroke="currentColor" strokeWidth="48" strokeLinecap="round"/><path d="M256 510.002C270.359 510.002 282 521.643 282 536.002C282 550.361 270.359 562.002 256 562.002H148C133.641 562.002 122 550.361 122 536.002C122 521.643 133.641 510.002 148 510.002H256ZM712 510.002C726.359 510.002 738 521.643 738 536.002C738 550.361 726.359 562.002 712 562.002H360C345.641 562.002 334 550.361 334 536.002C334 521.643 345.641 510.002 360 510.002H712Z" fill="currentColor"/><path d="M444 628.002C458.359 628.002 470 639.643 470 654.002C470 668.361 458.359 680.002 444 680.002H100C85.6406 680.002 74 668.361 74 654.002C74 639.643 85.6406 628.002 100 628.002H444ZM548 628.002C562.359 628.002 574 639.643 574 654.002C574 668.361 562.359 680.002 548 680.002C533.641 680.002 522 668.361 522 654.002C522 639.643 533.641 628.002 548 628.002ZM760 628.002C774.359 628.002 786 639.643 786 654.002C786 668.361 774.359 680.002 760 680.002H652C637.641 680.002 626 668.361 626 654.002C626 639.643 637.641 628.002 652 628.002H760Z" fill="currentColor"/></svg>} href="/a2a/introduction">
    Multi-agent orchestration
  </Card>
</CardGroup>
