MCP Tools Reference: storage.googleapis.com

Tool: read_text

DEPRECATED: Use read_object instead. Reads non-binary text content from an object.

The following sample demonstrates how to use curl to invoke the read_text MCP tool.

Curl Request
curl --location 'https://storage.googleapis.com/storage/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "read_text",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

Input Schema

Request message for ReadText.

ReadTextRequest

JSON representation
{
  "bucketName": string,
  "objectName": string,
  "generation": string,
  "readOffset": string,
  "readLimit": string
}
Fields
bucketName

string

Required. Cloud Storage bucket name.

objectName

string

Required.

generation

string (int64 format)

Optional. The generation of the object to read. If omitted or set to 0, the latest generation is read.

readOffset

string (int64 format)

Optional. The offset from the beginning of the object at which the data should be read. If not specified, the read starts from the beginning of the object. Negative values are allowed and are interpreted as an offset from the end of the object.

readLimit

string (int64 format)

Optional. The maximum number of bytes to read. If not specified, the read starts from the beginning of the object and continues until the end of the object. Zero means no limit. Negative values are not allowed.

Output Schema

Response message for ReadText.

ReadTextResponse

JSON representation
{
  "bucketName": string,
  "objectName": string,
  "size": string,
  "content": string,
  "generation": string,
  "contentRange": {
    object (ContentRange)
  }
}
Fields
bucketName

string

The name of the bucket containing the read object.

objectName

string

The name of the read object.

size

string (int64 format)

The size of the read object in bytes.

content

string

The non-binary text content that was read.

generation

string (int64 format)

The generation of the object that was read.

contentRange

object (ContentRange)

The content range of the object that was read. If the request was not a range request, this field will not be set.

ContentRange

JSON representation
{
  "start": string,
  "end": string,
  "completeLength": string
}
Fields
start

string (int64 format)

The start of the range of bytes to read.

end

string (int64 format)

The end of the range of bytes to read.

completeLength

string (int64 format)

The complete length of the object.

Tool Annotations

Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌