Back to Genai Toolbox

cloud-storage-get-object-metadata

docs/en/integrations/cloud-storage/tools/cloud-storage-get-object-metadata.md

1.6.02.5 KB
Original Source

About

A cloud-storage-get-object-metadata tool returns metadata for a single Cloud Storage object. Use it when the LLM needs fields such as object name, size, content type, generation, storage class, timestamps, checksums, or custom metadata without reading the object's content.

The response is the object metadata structure returned by the Cloud Storage API.

You can set bucket in the tool configuration. When set, bucket is removed from the runtime parameter schema and the configured bucket is always used. A configured bucket must be a non-empty string.

Compatible Sources

{{< compatible-sources >}}

Parameters

parametertyperequireddescription
bucketstringtrueName of the Cloud Storage bucket containing the object.
objectstringtrueFull object name (path) within the bucket, e.g. path/to/file.txt.

Example

yaml
kind: tool
name: get_object_metadata
type: cloud-storage-get-object-metadata
source: my-gcs-source
description: Use this tool to inspect metadata for a Cloud Storage object.
yaml
kind: tool
name: get_app_object_metadata
type: cloud-storage-get-object-metadata
source: my-gcs-source
description: Use this tool to inspect metadata for objects in the application bucket.
bucket: my-app-bucket

Output Format

The tool returns object metadata from the Cloud Storage API, including fields such as Name, Bucket, Size, ContentType, Updated, StorageClass, MD5, CRC32C, and user-defined metadata when present.

Reference

fieldtyperequireddescription
typestringtrueMust be "cloud-storage-get-object-metadata".
sourcestringtrueName of the Cloud Storage source to get object metadata from.
descriptionstringtrueDescription of the tool that is passed to the LLM.
bucketstringfalseBucket to always inspect objects from. When set, the runtime bucket parameter is hidden. Must not be empty.