MCP tools reference: storage.googleapis.com

Tool: write_text

The write_text tool writes text content to an object, overwriting any existing content.

The following example shows 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 
 } 
Fields
bucketName

string

Required. The name of the bucket.

objectName

string

Required. The name of the object.

textContent

string

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

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.

objectName

string

The name of the 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: ✅

Create a Mobile Website
View Site in Mobile | Classic
Share by: