Skip to main content
Glama

get-usage

Retrieve a detailed report on your Cloudinary product environment usage, including storage, bandwidth, requests, and add-on consumption for a specific date.

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

  • The core handler function for the 'get-usage' tool. It calls Cloudinary's API to fetch usage data for the specified date (optional) and returns a formatted JSON text response or an 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' string.
    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 with the MCP server, providing the tool name, description, input 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),
    );
  • Helper function that curries tool handlers to accept the Cloudinary instance first, used to wrap the getUsageTool for registration.
    const getCloudinaryTool = (tool) => {
    	return (cloudinary) => (params) => tool(cloudinary, params);
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the report includes various metrics but fails to specify critical traits like whether this is a read-only operation, if it requires authentication, rate limits, or how data is formatted. The description adds minimal context beyond the basic purpose, leaving gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the main purpose and lists key metrics without unnecessary words. It could be slightly improved by structuring usage guidelines, but it earns its place by being clear and direct, with no wasted information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (reporting multiple metrics) and lack of annotations or output schema, the description is incomplete. It should explain the report's format, whether it's aggregated or detailed, and any behavioral aspects like permissions or data freshness. The description only covers what the tool does, not how it behaves or what it returns, leaving significant gaps for an agent to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage with a well-described 'date' parameter, so the baseline is 3. The description does not add any parameter-specific details beyond what the schema provides, such as explaining why the date range is limited to the last 3 months or how the default current date affects the report. It compensates slightly by implying the report covers multiple metrics, but this is not parameter-related.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('report on the status of your product environment usage'), listing key metrics like storage, credits, and bandwidth. It distinguishes itself from siblings like 'delete-asset' or 'upload' by focusing on reporting rather than asset management, though it doesn't explicitly differentiate from other potential reporting tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It lacks context about prerequisites, frequency, or scenarios where this report is needed, such as monitoring limits or billing. With siblings like 'find-assets' that might overlap in data retrieval, no explicit distinctions are made.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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