# Retrieve Extracted Text — LLMWhisperer

> Retrieve the extracted text executed through the whisper API. This can be used to retrieve the text of the conversion process when the conversion is done in async mode. See the documentation

- Key: `llmwhisperer-retrieve-text`
- Type: Action (Read-only)
- Version: 0.0.2
- App: LLMWhisperer (`llmwhisperer`) — https://pipedream.com/apps/llmwhisperer.md
- This page (HTML): https://pipedream.com/apps/llmwhisperer/actions/retrieve-text
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/llmwhisperer/actions/retrieve-text/retrieve-text.mjs

## Description

Retrieve the extracted text executed through the whisper API. This can be used to retrieve the text of the conversion process when the conversion is done in async mode. [See the documentation](https://docs.unstract.com/llm_whisperer/apis/llm_whisperer_text_extraction_retrieve_api)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `whisperHash` | `string` | Yes | The whisper hash returned while starting the whisper process. |

## 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": "llmwhisperer",
      },
    },
  },
)

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: "llmwhisperer-retrieve-text",
  arguments: {
    whisperHash: "Whisper Hash",
  },
})
```

**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: "llmwhisperer-retrieve-text",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    llmwhisperer: { authProvisionId: "apn_xxxxxxx" },
    whisperHash: "Whisper Hash",
  },
})

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": "llmwhisperer-retrieve-text",
    "configured_props": {
      "llmwhisperer": { "authProvisionId": "apn_xxxxxxx" },
      "whisperHash": "Whisper Hash"
    }
  }'
```

---

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