# Execute Capability — Strale

> Execute a specific Strale capability by slug with the provided inputs. Returns structured data with quality score and audit trail. See the documentation

- Key: `strale-execute-capability`
- Type: Action (Write)
- Version: 0.0.1
- App: Strale (`strale`) — https://pipedream.com/apps/strale.md
- This page (HTML): https://pipedream.com/apps/strale/actions/execute-capability
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/strale/actions/execute-capability/execute-capability.mjs

## Description

Execute a specific Strale capability by slug with the provided inputs. Returns structured data with quality score and audit trail. [See the documentation](https://strale.dev/docs)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `capabilitySlug` | `string` | Yes | The slug of the capability to execute (e.g. swedish-company-data, vat-validate, email-validate). See the catalog. |
| `inputs` | `object` | Yes | Input parameters for the capability as a JSON object (e.g. { "vat_number": "SE556677889901" } or { "email": "ops@example.com" }). The required fields depend on the capability being called. |
| `maxPriceCents` | `integer` | No | Maximum price in euro cents you are willing to pay per execution. |
| `dryRun` | `boolean` | No | If true, validates the request and returns the matched capability without executing or charging. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "strale",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "strale-execute-capability",
  arguments: {
    capabilitySlug: "Capability Slug",
    inputs: "Inputs",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "strale-execute-capability",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    strale: { authProvisionId: "apn_xxxxxxx" },
    capabilitySlug: "Capability Slug",
    inputs: "Inputs",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "strale-execute-capability",
    "configured_props": {
      "strale": { "authProvisionId": "apn_xxxxxxx" },
      "capabilitySlug": "Capability Slug",
      "inputs": "Inputs"
    }
  }'
```

---

- App: https://pipedream.com/apps/strale.md · All apps: https://pipedream.com/apps
