Skip to main content
Glama

volt_set_budget_alert

Set budget thresholds for AI compute spending to receive alerts when daily, weekly, or monthly limits are exceeded, helping control costs across multiple providers.

Instructions

Set a budget threshold for daily, weekly, or monthly spend. Alerts when exceeded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thresholdYesBudget threshold in USD (e.g. 10.00 for $10)
periodYesBudget period: daily, weekly, or monthly

Implementation Reference

  • The handler function for 'volt_set_budget_alert' that interacts with the SpendTracker.
    export function handleSetBudgetAlert(input: SetBudgetAlertInput, tracker: SpendTracker) {
      const alert = tracker.setAlert(input.threshold, input.period);
      const allAlerts = tracker.getAlerts();
      const triggered = tracker.checkAlerts();
    
      const lines: string[] = [
        `Budget alert configured`,
        '─'.repeat(60),
        `Period: ${alert.period}`,
        `Threshold: $${alert.threshold.toFixed(2)}`,
        `Status: ${alert.enabled ? 'enabled' : 'disabled'}`,
      ];
    
      if (triggered.length > 0) {
        lines.push('', 'Active alerts:');
        for (const t of triggered) {
          lines.push(`  ${t.message}`);
        }
      }
    
      if (allAlerts.length > 1) {
        lines.push('', 'All configured alerts:');
        for (const a of allAlerts) {
          lines.push(`  ${a.period}: $${a.threshold.toFixed(2)} (${a.enabled ? 'on' : 'off'})`);
        }
      }
    
      return {
        content: [
          {
            type: 'text' as const,
            text: lines.join('\n'),
          },
        ],
      };
    }
  • Input validation schema for 'volt_set_budget_alert'.
    export const setBudgetAlertSchema = z.object({
      threshold: z
        .number()
        .positive()
        .describe('Budget threshold in USD (e.g. 10.00 for $10)'),
      period: z
        .enum(['daily', 'weekly', 'monthly'])
        .describe('Budget period: daily, weekly, or monthly'),
    });
  • Tool registration for 'volt_set_budget_alert' in the MCP server.
    // ── volt_set_budget_alert ─────────────────────────────
    server.tool(
      'volt_set_budget_alert',
      'Set a budget threshold for daily, weekly, or monthly spend. Alerts when exceeded.',
      setBudgetAlertSchema.shape,
      async (input) => maybeAddFirstRun(handleSetBudgetAlert(setBudgetAlertSchema.parse(input), spendTracker)),
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions setting a threshold and alerts, but doesn't cover critical aspects like whether this is a one-time setup or recurring, what permissions are required, how alerts are delivered, or if changes are reversible. This is inadequate for a mutation tool.

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

Conciseness5/5

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

The description is extremely concise with two short sentences that are front-loaded and waste no words. Every part contributes directly to understanding the tool's function.

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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits, error conditions, response format, and how it integrates with sibling tools. The high schema coverage helps, but doesn't compensate for the missing operational context.

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?

Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds minimal value by implying the parameters are used together for budget alerts, but doesn't provide additional context beyond what's in the schema descriptions.

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 ('Set') and resource ('budget threshold'), and specifies the alert functionality. However, it doesn't differentiate from sibling tools like 'volt_get_spend' or 'volt_check_price', which might be related to monitoring spending.

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?

No guidance is provided on when to use this tool versus alternatives. The description mentions alerts when exceeded, but doesn't specify prerequisites, exclusions, or how it relates to sibling tools for checking spend or savings.

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/newageflyfish-max/volthq'

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