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
|
Required. The name of the bucket. |
objectName
|
Required. The name of the object. |
textContent
|
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
|
The name of the bucket. |
objectName
|
The name of the object. |
generation
|
The generation ID of the created object. |
sizeBytes
|
The size of the object written in bytes. |
Tool Annotations
Destructive hint: ✅ | Idempotent hint: ✅ | Read-only hint: ❌ | Open-world hint: ✅

