Skip to main content
Glama
lumiclip

mcp-lumiclip

Official

check_usage

Read-onlyIdempotent

Check your current plan, credits remaining, and billing period to confirm sufficient credits before generating video clips.

Instructions

Returns a JSON object with plan (string), credits_remaining (number), credits_total (number), period_start (ISO date), and period_end (ISO date). Call this before generate_clips to confirm the user has enough credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'check_usage' tool. It calls the Lumiclip API GET /account/usage endpoint and returns the result (plan, credits_remaining, credits_total, period_start, period_end). The handler is registered via server.tool() with an empty input schema and various intent hints.
    server.tool(
      "check_usage",
      "Returns a JSON object with plan (string), credits_remaining (number), credits_total (number), period_start (ISO date), and period_end (ISO date). Call this before generate_clips to confirm the user has enough credits.",
      {
        title: "Check Usage",
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: true,
      },
      async () => {
        try {
          const result = await apiCall(config, "GET", "/account/usage");
          return {
            content: [
              { type: "text" as const, text: JSON.stringify(result, null, 2) },
            ],
          };
        } catch (err: unknown) {
          const message = err instanceof Error ? err.message : String(err);
          return {
            content: [{ type: "text" as const, text: `Error: ${message}` }],
            isError: true,
          };
        }
      }
    );
  • The tool configuration/metadata for check_usage, including intent hints (readOnlyHint, destructiveHint, idempotentHint, openWorldHint). No input parameters (empty object schema).
    {
      title: "Check Usage",
      readOnlyHint: true,
      destructiveHint: false,
      idempotentHint: true,
      openWorldHint: true,
    },
  • The apiCall helper function used by the check_usage handler to make the actual HTTP request to the Lumiclip API (GET /account/usage).
    async function apiCall(
      config: ApiConfig,
      method: string,
      path: string,
      body?: unknown
    ) {
      const base = config.apiBase || "https://api.lumiclip.ai";
      const url = `${base}/api/v1${path}`;
      const res = await fetch(url, {
        method,
        headers: {
          Authorization: `Bearer ${config.apiKey}`,
          "Content-Type": "application/json",
        },
        ...(body ? { body: JSON.stringify(body) } : {}),
      });
    
      const data = (await res.json()) as Record<string, unknown>;
    
      if (!res.ok) {
        throw new Error(
          (data.error as string) ||
            (data.message as string) ||
            `API error ${res.status}`
        );
      }
    
      return data;
    }
  • src/server.ts:234-235 (registration)
    Registration of the 'check_usage' tool via server.tool('check_usage', ...) in the createServer function.
    server.tool(
      "check_usage",
  • src/http.ts:70-74 (registration)
    Secondary registration of 'check_usage' in the HTTP server's .well-known/mcp/server-card.json tool listing, used for discovery/metadata purposes.
    {
      name: "check_usage",
      description: "Returns {plan, credits_remaining, credits_total, period_start, period_end}. Check before generate_clips to confirm enough credits.",
      inputSchema: { type: "object", properties: {} },
    },
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so the description's addition of return format and usage context adds moderate value beyond structured data.

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 two sentences, front-loaded with the return format and followed by usage advice, with no redundancy.

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?

For a zero-parameter tool, the description fully covers what the agent needs: return fields and when to call it. Output schema absence is compensated by explicit field listing.

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

Parameters5/5

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

With no input parameters and 100% schema coverage, the description adds no parameter info but correctly lists the return structure, fulfilling the need for parameter semantic clarity.

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 explicitly states the tool returns a JSON object with specific fields (plan, credits_remaining, etc.), clearly distinguishing it from sibling tools like generate_clips.

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

Usage Guidelines5/5

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

The description advises calling this tool before generate_clips to confirm sufficient credits, providing explicit guidance on when to use it and its relationship to a sibling tool.

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

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