---
title: "fetch"
description: "ChatGPT connector tool for retrieving a single file by id with its full indexed text."
---

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

# fetch

## What it does

Fetch a specific file by id, returning its indexed text and metadata. Companion to [`search`](/mcp/tools/search) in the ChatGPT connector contract.

## Required scope

`search:read`

## Input

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | The file id, usually from a `search` result |

## Output

```json
{
  "id": "de2e3b54-388b-47d1-a27a-445af0a7df02",
  "title": "soc2-controls.md",
  "text": "# SOC 2 Type II Controls — SHINE AI\n\nOwner: Gautham...",
  "url": "https://shineai.io/files/de2e3b54-388b-47d1-a27a-445af0a7df02",
  "metadata": {
    "status": "processed",
    "category": "compliance",
    "fileType": "md",
    "pageCount": null
  }
}
```

## Design note

`fetch` is gated on `search:read`. ChatGPT's default scope request is `answers:read search:read`, and `fetch` is the mandatory companion to `search`. It only exposes content that `search` already surfaced, so the scope requirement is the same.

Source: https://docs.shineai.io/mcp/tools/fetch/index.mdx
