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

# Tools

> TypeScript SDK reference for the Tools resource

## performWebTask

`POST /v1/tools/perform-web-task` — Perform Web Task

```typescript theme={null}
import { client, Tools } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await Tools.performWebTask({
  body: {
    prompt: 'string'
  }
});
console.log(result);
```

## getPerformWebTaskStatus

`GET /v1/tools/perform-web-task/{workflowId}/status` — Get Perform Web Task Status

```typescript theme={null}
import { client, Tools } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await Tools.getPerformWebTaskStatus({
  path: {
    workflowId: 'your-workflowId'
  }
});
console.log(result);
```

## executeCode

`POST /v1/tools/execute-code` — Execute Code Snippet

```typescript theme={null}
import { client, Tools } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await Tools.executeCode({
  query: {
    sessionId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'
  },
  body: {
    code: 'string'
  }
});
console.log(result);
```

## fetchWebpage

`POST /v1/tools/fetch/webpage` — Web Unlocker

```typescript theme={null}
import { client, Tools } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await Tools.fetchWebpage({
  body: {
    url: 'string'
  }
});
console.log(result);
```

## screenshotWebpage

`POST /v1/tools/screenshot` — Screenshot Webpage

```typescript theme={null}
import { client, Tools } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await Tools.screenshotWebpage({
  body: {}
});
console.log(result);
```

## createPagePdf

`POST /v1/tools/page-pdf` — Get Page PDF

```typescript theme={null}
import { client, Tools } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await Tools.createPagePdf({
  body: {
    url: 'https://example.com'
  }
});
console.log(result);
```
