Tool: list_objects
Lists the objects in a bucket.
The following example shows how to use curl
to invoke the list_objects
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": "list_objects", "arguments": { // provide these details according to the tool' s MCP specification } } , "jsonrpc" : "2.0" , "id" : 1 } ' |
Input schema
ListObjectsRequest
| JSON representation |
|---|
{ "bucketName" : string , "prefix" : string , "recursive" : boolean } |
| Fields | |
|---|---|
bucketName
|
Required. The name of the bucket to list objects in. Format: {bucket_id} |
prefix
|
Optional. The prefix used to filter objects. If you don't specify a prefix, the operation matches all objects. If |
recursive
|
Optional. Specifies whether the list operation is recursive, which includes objects in subdirectories. If |
Output schema
ListObjectsResponse
| JSON representation |
|---|
{ "objectNames" : [ string ] , "prefixes" : [ string ] } |
| Fields | |
|---|---|
objectNames[]
|
The list of objects, ordered lexicographically by name. At most 1,000 objects are returned. |
prefixes[]
|
Object name prefixes for objects that matched the listing request but were excluded from |
Tool Annotations
Destructive hint: ❌ | Idempotent hint: ✅ | Read-only hint: ✅ | Open-world hint: ❌

