Skip to main content
Glama

limits

Monitor daily spending limits and track current usage in cents to control payment processing costs.

Instructions

Check current spending limits and today's usage (all values in cents).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration and handler for the "limits" tool in the MCP server.
    // Tool: limits
    server.tool(
      "limits",
      "Check current spending limits and today's usage (all values in cents).",
      {},
      async () => {
        return jsonResult(guardrails.getStatus());
      }
    );
  • CLI command handler for "limits".
    async function cmdLimits() {
      const config = loadConfig();
      const { guardrails } = bootstrap(config);
    
      const status = guardrails.getStatus();
    
      // Simple progress bar
      const pct = status.daily_limit > 0
        ? Math.min(1, status.daily_spend / status.daily_limit)
        : 0;
      const barWidth = 24;
      const filled = Math.round(pct * barWidth);
      const barColor = pct > 0.9 ? error : pct > 0.7 ? warning : success;
      const bar = barColor("█".repeat(filled)) + muted("░".repeat(barWidth - filled));
    
      console.log();
      console.log(`  ${primary(BOX.dot)} ${boldPrimary(t.limitsTitle)}`);
      console.log(`  ${divider()}`);
      console.log();
      console.log(`  ${label(t.dailyLimit + ":")}      ${bold(formatBRL(status.daily_limit))}`);
      console.log(`  ${label(t.spentToday + ":")}      ${formatBRL(status.daily_spend)}`);
      console.log(`  ${label(t.remaining + ":")}        ${boldMoney(formatBRL(status.daily_remaining))}`);
      console.log();
      console.log(`  ${bar} ${muted(`${Math.round(pct * 100)}%`)}`);
      console.log();
      console.log(`  ${label(t.perTxMax + ":")}       ${formatBRL(status.per_tx_max)}`);
      console.log(`  ${label(t.confirmAbove + ":")}    ${formatBRL(status.confirm_above)}`);
      console.log();
    }
Behavior3/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 and adds critical context that output values are 'in cents,' explaining the data format. However, it omits other behavioral details such as whether the data is real-time, cached, or subject to rate limiting.

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 single-sentence description is efficiently front-loaded with the action verb and packs essential information about the resource and data format without waste. Every clause serves a distinct purpose: identifying the action, the resources, and the value format.

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

Completeness4/5

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

Given the tool's simplicity (no parameters) and lack of output schema, the description adequately covers the return values by specifying both spending limits and today's usage with their monetary unit. It fulfills the minimum requirements for a read-only status tool, though it could further clarify the scope.

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

Parameters4/5

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

The input schema contains zero parameters, establishing a baseline score of 4, and the description appropriately does not invent parameter details. The schema coverage is vacuously 100%.

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 uses the specific verb 'Check' and clearly identifies the resource as 'current spending limits and today's usage,' distinguishing it from sibling tools like balance or status. While it effectively communicates the tool's function through resource specificity, it does not explicitly contrast with specific alternatives.

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 explicit guidance on when to select this tool over siblings such as balance or status, nor does it mention prerequisites. Users must infer applicability solely from the resource description without explicit when-to-use criteria.

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/vrllrv/junto-mcp'

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