Skip to main content
Glama

get_points

Check remaining points for converting images to Ghibli-style animated videos using the MCP server.

Instructions

Get remaining points

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyYesAPI key for authentication

Implementation Reference

  • The MCP tool handler for 'get_points', which extracts the api_key from arguments, calls ghibliClient.getPoints, and returns the remaining points as text content.
    case "get_points": {
      const apiKey = String(request.params.arguments?.api_key);
    
      if (!apiKey) {
        throw new Error("API key cannot be empty");
      }
    
      try {
        const points = await ghibliClient.getPoints(apiKey);
        return {
          content: [{
            type: "text",
            text: `Remaining points: ${points}`
          }]
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : 'Unknown error';
        throw new Error(`Get points failed: ${errorMessage}`);
      }
    }
  • src/index.ts:80-93 (registration)
    Registration of the 'get_points' tool in the ListTools response, including its name, description, and input schema requiring api_key.
    {
      name: "get_points",
      description: "Get remaining points",
      inputSchema: {
        type: "object",
        properties: {
          api_key: {
            type: "string",
            description: "API key for authentication"
          }
        },
        required: ["api_key"]
      }
    },
  • Helper method in GhibliClient that implements the core logic for fetching remaining points (credits) via API GET /api/user/credits.
    async getPoints(apiKey: string): Promise<number> {
      // 打印请求信息
      process.stderr.write(`\n[Request] GET ${this.baseUrl}/api/user/credits\n`);
      process.stderr.write(`[Headers] ${JSON.stringify(this.getHeaders(apiKey), null, 2)}\n`);
    
      const response = await fetch(`${this.baseUrl}/api/user/credits`, {
        method: 'GET',
        headers: this.getHeaders(apiKey)
      });
    
      // 打印响应状态
      process.stderr.write(`[Response] Status: ${response.status} ${response.statusText}\n`);
    
      if (!response.ok) {
        const error = `API request failed: ${response.statusText}`;
        process.stderr.write(`[Error] ${error}\n`);
        throw new Error(error);
      }
    
      const result = await response.json();
      // 打印响应数据
      process.stderr.write(`[Response Data] ${JSON.stringify(result, null, 2)}\n`);
    
      return result.data?.left_credits || 0;
    }
Behavior2/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. 'Get remaining points' implies a read-only operation, but it doesn't specify whether this requires authentication (though the schema shows an api_key parameter), what format the response returns, whether there are rate limits, or any side effects. The description adds minimal behavioral context beyond what's implied by the verb 'Get'.

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 extremely concise at just three words. It's front-loaded with the core action ('Get remaining points') and contains no unnecessary verbiage or redundant information. Every word serves a purpose in conveying the basic function.

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

Completeness2/5

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

For a tool with no annotations, no output schema, and a single parameter, the description is inadequate. It doesn't explain what 'points' are, what system they belong to, what format the response will have, or any behavioral characteristics. The agent would need to guess about the tool's purpose and output based on minimal information.

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?

The schema has 100% description coverage (the api_key parameter is fully documented in the schema), so the baseline is 3. The description doesn't add any parameter-specific information beyond what's already in the schema - it doesn't explain how the api_key relates to 'remaining points' or provide additional context about parameter usage.

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

Purpose2/5

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

The description 'Get remaining points' is a tautology that essentially restates the tool name 'get_points' without adding meaningful specificity. It doesn't specify what kind of points (e.g., API usage points, user points, reward points) or from what system/context. While it includes a verb ('Get'), it lacks the resource specificity needed for clear differentiation from sibling tools like 'get_task_result' and 'image_to_video'.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, context for usage, or relationship to sibling tools. There's no indication of whether this should be used before/after other operations or under what conditions 'remaining points' would be relevant.

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/MichaelYangjson/mcp-ghibli-video'

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