Skip to main content
Glama

get_object_info

Retrieve metadata and details for specific objects in MinIO storage buckets to inspect file properties and storage information.

Instructions

获取对象信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketNameYes存储桶名称
objectNameYes对象名称

Implementation Reference

  • Core implementation of the getObjectInfo tool handler using MinIO client's statObject method to fetch and return object metadata.
    async getObjectInfo(bucketName: string, objectName: string): Promise<ObjectInfo> { this.ensureConnected(); const stat = await this.client!.statObject(bucketName, objectName); return { name: objectName, size: stat.size, lastModified: stat.lastModified, etag: stat.etag, contentType: stat.metaData['content-type'], isDir: false }; }
  • MCP CallTool handler case for 'get_object_info' that validates input, invokes the minioClient handler, and formats response.
    case 'get_object_info': { const { bucketName, objectName } = z.object({ bucketName: z.string(), objectName: z.string() }).parse(args); const info = await this.minioClient.getObjectInfo(bucketName, objectName); return { content: [ { type: 'text', text: `对象信息:\n- 名称: ${info.name}\n- 大小: ${info.size} 字节\n- 最后修改: ${info.lastModified.toISOString()}\n- ETag: ${info.etag}\n- 内容类型: ${info.contentType || '未知'}` } ] };
  • src/index.ts:200-210 (registration)
    Tool registration entry in ListTools response defining name, description, and input schema for get_object_info.
    { name: 'get_object_info', description: '获取对象信息', inputSchema: { type: 'object', properties: { bucketName: { type: 'string', description: '存储桶名称' }, objectName: { type: 'string', description: '对象名称' } }, required: ['bucketName', 'objectName'] }
  • Input schema definition for the get_object_info tool.
    inputSchema: { type: 'object', properties: { bucketName: { type: 'string', description: '存储桶名称' }, objectName: { type: 'string', description: '对象名称' } }, required: ['bucketName', 'objectName'] }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pickstar-2002/minio-storage-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server