Skip to main content
Glama
StripFeed

stripfeed-mcp-server

Official

check_usage

Check your monthly API usage and plan limits to monitor consumption and stay within allowance.

Instructions

Check your current monthly API usage and plan limits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'check_usage' tool handler function. It fetches usage data from the StripFeed API at /usage, formats the response with plan name, usage count, limit, remaining calls, and reset date, and returns it as text content.
    server.tool(
      "check_usage",
      "Check your current monthly API usage and plan limits.",
      {},
      async () => {
        const apiKey = getApiKey();
        const response = await fetch(`${BASE_URL}/usage`, {
          headers: { Authorization: `Bearer ${apiKey}` },
        });
    
        if (!response.ok) {
          const body = await response.text();
          let message: string;
          try {
            message = JSON.parse(body).error;
          } catch {
            message = body;
          }
          throw new Error(`StripFeed API error ${response.status}: ${message}`);
        }
    
        const data = await response.json();
        const lines = [
          `Plan: ${data.plan}`,
          `Usage: ${data.usage.toLocaleString()}${data.limit ? ` / ${data.limit.toLocaleString()}` : ' (unlimited)'}`,
        ];
        if (data.remaining !== null) lines.push(`Remaining: ${data.remaining.toLocaleString()}`);
        lines.push(`Resets: ${data.resetsAt}`);
    
        return {
          content: [{ type: "text" as const, text: lines.join("\n") }],
        };
      }
    );
  • src/index.ts:232-265 (registration)
    The tool is registered via server.tool() with the name 'check_usage', a description string, an empty schema object (no input parameters), and the handler function.
    server.tool(
      "check_usage",
      "Check your current monthly API usage and plan limits.",
      {},
      async () => {
        const apiKey = getApiKey();
        const response = await fetch(`${BASE_URL}/usage`, {
          headers: { Authorization: `Bearer ${apiKey}` },
        });
    
        if (!response.ok) {
          const body = await response.text();
          let message: string;
          try {
            message = JSON.parse(body).error;
          } catch {
            message = body;
          }
          throw new Error(`StripFeed API error ${response.status}: ${message}`);
        }
    
        const data = await response.json();
        const lines = [
          `Plan: ${data.plan}`,
          `Usage: ${data.usage.toLocaleString()}${data.limit ? ` / ${data.limit.toLocaleString()}` : ' (unlimited)'}`,
        ];
        if (data.remaining !== null) lines.push(`Remaining: ${data.remaining.toLocaleString()}`);
        lines.push(`Resets: ${data.resetsAt}`);
    
        return {
          content: [{ type: "text" as const, text: lines.join("\n") }],
        };
      }
    );
  • Supporting helper function getApiKey() which retrieves the STRIPFEED_API_KEY environment variable, used by check_usage to authenticate the API request.
    function getApiKey(): string {
      const key = process.env.STRIPFEED_API_KEY;
      if (!key) {
        throw new Error(
          "STRIPFEED_API_KEY environment variable is required. " +
            "Get your key at https://www.stripfeed.dev/dashboard/keys"
        );
      }
      return key;
    }
Behavior2/5

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

No annotations are provided, so the description should disclose behavioral traits. It only states the tool checks usage but does not mention authentication needs, data sensitivity, rate limits, or whether it is read-only. This is insufficient for a tool with no annotation support.

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 a single, concise sentence with no redundancy or unnecessary information. Every word serves a purpose.

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

Completeness3/5

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

The description is adequate for a simple check tool but lacks any mention of the response format, possible errors, or additional context that would help the agent interpret results. No output schema is provided to compensate.

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 tool has zero parameters, and schema coverage is 100% by definition. The description does not need to explain parameters, meeting the baseline for no-parameter tools.

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's action ('Check') and the resource ('current monthly API usage and plan limits'). It is specific and distinct from sibling tools (batch_fetch, fetch_url) which focus on data retrieval.

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

Usage Guidelines3/5

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

The description implies usage for checking usage limits but provides no explicit guidance on when to use this tool versus siblings or any prerequisites. No context on alternatives or exclusions.

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

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