Skip to main content
Glama

get-usage

Generate a detailed report on product environment usage, including storage, bandwidth, requests, and resource metrics for a specific date within the last three months.

Instructions

Get a report on the status of your product environment usage, including storage, credits, bandwidth, requests, number of resources, and add-on usage

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoThe date for the usage report. Must be within the last 3 months and specified in the format: yyyy-mm-dd. Default: the current date

Implementation Reference

  • Main handler function for the 'get-usage' tool. Calls Cloudinary API to fetch usage report for a given date and returns formatted JSON or error.
    const getUsageTool = async (cloudinary, { date }) => { try { const usageOptions = { date }; const usageResult = await cloudinary.api.usage(usageOptions); return { content: [ { type: "text", text: JSON.stringify(usageResult, null, 2) } ], isError: false, }; } catch (error) { return getToolError(`Error getting usage report from Cloudinary: ${error.message}`, cloudinary); } };
  • Zod schema defining the input parameters for the 'get-usage' tool, specifically an optional 'date' parameter.
    export const getUsageToolParams = { date: z.string().optional().describe("The date for the usage report. Must be within the last 3 months and specified in the format: yyyy-mm-dd. Default: the current date") }
  • src/index.js:77-82 (registration)
    Registers the 'get-usage' tool on the MCP server with its name, description, schema, and handler function.
    server.tool( "get-usage", "Get a report on the status of your product environment usage, including storage, credits, bandwidth, requests, number of resources, and add-on usage", getUsageToolParams, getUsageTool(cloudinary), );

Other Tools

Related Tools

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/yoavniran/cloudinary-mcp-server'

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