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

# along_select_safe

> Select an active Safe for the current session. All subsequent along tool calls will query this Safe.

## Overview

`along_select_safe` sets the active Safe for your MCP session. After calling this tool, all calls to the `along` tool will query the selected Safe's knowledge graph. The selection is persisted server-side on your OAuth token, so it carries across conversations and reconnects.

<Tip>
  The Safe selection persists server-side on the OAuth token. If you reconnect with the same OAuth token (after a token refresh), your previously selected Safe is automatically restored.
</Tip>

## When to use

* After calling `along_list_safes` to retrieve the Safe ID
* When switching to a different knowledge base mid-session
* At the start of a new conversation to explicitly set the active Safe

## Parameters

<ParamField body="safeId" type="string" required>
  The ID of the Safe to select. Retrieve this value from `along_list_safes`.
</ParamField>

## Response

On success, the tool returns a confirmation with the previous and new Safe details.

```json theme={null}
{
  "message": "Selected safe \"Sales Intelligence\". You can now use the \"along\" tool to search this safe's knowledge base.",
  "previousSafeId": "safe_def456",
  "newSafeId": "safe_abc123",
  "newSafeName": "Sales Intelligence"
}
```

<ResponseField name="message" type="string">
  Human-readable confirmation that the Safe was selected successfully.
</ResponseField>

<ResponseField name="previousSafeId" type="string | null">
  ID of the Safe that was active before this call, or `null` if no Safe was previously selected.
</ResponseField>

<ResponseField name="newSafeId" type="string">
  ID of the newly selected Safe.
</ResponseField>

<ResponseField name="newSafeName" type="string">
  Display name of the newly selected Safe.
</ResponseField>

## Error responses

| Error message                                   | Cause                                                         |
| ----------------------------------------------- | ------------------------------------------------------------- |
| `"safeId is required"`                          | You passed an empty or missing `safeId`.                      |
| `"Safe not found or not active"`                | The Safe ID does not exist or the Safe has been deactivated.  |
| `"You do not have access to this safe"`         | You do not have permission to connect to this Safe.           |
| `"Could not update session. Please reconnect."` | The OAuth token may have expired. Re-authorize and try again. |

<Note>
  Selecting a Safe that is already active returns an immediate success message without making any changes.
</Note>

## Example

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "along_select_safe",
      "arguments": {
        "safeId": "safe_abc123"
      }
    }
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 2,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"message\":\"Selected safe \\\"Sales Intelligence\\\". You can now use the \\\"along\\\" tool to search this safe's knowledge base.\",\"previousSafeId\":null,\"newSafeId\":\"safe_abc123\",\"newSafeName\":\"Sales Intelligence\"}"
        }
      ]
    }
  }
  ```
</CodeGroup>
