Skip to main content
Glama
Davison-Francis

@deliveriq/mcp

Check Credit Balance

deliveriq_check_credits
Read-onlyIdempotent

Check your current credit balance and usage breakdown before performing credit-consuming operations. View remaining credits, plan tier, billing period, and usage by category.

Instructions

Check current credit balance, usage breakdown, and plan information. Use this before performing credit-consuming operations to verify sufficient balance.

Returns: Remaining credits, plan tier, billing period, and usage breakdown by category (single, batch, ESP sync).

Examples:

  • "How many credits do I have left?" -> {}

  • "What's my usage this month?" -> {}

Credit cost: Free

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function that executes the deliveriq_check_credits tool logic. Calls client.account.usage() and formats the response with remaining credits, plan, period, and usage breakdown.
        async () => {
          try {
            const res = await client.account.usage();
    
            const lines = [
              '# Credit Balance',
              '',
              `**Remaining**: ${res.remaining.toLocaleString()} of ${res.limit.toLocaleString()} credits`,
              `**Used**: ${res.used.toLocaleString()} (${((res.used / res.limit) * 100).toFixed(1)}%)`,
              `**Plan**: ${res.plan}`,
              `**Period**: ${res.periodStart} to ${res.periodEnd}`,
              '',
              '## Usage Breakdown',
              `| Category | Credits |`,
              `|----------|---------|`,
              `| Single verification | ${res.breakdown.single} |`,
              `| Batch verification | ${res.breakdown.batch} |`,
              `| ESP sync | ${res.breakdown.espSync} |`,
              `| **Total** | **${res.used}** |`,
            ];
    
            if (res.dailyUsage.length > 0) {
              lines.push('', '## Recent Daily Usage');
              const recent = res.dailyUsage.slice(-7);
              lines.push('| Date | Credits |', '|------|---------|');
              for (const day of recent) {
                lines.push(`| ${day.date} | ${day.count} |`);
              }
            }
    
            return successResponse(lines.join('\n'));
          } catch (error) {
            return handleSdkError(error);
          }
        },
      );
    }
  • Input schema for the tool - an empty object with strict() validation, meaning the tool takes no parameters.
    export const CheckCreditsSchema = z.object({}).strict();
  • Registration of the deliveriq_check_credits tool on the MCP server, defining its title, description, inputSchema, and annotations.
      server.registerTool(
        'deliveriq_check_credits',
        {
          title: 'Check Credit Balance',
          description: `Check current credit balance, usage breakdown, and plan information. Use this before performing credit-consuming operations to verify sufficient balance.
    
    Returns:
      Remaining credits, plan tier, billing period, and usage breakdown by category (single, batch, ESP sync).
    
    Examples:
      - "How many credits do I have left?" -> {}
      - "What's my usage this month?" -> {}
    
    Credit cost: Free`,
          inputSchema: CheckCreditsSchema,
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: true,
          },
        },
        async () => {
          try {
            const res = await client.account.usage();
    
            const lines = [
              '# Credit Balance',
              '',
              `**Remaining**: ${res.remaining.toLocaleString()} of ${res.limit.toLocaleString()} credits`,
              `**Used**: ${res.used.toLocaleString()} (${((res.used / res.limit) * 100).toFixed(1)}%)`,
              `**Plan**: ${res.plan}`,
              `**Period**: ${res.periodStart} to ${res.periodEnd}`,
              '',
              '## Usage Breakdown',
              `| Category | Credits |`,
              `|----------|---------|`,
              `| Single verification | ${res.breakdown.single} |`,
              `| Batch verification | ${res.breakdown.batch} |`,
              `| ESP sync | ${res.breakdown.espSync} |`,
              `| **Total** | **${res.used}** |`,
            ];
    
            if (res.dailyUsage.length > 0) {
              lines.push('', '## Recent Daily Usage');
              const recent = res.dailyUsage.slice(-7);
              lines.push('| Date | Credits |', '|------|---------|');
              for (const day of recent) {
                lines.push(`| ${day.date} | ${day.count} |`);
              }
            }
    
            return successResponse(lines.join('\n'));
          } catch (error) {
            return handleSdkError(error);
          }
        },
      );
  • Top-level registration call that wires the account tools (including deliveriq_check_credits) into the MCP server.
    registerAccountTools(server, client);
  • Credit cost definition for deliveriq_check_credits - set to 0 (free).
      deliveriq_check_credits: 0,
    };
Behavior4/5

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

Annotations already indicate read-only, non-destructive, idempotent, and open-world behavior. The description adds value with 'Credit cost: Free' and details about return fields (remaining credits, plan tier, billing period, usage breakdown). No contradictions.

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?

Description is concise but slightly unstructured, mixing usage hint, return info, and examples in a paragraph. Could be more organized, but no wasted sentences.

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

Completeness5/5

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

Despite having no output schema, the description covers purpose, usage context, return contents, examples, and cost. For a simple read-only tool, this is fully complete.

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?

Input schema has zero parameters, and schema description coverage is 100%. Baseline is 3 per guidelines. Description does not add parameter semantics since none exist.

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

Purpose5/5

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

The description clearly states the tool checks credit balance, usage breakdown, and plan information. It distinguishes itself from sibling tools by focusing on credits, with no overlap in functionality.

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

Usage Guidelines4/5

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

Explicitly states 'Use this before performing credit-consuming operations to verify sufficient balance.' Provides clear context, though no exclusions or alternatives are mentioned since no sibling tool offers credit info.

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/Davison-Francis/min8t-sdks'

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