Skip to main content
Glama

Get Credits

get_credits
Read-only

View remaining credits on your GhostMinutes API key to track usage and plan transcriptions.

Instructions

Show remaining GhostMinutes credits for the authenticated API key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The register function that registers the 'get_credits' tool with the MCP server. The handler calls requireAuth, then client.getCredits(), and returns the response as JSON text with structured content.
    export function register(server: McpServer, client: GhostMinutesClient): void {
      server.registerTool(
        'get_credits',
        {
          title: 'Get Credits',
          description:
            'Show remaining GhostMinutes credits for the authenticated API key.',
          inputSchema: z.object({}),
          annotations: { readOnlyHint: true, openWorldHint: false },
        },
        async () => {
          requireAuth(client);
          const body = await client.getCredits();
          return {
            content: [{ type: 'text', text: JSON.stringify(body, null, 2) }],
            structuredContent: jsonStructured(body),
          };
        },
      );
    }
  • Registration of the 'get_credits' tool via server.registerTool, with schema, title, description, and annotations.
    server.registerTool(
      'get_credits',
      {
        title: 'Get Credits',
        description:
          'Show remaining GhostMinutes credits for the authenticated API key.',
        inputSchema: z.object({}),
        annotations: { readOnlyHint: true, openWorldHint: false },
  • Input schema defined as z.object({}) — no parameters required.
    inputSchema: z.object({}),
  • The getCredits() method on GhostMinutesClient that makes an HTTP GET request to '/mcp/me' with the API key bearer token.
    async getCredits(): Promise<unknown> {
      try {
        const res = await this.http.get('/mcp/me', {
          headers: { Authorization: `Bearer ${this.apiKey}` },
        });
        return this.ensureOk(res);
      } catch (e) {
        this.handleThrown(e);
      }
    }
  • src/server.ts:5-5 (registration)
    Import of the register function from get-credits.ts.
    import { register as registerGetCredits } from './tools/get-credits.js';
  • src/server.ts:39-39 (registration)
    Invocation of registerGetCredits(server, client) in the server setup.
    registerGetCredits(server, client);
Behavior4/5

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

Annotations already declare the tool as read-only (readOnlyHint=true). The description adds context that it shows credits specific to the authenticated API key, which is helpful. 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.

Conciseness5/5

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

The description is a single sentence that efficiently communicates the tool's purpose without any extraneous content.

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 simple read-only tool with no parameters and no output schema, the description sufficiently covers its function. It is complete enough for an agent to understand and use correctly.

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?

No parameters exist in the schema, and the description does not need to add parameter information. Baseline score of 4 is appropriate.

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 uses a specific verb ('Show') and resource ('remaining GhostMinutes credits'), clearly indicating what the tool does. It distinguishes itself from sibling tools which are all about transcripts.

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 does not provide explicit guidance on when to use this tool versus alternatives. While the lack of alternatives for credits makes it somewhat obvious, the description doesn't state it.

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/Rocketech-Software-Development/ghostminutes-mcp'

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