[ Web Proxy ]
URL:
Viewing: https://docs.cloud.google.com/storage/docs/reference/mcp/tools_list/write_text [Back]  [Original]

MCP Tools Reference: storage.googleapis.com  |  Cloud Storage  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback

MCP Tools Reference: storage.googleapis.com Stay organized with collections Save and categorize content based on your preferences.

Tool: write_text

Writes text content to an object, overwriting any existing content.

The following sample demonstrates how to use curl to invoke the write_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": "write_text",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

Input Schema

Request message for WriteText.

WriteTextRequest

JSON representation
{
  "bucketName": string,
  "objectName": string,
  "textContent": string,
  "contentType": string
}
Fields
bucketName

string

Required.

objectName

string

Required.

textContent

string

Required. The text content to write. An empty string can be used to create a zero-byte object.

contentType

string

Optional. The content type of the object (for example, "text/plain").

Output Schema

Response message for WriteText.

WriteTextResponse

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

string

The name of the bucket containing the written object.

objectName

string

The name of the written object.

generation

string (int64 format)

The generation ID of the created object.

sizeBytes

string (int64 format)

The size of the object written in bytes.

Tool Annotations

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

Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-07-13 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-07-13 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page